Skip to content

Commit 0d1747b

Browse files
authored
Update springcheck.py
1 parent 27f8230 commit 0d1747b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

inc/springcheck.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,23 @@ def Spring_Check(url,proxies,header_new):
1414
cprint("[.] 正在进行Spring的指纹识别","cyan")
1515
Spring_hash = "0488faca4c19046b94d07c3ee83cf9d6"
1616
Paths = ["favicon.ico", "AabyssZG666"]
17+
check_status = 0
1718
for path in Paths:
1819
test_url = str(url) + path
1920
r = requests.get(test_url, timeout=10, verify=False, headers=header_new, proxies=proxies)
2021
try:
2122
content_type = r.headers.get("Content-Type", "")
22-
if "image" in content_type or "octet-stream" in content_type:
23+
if r.text and ('timestamp' in r.text):
24+
cprint("[+] 站点报错内容符合Spring特征,识别成功","red")
25+
check_status = 1
26+
elif "image" in content_type or "octet-stream" in content_type:
2327
favicon_hash = hashlib.md5(r.content).hexdigest()
2428
if favicon_hash == Spring_hash:
2529
cprint("[+] 站点Favicon是Spring图标,识别成功","red")
26-
break
27-
elif r.text and ('timestamp' in r.text):
28-
cprint("[+] 站点报错内容符合Spring特征,识别成功","red")
29-
break
30-
else:
30+
check_status = 1
31+
while check_status == 0:
3132
cprint("[-] 站点指纹不符合Spring特征,可能不是Spring框架","yellow")
33+
check_status = 2
3234
except KeyboardInterrupt:
3335
print("Ctrl + C 手动终止了进程")
3436
sys.exit()

0 commit comments

Comments
 (0)