Set up a dialog box procedure
In OnInitDialog ()
Use IE to open the corresponding page
ShellExecute (NULL, _T (" open "), _T (" IExplore. Exe "), _T (" http://dddl.gs.tax.cn/js_sso_server/login? Service=HTTP % 3 a % 2 f % 2 fportal. Gs. Tax. Cn % 2 fwelcome. The HTML "), NULL, SW_SHOW);
Before using caught tool fiddler2
1, the browser open http://dddl.gs.tax.cn/js_sso_server/login? Service=HTTP % 3 a % 2 f % 2 fportal. Gs. Tax. Cn % 2 fwelcome. The HTML
A get request, return cookies: JSESSIONID=lQPxxxxxxxxxxxxxxxxxxxxxxxxxxxx! - 1168173757
2, enter the user name and password, click on the login form button
Post request at http://dddl.gs.tax.cn/js_sso_server/login; jsessionid=lQPxxxxxxxxxxxxxxxxxxxxxxxxxxxx! - 1168173757? service=HTTP % 3 a % 2 f % 2 fportal. Gs. Tax. Cn % 2 fwelcome. The HTML
Is access to the address and the jsessionid
Cookie: JSESSIONID=lQPxxxxxxxxxxxxxxxxxxxxxxxxxxxx! - 1168173757
The username=xx& Password=xx& Brower=xx& IP=xx& The hostname=xx& App=Dhttp service % % 2 a % 2 f % 2 fportal. Gs. Tax. Cn % 2 fwelcome. Html& Yzm=& amp; Swrydm=& amp; Lt=lt - 145174 - XXXXXX0j & amp; Execution=e1s1 & amp; _eventId=submit& Submit E7=% % 99% BB BD E5 % % % 95
Already has access to the login page source code, is a form & lt; FORM>
The form id is fm1,
Two text input box input type="text"
Id username and password, the initial value is null values
A submit button & lt; Input type="submit" value="https://bbs.csdn.net/topics/"/& gt; , name="submit", there is no id,
How to automatically submit the form
What kind of method?
CodePudding user response:
Ajax VBS script?CodePudding user response:
The contents of the edit box as a url parameter to open again, simulate the submit buttonCodePudding user response:
Internet explorer can only use the system itself,The elements in the code through Internet explorer
CodePudding user response:
Use COM components, a operation of the DOM interface, IE you baidu, I've done,CodePudding user response:
Use first caught tool caught, then use the CURL command line tools, according to the instruction execution is good,CodePudding user response:
1, first add the com components of referenceTo join the Microsoft Internet Controls reference;
To join the Microsoft HTML Object Library reference; (is actually MSHTML)
CodePudding user response:
Python has been resolved,