Pre-order work: Add items and charge your account
Require ' net/http '
url = uri.parse (' http://116.255.240.184/do.aspx ')
Response = Net::http.post_form (url,{' action ' = ' loginin ', ' uid ' = ' 1 ', ' pwd ' = ' 1 '}) #登录 function, username, password
Puts Response.body
token= response.body.split (' | ') [1]
Puts token
Response = Net::http.post_form (url,{' action ' = ' cancelsmsrecvall ', ' uid ' = ' 1 ', ' token ' =>token}) #取消一个短信接收, Can immediately unlock the token returned by the amount locked, user name
Puts Response.body
Response = Net::http.post_form (url,{' action ' = ' getmobilenum ', ' pid ' = ' 511 ', ' uid ' = ' 1 ', ' token ' =>token} ) #得到手机, item number, user name, token
Puts Response.body
Tel= response.body.split (' | ') [0] #tel = ' 13434493096 ' #输入手机到 * * * * Get the verification code and wait 10 seconds to get it
Sleep 10
Response = Net::http.post_form (url,{' action ' = ' getvcodeandreleasemobile ', ' Mobile ' =>tel, ' token ' =>token, ' UID ' = ' 1 '}) #得到验证码
While response.body== "Not_receive"
Response = Net::http.post_form (url,{' action ' = ' getvcodeandreleasemobile ', ' Mobile ' =>tel, ' token ' =>token, ' UID ' = ' 1 '})
Sleep 1
Puts "not_receive"
End
Puts Response.body this gets the relevant verification code
Information generated by the operation
C:\RailsInstaller\Ruby1.9.3\bin\ruby.exe-e $stdout. Sync=true, $stderr. Sync=true;load ($0=argv.shift) d:/documents/ Rubymineprojects/untitled/post.rb
A4727603|e01034b93982fa900f650f536cb4b2dc
E01034b93982fa900f650f536cb4b2dc
1
18318624721|f7adee988bfaf74eb0222d8459fcf8b7
Not_receive
Not_receive
Not_receive
10657521833285514| respected players: your registration Verification code is: 776558, the verification code will expire in 3 minutes. "Toto Game"
Process finished with exit code 0
Mobile phone Verification Code resolution method