Mobile phone Verification Code resolution method

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.