def handle(parser): args = parser.parse_args() banner() check_update(args) config_parser() domains_dic = {} # asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) if args.debug: debug = True logger.set_level(CUSTOM_LOGGING.DEBUG) nomal = args.nomal if args.help: parser.print_help() elif args.domain: domain = check_domain(args.domain) if not domain: sys.exit(logger.error("Error domain: %s" % domain)) logger.sysinfo("Loading and checking domain %s." % args.domain) domains_dic[domain]=[domain] run(domains_dic,nomal) elif args.domain_file: if os.path.isdir(args.domain_file): domain_file_list = glob.glob(os.path.join(os.path.dirname(os.path.abspath(__file__)), "domain",'*.*')) for domain_file in domain_file_list: domains_dic[os.path.basename(domain_file)] = [] logger.sysinfo("Loading and checking domains of file %s." % args.domain_file) with open(domain_file, 'r') as f: for domain in f.readlines(): domain = check_domain(domain) if not domain: logger.error("Error domain: %s" % domain) continue domains_dic[os.path.basename(domain_file)].append(domain) run(domains_dic,nomal) elif os.path.isfile(args.domain_file): domains_dic[os.path.basename(args.domain_file)] = [] logger.sysinfo("Loading and checking domains of file %s." % args.domain_file) with open(args.domain_file, 'r') as f: for domain in f.readlines(): domain = check_domain(domain) if not domain: logger.error("Error domain: %s" % domain) continue domains_dic[os.path.basename(args.domain_file)].append(domain) run(domains_dic,nomal) else: logger.sysinfo("Error for domain file, please check the file %s." % args.domain_file) else: parser.print_help()
def init(): try: paths.GITHACK_ROOT_PATH = os.path.dirname(os.path.realpath(__file__)) banner() if len(sys.argv) < 2: usage() sys.exit(1) checkdepends() setPaths(sys.argv[-1]) initAgents() initDirs() start() except: raise
def handle(parser): args = parser.parse_args() banner() check_update(args) config_parser() # asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) if args.debug: logger.set_level(CUSTOM_LOGGING.DEBUG) if args.help: parser.print_help() elif args.domain: start(args.domain, args.scheduled_scan, args.vul_scan) elif args.domain_file: start(args.domain_file, args.scheduled_scan, args.vul_scan) else: parser.print_help()
def handle(parser): args = parser.parse_args() banner() check_update(args) config_parser() # asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) if args.debug: debug = True logger.set_level(CUSTOM_LOGGING.DEBUG) nomal = args.nomal if args.help: parser.print_help() elif args.domain: start(args.domain, nomal) elif args.domain_file: start(args.domain_file, nomal) else: parser.print_help()
cookie = get_flag_header(Injections.cookie) Injections.cookie = cookie Injections.place = "set" return Injections #什么都不设置的情况,直接返回原始url数据 #print Injections return Injections if __name__ == '__main__': """ 主函数解析xmlde的payloads,并多线程调用验证类 """ option_() banner() print '[*] Starting at {time_}'.format( time_=datetime.datetime.now().strftime('%H:%M:%S')) threads = [] for payload in Payload().parseXmlNode(): try: threads.append( threading.Thread(target=Verification, args=(payload, httpFormat()))) except Exception, e: pass for t in threads: t.start() for t in threads: