#!/usr/bin/python
import shodan
import os

SHODAN_API_KEY = os.environ['SHODAN_API_KEY']
print(SHODAN_API_KEY)
shodan = shodan.Shodan(SHODAN_API_KEY)

try:
    results = shodan.search('nginx')
    print("Wyniki:", results.items())
except Exception as exception:
    print(str(exception))