def webscan_auto_dork(): print """ Enter Country Code: (Examples:tr,usa,ru,ca) """ country_code = raw_input(">>") try: COUNTRY_CODES[country_code.upper()] except KeyError: print "Invalid selection, please try again.\n" webscan_auto_dork() print """ Enter domain extension: (Example:gov,edu,org) """ extension = raw_input(">>") try: pass except KeyError: print "Invalid selection, please try again.\n" webscan_auto_dork() print """ Number of URLs to extract: """ number = int(raw_input(">>")) query = automatic_dork(country_code, extension) res = link_extract(query, number) res = 1 if res: time.sleep(5) main_menu() else: webscan_auto_dork()