生活随笔
收集整理的這篇文章主要介紹了
沃支付登录
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
涉及到的知識(shí)有
驗(yàn)證碼
js逆向
import time
,os
import cv2
import js2py
import requestsheaders
= {'authority': 'epay.10010.com','pragma': 'no-cache','cache-control': 'no-cache','sec-ch-ua': '" Not;A Brand";v="99", "Google Chrome";v="97", "Chromium";v="97"','accept': '*/*','x-requested-with': 'XMLHttpRequest','sec-ch-ua-mobile': '?0','user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36','sec-ch-ua-platform': '"Windows"','sec-fetch-site': 'same-origin','sec-fetch-mode': 'cors','sec-fetch-dest': 'empty','referer': 'https://epay.10010.com/auth/minipage/loginWindow_newlogin.jsp','accept-language': 'zh-CN,zh;q=0.9',
}def get_getPubKey():times
= int(time
.time
() * 1000)response
= requests
.get
(url
=f'https://epay.10010.com/auth/auth/getPubKey.jsp?_={times}',headers
=headers
).text
.replace
('200--', '').strip
()return response
def get_loginPwd(pwd
):key
= get_getPubKey
()f
= open('1.js', 'r').read
()context
= js2py
.EvalJs
()context
.execute
(f
)loginPwd
= context
.encryptRequest
(pwd
, key
)return loginPwd
def get_yzm():response
= requests
.get
('https://epay.10010.com/auth/a.randomPic', headers
=headers
).content
with open('1.png', 'wb') as f
:f
.write
(response
)IMG
= cv2
.imread
('./1.png')cv2
.imshow
("Image", IMG
)cv2
.waitKey
()yzm
= input('請(qǐng)輸入驗(yàn)證碼:')os
.remove
('1.png')return yzm
def main():yzm
= get_yzm
()user
= input('請(qǐng)輸入賬號(hào):')pwd
= input('請(qǐng)輸入密碼:')loginPwd
= get_loginPwd
(pwd
)data
= {'errorurl': 'https://epay.10010.com/auth/auth/errorPage.jsp','RelayState': 'type%3DC%3Bbackurl%3Dhttps%3A%2F%2Fepay.10010.com%2Fauth%2Fauth%2FloginBack.jsp%3Bspid%3D4028f09638eb576a013904e27b440002%3Bnl%3D8%3BloginFrom%3Dhttps%3A%2F%2Fepay.10010.com%2Fpss%2Fuser%2Fmy','loginType': '1','loginPwdType': '1','loginPwd': loginPwd
,'flag': 'no','userid': user
,'pwd': '','validCode': yzm
}response
= requests
.post
('https://epay.10010.com/auth/Login', headers
=headers
, data
=data
).status_code
print(response
)if __name__
== '__main__':main
()
總結(jié)
以上是生活随笔為你收集整理的沃支付登录的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。