MCPcopy Create free account
hub / github.com/Firebasky/Java / Scan_http

Function Scan_http

SkyWalking/tool/scan.py:49–66  ·  view source on GitHub ↗
(url, socket_proxies)

Source from the content-addressed store, hash-verified

47
48
49def Scan_http(url, socket_proxies):
50 FLAG = False
51 payload = {
52 "query": "query queryLogs($condition: LogQueryCondition) {\r\n queryLogs(condition: $condition) {\r\n total\r\n logs {\r\n serviceId\r\n serviceName\r\n isError\r\n content\r\n }\r\n }\r\n}\r\n",
53 "variables": {"condition": {"metricName": "sqli", "paging": {"pageSize": 10}, "state": "ALL"}}}
54
55 for endpoint in endpoints:
56 try:
57 res = requests.post(url+endpoint, json=payload, headers=headers, timeout=2, verify=False, proxies=socket_proxies, allow_redirects=False)
58 if "sqli" in res.text and res.status_code == 200:
59 FLAG=True
60 result.append(url+' 存在'+info)
61 print(url+'\033[1;31m存在'+info+'\033[0m')
62 break
63 except:
64 pass
65 if not FLAG:
66 print(url+"扫描完成不存在漏洞")
67
68
69def fileTarget(file, socket_proxies):

Callers 2

fileTargetFunction · 0.70
scan.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected