From acef2ceab3384c13609063371b013c3dd15d71b4 Mon Sep 17 00:00:00 2001 From: hyzaw <62041055+hyzaw@users.noreply.github.com> Date: Fri, 20 Aug 2021 09:07:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8python=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8C=96=E5=88=B7=E6=96=B0=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- refresher.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 refresher.py diff --git a/refresher.py b/refresher.py new file mode 100644 index 0000000..9dfc761 --- /dev/null +++ b/refresher.py @@ -0,0 +1,27 @@ +import requests +import time +import hashlib + +proxies = { + "http": None, + "https": None, +} + +s = requests.session() + +url = "https://你的域名/?admin" +t = str(int(time.time())) +temp = t + "你的密码" +s1 = hashlib.sha1(temp.encode("utf-8")).hexdigest() +data = "password1=" + str(s1) + "×tamp=" + t +r = s.post(url=url, data=data, proxies=proxies) +if "Login Success!" in r.text: + print("登录成功!") +else: + print("登录失败~") +url = "https://你的域名/?RefreshCache" +r = s.get(url) +if "