Skip to content

Commit 5cc7ebe

Browse files
author
onepureman
committed
网站加密破解
1 parent d68293f commit 5cc7ebe

File tree

30 files changed

+1585
-7461
lines changed

30 files changed

+1585
-7461
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.js linguist-language=python
1.16 KB
Loading

游乐会_未成功登录/login.py renamed to 九游_加密完成_非法登录/get_pwd.js

Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
1-
"""
21

3-
Base_Url: http://uhg.9you.com/
4-
& https://passport.9you.com/login/ulogin.php?callback=loginCallbackNew&denyCallbackURL=http://uhg.9you.com/vip/Member/sso_deny&sid=7d769f33d6ae19c4fddf437dbf418309
5-
Author: jing
6-
Modify: 2020/10/22
7-
"""
82

9-
10-
import execjs
11-
import requests
12-
13-
14-
class Login():
15-
def __init__(self, user, pwd):
16-
self.user = user
17-
self.pwd = pwd
18-
self.sess = requests.session()
19-
20-
21-
def getpwd(self):
22-
js_pwd = """
23-
243
!function(a) {
254
"use strict";
265
function b(a, b) {
@@ -183,48 +162,8 @@ def getpwd(self):
183162
}) : a.md5 = t
184163
}(this);
185164

186-
165+
187166
function getpwd(pwd){
188167
hashKey= 'hgfdherwerehjtyutr'
189168
return md5(md5(pwd).split("").reverse().join("") + this.hashKey);
190169
}
191-
"""
192-
pwd = execjs.compile(js_pwd).call("getpwd", self.pwd)
193-
print(pwd)
194-
195-
196-
def get_captcha(self):
197-
response = self.sess.get("https://login.passport.9you.com/identifyingCode.jsp?0.7676386687853862")
198-
with open("captcha.png", "wb") as f:
199-
f.write(response.content)
200-
201-
def login_(self):
202-
self.sess.get("http://uhg.9you.com/")
203-
204-
self.get_captcha()
205-
login_url_raw = "https://login.passport.9you.com/checkJCode?callback=_jqjsp&userName={}&password={}&id=LX_GAME&identifyingCode={}&&_1603086662042="
206-
login_url = login_url_raw.format(self.user, self.pwd, input("请输入验证码:"))
207-
208-
self.sess.headers = {
209-
"Accept": "*/*",
210-
"Accept-Encoding": "gzip, deflate, br",
211-
"Accept-Language": "zh-CN,zh;q=0.9",
212-
"Connection": "keep-alive",
213-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36",
214-
"Host": "login.passport.9you.com",
215-
"Sec-Fetch-Mode": "no-cors",
216-
"Sec-Fetch-Site": "same-site",
217-
218-
}
219-
220-
response = self.sess.get(login_url)
221-
print(response.content.decode())
222-
223-
224-
if __name__ == '__main__':
225-
user = ""
226-
pwd = ""
227-
228-
login = Login(user, pwd) # TODO: 输入 账号 密码
229-
230-
login.login_()
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
"""
2+
3+
Base_Url: https://passport.9you.com/login/ulogin.php?callback=loginCallbackNew&denyCallbackURL=http://uhg.9you.com/vip/Member/sso_deny&sid=3588812f462a13bc909e04fce8d15ae9
4+
Author: jing
5+
Modify: 2020/10/22
6+
"""
7+
8+
9+
import execjs
10+
import requests
11+
import time
12+
13+
14+
class Login():
15+
def __init__(self, user, pwd):
16+
self.user = user
17+
self.pwd = pwd
18+
self.sess = requests.session()
19+
20+
21+
def get_pwd(self):
22+
with open('./get_pwd.js', encoding='utf-8') as f:
23+
js_pwd = f.read()
24+
pwd = execjs.compile(js_pwd).call("getpwd", self.pwd)
25+
return pwd
26+
27+
def get_captcha(self):
28+
response = self.sess.get("https://login.passport.9you.com/identifyingCode.jsp?0.7676386687853862")
29+
with open("captcha.png", "wb") as f:
30+
f.write(response.content)
31+
32+
def login_(self):
33+
self.sess.get("https://login.passport.9you.com/sso_tddevice.jsp")
34+
pwd = self.get_pwd()
35+
print(pwd)
36+
37+
38+
self.get_captcha()
39+
login_url_raw = "https://login.passport.9you.com/checkJCode?callback=_jqjsp&userName={}&password={}&id=LX_GAME&identifyingCode={}&&_{}="
40+
login_url = login_url_raw.format(self.user, self.pwd, input("请输入验证码:"), str(int(time.time()*1000)))
41+
42+
self.sess.headers = {
43+
"Accept": "*/*",
44+
"Accept-Encoding": "gzip, deflate, br",
45+
"Accept-Language": "zh-CN,zh;q=0.9",
46+
"Connection": "keep-alive",
47+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36",
48+
"Host": "login.passport.9you.com",
49+
"Sec-Fetch-Mode": "no-cors",
50+
"Sec-Fetch-Site": "same-site",
51+
}
52+
53+
response = self.sess.get(login_url)
54+
print(response.content.decode())
55+
56+
57+
if __name__ == '__main__':
58+
user = "121212121"
59+
pwd = "121212121212"
60+
61+
login = Login(user, pwd) # TODO: 输入 账号 密码
62+
63+
login.login_()
Loading
-1.51 KB
Binary file not shown.

0 commit comments

Comments
 (0)