-
-
Save fffonion/40ef2b9ba15ae9874fdaa065a0f498a4 to your computer and use it in GitHub Desktop.
一键起飞
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Crypto.Cipher import AES | |
import requests | |
import json | |
import time | |
import urllib | |
import random | |
# change this | |
phone = '13512345678' | |
# phone = '13%09d' % (random.randrange(1, 10e8)) | |
# : ) | |
key='aeX4U+d/5LqENDjHe+Fcrw=='.decode('base64') | |
cipher = AES.new(key, AES.MODE_ECB) | |
data = json.dumps({ | |
"account": phone, | |
"area_no": "420100", #if location service is disabled, this will by default be Wuhan | |
"timestamp": int(time.time() * 1000), | |
}) | |
# pkcs7 | |
length = 16 - (len(data) % 16) | |
data += chr(length) * length | |
req = cipher.encrypt(data).encode('base64') | |
s = requests.Session() | |
print("index") | |
r = s.get("http://ispeed.ebit.cn/xyfree/index.jsp?request=" + urllib.quote_plus(req), allow_redirects=False) | |
# print(s.cookies.get_dict()) | |
print("fake ts.html") | |
r = s.get("http://ispeed.ebit.cn/xyfree/ts.html", allow_redirects=False) | |
print("isTs") | |
r = s.get("http://ispeed.ebit.cn/xyface/xyspeedActivity/isTs.jhtml", allow_redirects=False) | |
# print(s.cookies.get_dict()) | |
print(r.content) | |
print("isSpeedup") | |
r = s.get("http://ispeed.ebit.cn/xyface/xyspeedActivity/isSpeedup.jhtml", allow_redirects=False) | |
print(r.content) | |
print("speedup") | |
r = s.get("http://ispeed.ebit.cn/xyface/xyspeedActivity/speedup.jhtml", allow_redirects=False) | |
# print(s.cookies.get_dict()) | |
print(r.content) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
似乎电信更新了接口,没法使用了,广州电信目前输出如下
isTs
{"state":9999,"message":"连接超时,请重新登录"}
isSpeedup
{"state":9999,"message":"连接超时,请重新登录"}
speedup
{"state":9999,"message":"连接超时,请重新登录"}