def censys_auto_query(): print """ Enter Country Code: (Examples:TR,RU,USA,IT) """ country_code = raw_input(">>") try: COUNTRY_CODES[country_code.upper()] except KeyError: print "Invalid selection, please try again.\n" censys_auto_query() print """ Enter Protocol (Examples:ssh, ftp, telnet): """ protocol = raw_input(">>") try: censys_protocols[protocol] except KeyError: print "Invalid selection, please try again.\n" censys() query = query_constructor(country_code, protocol, 'censys') res = censys_search(query, protocol) if res: time.sleep(5) main_menu() else: censys()
def shodan_auto_query(): print """ Enter Country Code: (Examples:TR,RU,USA,IT) """ country_code = raw_input(">>") try: COUNTRY_CODES[country_code.upper()] except KeyError: print "Invalid selection, please try again.\n" shodan() print """ Enter Protocol (Examples:ssh, ftp, telnet, smb, rdp, mysql): """ protocol = raw_input(">>") try: shodan_protocols[protocol] except KeyError: print "Invalid selection, please try again.\n" shodan() query = query_constructor(country_code, protocol, 'shodan') res = shodan_search(query, protocol) if res: time.sleep(2) main_menu() else: shodan()