Какого хуя: import shodan SHODAN_API_KEY = tut kluch api = shodan.Shodan(SHODAN_API_KEY) try: results = api.search('tut moi zapros') #Show the results for result in results['matches']: print '%s' % result['ip_str'] except shodan.APIError, e: print 'Error: %s' %e Выдает: python search_ip.py File "search_ip.py", line 7 for result in results['matches']: ^ SyntaxError: invalid syntax
Kelphe, import shodan SHODAN_API_KEY = "tut kluch" api = shodan.Shodan(SHODAN_API_KEY) try: results = api.search('port:11211') #Show the results for result in results['matches']: print ('%s' % result['ip_str']) except shodan.APIError as e: print ('Error: %s' %e) Python import shodan SHODAN_API_KEY = "tut kluch" api = shodan.Shodan(SHODAN_API_KEY) try: results = api.search('port:11211') #Show the results for result in results['matches']: print ('%s' % result['ip_str']) except shodan.APIError as e: print ('Error: %s' %e)