Загрузка...

Python script not working for shodan api search

Thread in Python created by Kelphe May 3, 2020. 149 views

  1. Kelphe
    Kelphe Topic starter May 3, 2020 Banned 538 May 7, 2019
    Какого хуя:

    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
     
  2. oriole
    oriole May 3, 2020 был(а) давно
    если у тебя третий питон то
    print ('%s' % result['ip_str'])
     
    1. View previous comments (4)
    2. Kelphe Topic starter
      oriole, ну теперь ошибку в строке выше выдает
    3. oriole
      Kelphe,
      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)
    4. Kelphe Topic starter
      oriole, vse ponyal,teper rabotaet
Top
Loading...