-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hoixding
committed
May 31, 2022
0 parents
commit 3003d60
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import json | ||
import requests | ||
|
||
headers = { | ||
"Host": "192.168.0.1", | ||
"Connection": "keep-alive", | ||
"Accept": "*/*", | ||
"Origin": "http://192.168.0.1", | ||
"X-Requested-With": "XMLHttpRequest", | ||
"Content-Type": "application/json", | ||
"Referer": "http://192.168.0.1/", | ||
"Accept-Encoding": "gzip, deflate, br" | ||
} | ||
data = json.dumps({"method":"do","login":{"password":"********"}}) | ||
url = 'http://192.168.0.1/' | ||
resp = requests.post(url, headers=headers, data=data) | ||
# 获取服务器状态响应 | ||
print(resp.text) | ||
dict = json.loads(resp.content.decode('utf-8')) | ||
print(dict.get('stok')) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
""" | ||
@source:https://github.com/zixing131/Router | ||
""" | ||
|
||
Pwd = "12345678" | ||
def securityEncode(a, b, c): | ||
d, f, h, m = "", len(a), len(b), len(c) | ||
e = max(f, h) | ||
for g in range(0, e): | ||
l = k = 187 | ||
if (g >= f): | ||
l = ord(b[g]) | ||
else: | ||
if (g >= h): | ||
k = ord(a[g]) | ||
else: | ||
k = ord(a[g]) | ||
l = ord(b[g]) | ||
d += c[(k ^ l) % m] | ||
return d | ||
|
||
|
||
s= securityEncode(Pwd == "" and Pwd or Pwd, "RDpbLfCPsJZ7fiv", | ||
"yLwVl0zKqws7LgKPRQ84Mdt708T1qQ3Ha7xv3H7NyU84p21BriUWBU4"+ | ||
"3odz3iP4rBL3cD02KZciXTysVXiV8ngg6vL48rPJyAUw0HurW20xqxv9a"+ | ||
"Yb4M9wK1Ae0wlro510qXeU07kV57fQMc8L6aLgMLwygtc0F10a0Dg70TOoo"+ | ||
"uyFhdysuRMO51yY5ZlOZZLEal1h0t9YQW0Ko7oBwmCAHoic4HYbUyVeU3sfQ"+ | ||
"1xtXcPcf1aT303wAQhv66qzW") | ||
print(s) |