Пример #1
0
def options():
    start_time = time.time()
    parser = argparse.ArgumentParser(description='Vxscan V2.0')
    parser.add_argument("-u",
                        "--url",
                        help='Start scanning url -u xxx.com or -u url1,url2')
    parser.add_argument("-f", "--file", help='read the url from the file')
    parser.add_argument("-s", "--save", help='save in dbfile')
    parser.add_argument("-i", "--inet", help='cidr eg. 1.1.1.1 or 1.1.1.0/24')
    args = parser.parse_args()
    if args.save:
        dbname = args.save
    else:
        dbname = 'result'
    if args.inet:
        inet(args.inet, dbname)
    if args.url:
        start_out(args.url)
        if ActiveCheck([args.url]).pool():
            start(args.url, dbname)
    if args.file:
        read_file(args.file, dbname)
    end_time = time.time()
    if args.file or args.url or args.inet:
        gener()
        print('\nrunning {0:.3f} seconds...'.format(end_time - start_time))
    else:
        print('No scan url, Please start scanning with -u or -f')
Пример #2
0
    def handle(self):  # 进行调度
        try:
            dbname = 'result'
            banner()
            print('-' * 43)
            usage()
            print('-' * 43)
            while True:
                show = input(Bcolors.RED + '[JR]>> ' + Bcolors.ENDC)  # 红色
                if show in ['1', 'Information_Scan']:
                    target = input(Bcolors.RED +
                                   '[JR/Information_Scan/Set_Target]>>' +
                                   Bcolors.ENDC)
                    lives = add(target)
                    for i in lives:
                        start(i, dbname)

                elif show in ['2', 'POC_Scan']:
                    poc_use()
                    while True:
                        command, keywords = input(Bcolors.RED +
                                                  '[JR/POC_Scan/]>>' +
                                                  Bcolors.ENDC).split()
                        if command == 'search' and keywords:
                            search(keywords)
                        elif command == "show" and keywords == 'poc':
                            show_poc()
                        elif command == 'use' and keywords:
                            target = input(Bcolors.RED +
                                           '[JR/POC_Scan/Set_Target]>>' +
                                           Bcolors.ENDC)
                            lives = add(target)
                            for live in lives:
                                for i in use(keywords, live):
                                    Sqldb(dbname).get_vuln(i, keywords)
                        elif command == 'back' and keywords == 'menu':
                            break
                        else:
                            print(Bcolors.WARNING + '[-] 提示: 输入错误...' +
                                  Bcolors.ENDC)

                elif show in ['3', 'AWVS_Check']:
                    awvs_check = awvs()
                    awvs_check.usage()
                    while True:
                        command = input(Bcolors.RED + '[JR/AWVS_Check/]>>' +
                                        Bcolors.ENDC)
                        if command == 'scan':
                            awvs_check.scan()
                        elif command == "stop":
                            awvs_check.stop()
                        elif command == 'delete':
                            awvs_check.delete()
                        elif command == 'view':
                            awvs_check.view()
                        elif command == 'back':
                            break
                        else:
                            print(Bcolors.WARNING + '[-] 提示: 输入错误...' +
                                  Bcolors.ENDC)

                elif show in ['4', 'H5_Create']:
                    gener()
                elif show in ['5', 'Help']:
                    usage()
                elif show in ['6', 'exit']:
                    break
                elif show == '':
                    pass
                else:
                    print(Bcolors.WARNING + '[-] 提示: 输入错误...' + Bcolors.ENDC)
        except KeyboardInterrupt as e:
            print(e)