Document directory
- Analysis of difficulties in website Logon of the Ministry of Railways
- Technical Analysis
- Start step
- Conclusion
Analysis of difficulties in website Logon of the Ministry of Railways
- Microsoft IE browser is required
- The Ministry of Railways website only supports Internet payment
- Websites use HTTPS protocol
- The client does not allow cross-origin access.
Technical Analysis
- Use the Microsoft IE developer toolbar to crack the automated Logon Process
Start step
- To use IE8 and later versions, you need to download the official ie developer Toolbar of Microsoft for IE7 and later versions. The download link is as follows:
- Internet Explorer developer toolbar: http://www.microsoft.com/download/en/details.aspx? Id = 18359
- In the IE Address Bar visit the Ministry of Railways login page https://dynamic.12306.cn/otsweb/loginAction.do? Method = init
- You only need to enter your username, password, and verification code once.
- Press the F12 shortcut key to bring up the IE developer toolbar> script tab> copy the code to the content text box> click Run script.
VaR page = "https://dynamic.12306.cn/otsweb/loginAction.do? Method = init "; var url =" https://dynamic.12306.cn/otsweb/loginAction.do? Method = login "; var queryurl =" https://dynamic.12306.cn/otsweb/order/querySingleAction.do? Method = init "; function submitform () {VaR _ ifrmain = document. getelementbyid ('main'); var username = _ifrmain.content+doc ument. getelementbyid ('username'); var Password = _ifrmain.contentdomaindoc ument. getelementbyid ('Password'); var randcode = _ifrmain.contentdomaindoc ument. getelementbyid ('randcode'); var sublink = _ifrmain.contentdomaindoc ument. getelementbyid ('sublink'); var submiturl = u RL; $. ajax ({type: "Post", URL: submiturl, data: {"loginuser. user_name ": username. value, "user. password ": password. value, "randcode": randcode. value },timeout: 30000, success: function (MSG) {If (MSG. indexof ('Enter the correct Verification Code ')>-1) {alert (' enter the correct verification code! ') ;}; If (MSG. indexof ('Too many users currently access')>-1) {relogin (MSG);} else {location. replace (queryurl) ;}}, error: function (MSG) {relogin (MSG) ;}, beforesend: function (xhr ){;}});} vaR COUNT = 1; function relogin (MSG) {count ++; sublink. innerhtml = "(" + Count + ") logon... "+ MSG; setTimeout (submitform, 500);} submitform ();
- Subsequent execution
- After you click the run script button, the login operation is automated for the customer. You only need to wait until the login is successful.
- If your user name is displayed, the logon is successful.
Conclusion
- Insufficient
- The ticket purchase peak has passed the previous day. This technique is too late. Someone else ordered my ticket. I didn't pay too much attention to using technology to achieve easy login.
- Foot
- The return ticket peak is coming soon!