Загрузка...

Python script not working for shodan api search

Thread in Python created by Kelphe May 3, 2020. 154 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 (1)
    2. oriole
      Kelphe, ты исправил ?
    3. Kelphe Topic starter
    4. oriole
      Kelphe, и не работает ?
    5. View the next comments (3)
Top
Loading...