Using Qpython3 to make the old version of the sky-wing TP router dialing script

Source: Internet
Author: User

#Fantasy Dial python version#by 1414641776Account=' xxxxxx@96301'Password=' xxxxx'#Router ScriptdefSendtoroute (Account,password):Importurllib.request,base64 IP='192.168.1.1'Login_user='Admin'LOGIN_PW=' admin'URL="http://192.168.1.1/userRpm/PPPoECfgRpm.htm?wan=0&wantype=2&acc="+account+"&psw="+password+"&confirm="+password+"&specialdial=0&sectype=0&sta_ip=0.0.0.0&sta_mask=0.0.0.0&linktype=1&waittime=15 &connect=%c1%ac+%bd%d3"Auth=str (Base64.b64encode (login_user+':'+LOGIN_PW). Encode ('Utf-8')) Auth='Basic'+ Auth[2:len (auth)-1] Heads= {'Referer':'/ http'+ IP +'/userrpm/sysrebootrpm.htm',             'Authorization': Auth#' Basic ywrtaw46emhpzglhbnpozw5h '} request=urllib.request.Request (URL, None, heads) Response=Urllib.request.urlopen (Request)Print(Response.read ())#Sl4a's Android API call#Clipboard copy functiondefSetClipboard (String):Importsl4a Droid=sl4a. Android () Droid.setclipboard (string)#MD5 Cryptographic FunctionsdefMD5 (string):Importhashlib M=hashlib.md5 () m.update (String.encode ('Utf-8'))  #The argument must be of type Byte, otherwise unicode-objects must be encoded before hashing errormd5=m.hexdigest ()returnMd5.upper ()#Day Wing old version encryption functiondefGetaccount (Account,password):Import Time Now=time.localtime () time_string= str (now[3]) +str (now[4]) +str (now[5]) encryptStr1= MD5 (time_string) [0:8] ENCRYPTSTR2= MD5 ("Jepyid"+account.upper () +encryptstr1+password.upper ()) [0:20] EncryptAccount="~GHCA"+encryptstr1+" -"+encryptstr2+ AccountreturnEncryptaccountaccount=Getaccount (Account,password) SetClipboard (account)Print(account+'\ r \ n Encrypted account has been copied to clipboard') Sendtoroute (Account,password)

Using Qpython3 to make the old version of the sky-wing TP router dialing script

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.