"would you like to continue" ) if not opt.runInBatch: is_sure = prompt( question_msg, opts="yN" ) else: is_sure = prompt( question_msg, opts="yN", default="y" ) if is_sure.lower().startswith("y"): pass else: shutdown() blackwidow.blackwidow_main(opt.spiderWebSite, agent=agent_to_use, proxy=proxy_to_use, verbose=opt.runInVerbose, forward=opt.forwardedForRandomIP) __run_attacks_main() # enumerate a file and run attacks on the URL's provided elif opt.fileToEnumerate is not None: logger.info(set_color( "found a total of {} URL's to enumerate in given file".format( len(open(opt.fileToEnumerate).readlines()) ) )) __run_attacks_main(log=opt.fileToEnumerate) else: logger.critical(set_color( "failed to provide a mandatory argument, you will be redirected to the help menu", level=50
err_msg = err_msg.format("") raise InvalidInputProvided( err_msg ) else: if URL_QUERY_REGEX.match(opt.spiderWebSite): is_sure = prompt( "it is recomened to not use a URL that has a GET(query) parameter in it, " "would you like to continue", "yN" ) if is_sure.lower().startswith("y"): pass else: shutdown() blackwidow.blackwidow_main(opt.spiderWebSite, agent=agent_to_use, proxy=proxy_to_use, verbose=opt.runInVerbose) urls_to_use = get_latest_log_file(SPIDER_LOG_PATH) if opt.runSqliScan or opt.runPortScan or opt.intelCheck or opt.adminPanelFinder or opt.runXssScan: with open(urls_to_use) as urls: for url in urls.readlines(): __run_attacks( url.strip(), sqlmap=opt.runSqliScan, nmap=opt.runPortScan, intel=opt.intelCheck, xss=opt.runXssScan, admin=opt.adminPanelFinder, given_path=opt.givenSearchPath, auto=opt.autoStartSqlmap, verbose=opt.runInVerbose, batch=opt.runInBatch ) elif opt.fileToEnumerate is not None: with open(opt.fileToEnumerate) as urls: if opt.runSqliScan or opt.runPortScan or opt.intelCheck or opt.adminPanelFinder or opt.runXssScan: