From d8039db21f0b024e086476591cc507a79101b01c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=90=91=E9=98=B3=20=28Steve=20Lee=29?= Date: Mon, 30 Mar 2020 17:36:17 +0800 Subject: Create login --- draft/login | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 draft/login diff --git a/draft/login b/draft/login new file mode 100644 index 0000000..2a28ad6 --- /dev/null +++ b/draft/login @@ -0,0 +1,26 @@ +import requests as r + +s = r.Session(); + +h = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36 Edg/80.0.361.69', + 'Origin': 'https://pt.m-team.cc', + 'Referer': 'https://pt.m-team.cc/login.php' + }; + +d = {'username': 'username', + 'password': 'pass'}; + +p = dict(http='socks5://@127.0.0.1:1080', https='socks5://@127.0.0.1:1080'); + +resp = s.post('https://pt.m-team.cc/takelogin.php', data=d, headers=h, proxies=p); + +resp = s.get('https://pt.m-team.cc/index.php', headers=h, proxies=p); + +#print(resp.status_code); + +#print(resp.text); + +if resp.text.find('waterfall.php') != -1: + print('login success'); +else: + print('login failed'); -- cgit v1.2.3