Skip to content

Commit e6c240f

Browse files
committed
新增满级网js自动登录
1 parent 4ce88e3 commit e6c240f

File tree

3 files changed

+2902
-1
lines changed

3 files changed

+2902
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
> **自动登录**
5959
60-
[淘宝](https://github.com/wkunzhi/Python3-Spider/tree/master/【淘宝】自动登陆) | [5173平台](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【5173网】自动登录) | [房天下](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【房天下】自动登录) | [Glidesky](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【Glidedsky】自动登陆) | [中关村](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【中关村】自动登录) | [9377平台](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【9377网】自动登录) | [逗游](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【逗游】自动登录) | [GitHub](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【GitHub】自动登录) | [万创帮](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【万创帮】自动登录) | [空中网](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【空中网】自动登录) | [易通贷](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【易通贷】自动登录) | [DNS](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【DNS】自动登录) | [TCL金融](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【TCL金融】自动登录) | [国鑫所](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【国鑫所】自动登录)
60+
[淘宝](https://github.com/wkunzhi/Python3-Spider/tree/master/【淘宝】自动登陆) | [5173平台](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【5173网】自动登录) | [房天下](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【房天下】自动登录) | [Glidesky](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【Glidedsky】自动登陆) | [中关村](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【中关村】自动登录) | [9377平台](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【9377网】自动登录) | [逗游](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【逗游】自动登录) | [GitHub](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【GitHub】自动登录) | [万创帮](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【万创帮】自动登录) | [空中网](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【空中网】自动登录) | [易通贷](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【易通贷】自动登录) | [DNS](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【DNS】自动登录) | [TCL金融](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【TCL金融】自动登录) | [国鑫所](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/【国鑫所】自动登录) | [满级网](https://github.com/wkunzhi/Python3-Spider/tree/master/其他实战/满级网)
6161

6262
> **其他实战**
6363
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# -*- coding: utf-8 -*-
2+
# __author__ = "zok" [email protected]
3+
# Date: 2019-08-26 Python: 3.7
4+
5+
import requests
6+
import base64
7+
from Crypto.Cipher import PKCS1_v1_5 as Cipher_pksc1_v1_5
8+
from Crypto.PublicKey import RSA
9+
10+
11+
class YX(object):
12+
"""
13+
满级网自动登陆 官网 www.manjiwang.com
14+
http://www.manjiwang.com/Logins/BuyerLogin
15+
"""
16+
17+
def __init__(self, user, pwd):
18+
self.user = user
19+
self.pwd = pwd
20+
self.url = 'http://www.manjiwang.com/Logins/BuyerLogin'
21+
self.headers = {
22+
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36',
23+
'Host': 'www.manjiwang.com',
24+
}
25+
self.public_key = """-----BEGIN PUBLIC KEY-----
26+
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDC4wHerJc4BSst20Zb07lY9LeZss4OEEhe+SrnLyYy8hGquX/aTQNn+5wnV/+8ierKPgqPGIXPf1ZRww5/6yON+O7dAfJ7BRx85HneIWqwPCZToLck8DN8UXsBuXLMcG7tfMunnnZKenrPsAslN0eKvkYkvz4EPGdvmPwz0NCKXQIDAQAB
27+
-----END PUBLIC KEY-----
28+
"""
29+
30+
def make_pwd(self):
31+
rsa_key = RSA.importKey(self.public_key)
32+
cipher = Cipher_pksc1_v1_5.new(rsa_key)
33+
cipher_text = base64.b64encode(cipher.encrypt(self.pwd.encode()))
34+
return cipher_text.decode()
35+
36+
def make_data(self):
37+
data = {
38+
'account': self.user,
39+
'password': self.make_pwd(),
40+
'returnUrl': '/'
41+
}
42+
return data
43+
44+
def login(self):
45+
"""start
46+
"""
47+
data = self.make_data()
48+
response = requests.post(self.url, data=data)
49+
print(response.text)
50+
print(response.cookies)
51+
52+
53+
if __name__ == '__main__':
54+
username = input('请输入账号')
55+
password = input('密码')
56+
yx = YX(username, password)
57+
yx.login()
58+
59+
60+

0 commit comments

Comments
 (0)