checks.user_defined_os() # Check if defined "--check-tor" option. if menu.options.tor_check and not menu.options.tor: err_msg = "The '--check-tor' swich requires usage of switch '--tor'." print settings.print_critical_msg(err_msg) raise SystemExit() # Check if defined "--mobile" option. if menu.options.mobile: if (menu.options.agent != settings.DEFAULT_USER_AGENT) or menu.options.random_agent: err_msg = "The switch '--mobile' is incompatible with options '--user-agent', '--random-agent'." print settings.print_critical_msg(err_msg) raise SystemExit() else: menu.options.agent = menu.mobile_user_agents() if menu.options.wizard: if not menu.options.url: while True: question_msg = "Please enter full target URL (--url) > " sys.stdout.write(settings.print_question_msg(question_msg)) menu.options.url = sys.stdin.readline().replace("\n","") if len(menu.options.url) == 0: pass else: break if not menu.options.data: question_msg = "Please enter POST data (--data) [Enter for none] > " sys.stdout.write(settings.print_question_msg(question_msg)) menu.options.data = sys.stdin.readline().replace("\n","")
# Check if defined "--check-tor" option. if menu.options.tor_check and not menu.options.tor: err_msg = "The '--check-tor' swich requires usage of switch '--tor'." print(settings.print_critical_msg(err_msg)) raise SystemExit() # Check if defined "--mobile" option. if menu.options.mobile: if (menu.options.agent != settings.DEFAULT_USER_AGENT) or menu.options.random_agent: err_msg = "The switch '--mobile' is incompatible with options '--user-agent', '--random-agent'." print(settings.print_critical_msg(err_msg)) raise SystemExit() else: menu.options.agent = menu.mobile_user_agents() # Check if defined "--ignore-code" option. if menu.options.ignore_code and "," in menu.options.ignore_code: err_msg = "Ignoring more than one HTTP error code, is not yet supported." print(settings.print_critical_msg(err_msg)) raise SystemExit() if menu.options.wizard: if not menu.options.url: while True: question_msg = "Please enter full target URL (-u) > " # sys.stdout.write(settings.print_question_msg(question_msg)) # menu.options.url = sys.stdin.readline().replace("\n","") menu.options.url = _input( settings.print_question_msg(question_msg))