(url, socket_proxies)
| 47 | |
| 48 | |
| 49 | def 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 | |
| 69 | def fileTarget(file, socket_proxies): |
no outgoing calls
no test coverage detected