Skip to content

Commit

Permalink
部分功能实现,敏感信息已去除
Browse files Browse the repository at this point in the history
  • Loading branch information
hoixding committed May 31, 2022
0 parents commit 3003d60
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
20 changes: 20 additions & 0 deletions login.py
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'))
29 changes: 29 additions & 0 deletions pwdencode.py
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)

0 comments on commit 3003d60

Please sign in to comment.