|
4 | 4 | # AabyssZG # |
5 | 5 | ################ |
6 | 6 |
|
7 | | -from inc import output,run,vul,console |
8 | | -import requests, sys |
9 | | -from termcolor import cprint |
10 | | -import requests.packages.urllib3 |
11 | | -requests.packages.urllib3.disable_warnings() |
| 7 | +from inc import output,run,vul,springcheck,zoom |
| 8 | +import sys |
12 | 9 |
|
13 | | -# 检查代理的使用 |
14 | | -def SpringBoot_Scan_Proxy(args): |
15 | | - if args.proxy: |
16 | | - proxies = { |
17 | | - "http": "http://%(proxy)s/" % {'proxy': args.proxy}, |
18 | | - "https": "http://%(proxy)s/" % {'proxy': args.proxy} |
19 | | - } |
20 | | - cprint(f"================检测代理可用性中================", "cyan") |
21 | | - testurl = "https://www.baidu.com/" |
22 | | - headers = {"User-Agent": "Mozilla/5.0"} # 响应头 |
23 | | - try: |
24 | | - requests.packages.urllib3.disable_warnings() |
25 | | - res = requests.get(testurl, timeout=10, proxies=proxies, verify=False, headers=headers) |
26 | | - print(res.status_code) |
27 | | - # 发起请求,返回响应码 |
28 | | - if res.status_code == 200: |
29 | | - print("GET www.baidu.com 状态码为:" + str(res.status_code)) |
30 | | - cprint(f"[+] 代理可用,马上执行!", "cyan") |
31 | | - except KeyboardInterrupt: |
32 | | - print("Ctrl + C 手动终止了进程") |
33 | | - sys.exit() |
34 | | - except: |
35 | | - cprint(f"[-] 代理不可用,请更换代理!", "magenta") |
36 | | - sys.exit() |
37 | | - else: |
38 | | - proxies = '' |
39 | | - |
40 | | - if (args.url or args.file or args.vul or args.dump or args.zoomeye): |
41 | | - console.SpringBoot_Scan_console(args, proxies) |
| 10 | +# 控制台-参数处理和程序调用 |
| 11 | +def SpringBoot_Scan_console(args,proxies): |
| 12 | + if args.url: |
| 13 | + urlnew = springcheck.check(args.url,proxies) |
| 14 | + run.url(urlnew,proxies) |
| 15 | + if args.file: |
| 16 | + run.file(args.file,proxies) |
| 17 | + if args.vul: |
| 18 | + urlnew = springcheck.check(args.vul,proxies) |
| 19 | + vul.vul(urlnew,proxies) |
| 20 | + if args.dump: |
| 21 | + urlnew = springcheck.check(args.dump,proxies) |
| 22 | + run.dump(urlnew,proxies) |
| 23 | + if args.zoomeye: |
| 24 | + zoom.ZoomDowload(args.zoomeye,proxies) |
42 | 25 | else: |
43 | 26 | output.usage() |
44 | 27 | sys.exit() |
0 commit comments