module documentation

Undocumented

Function api_request General-purpose function to create web requests to SHODAN.
Function create_facet_string Converts a Python list of facets into a comma-separated string that can be understood by the Shodan API.
Function get_ip Undocumented
Function get_screenshot Undocumented
Function humanize_bytes Return a humanized string representation of a number of bytes. >>> humanize_bytes(1) '1 byte' >>> humanize_bytes(1024) '1.0 kB' >>> humanize_bytes(1024*123) '123.0 kB' >>> humanize_bytes(1024*12342) '12...
Function iterate_files Loop over all the records of the provided Shodan output file(s).
Function open_file Undocumented
Function write_banner Undocumented
def api_request(key, function, params=None, data=None, base_url='https://api.shodan.io', method='get', retries=1, proxies=None): (source)

General-purpose function to create web requests to SHODAN. Arguments: function -- name of the function you want to execute params -- dictionary of parameters for the function proxies -- a proxies array for the requests library Returns A dictionary containing the function's results.

def create_facet_string(facets): (source)

Converts a Python list of facets into a comma-separated string that can be understood by the Shodan API.

def get_ip(banner): (source)

Undocumented

def get_screenshot(banner): (source)

Undocumented

def humanize_bytes(byte_count, precision=1): (source)

Return a humanized string representation of a number of bytes. >>> humanize_bytes(1) '1 byte' >>> humanize_bytes(1024) '1.0 kB' >>> humanize_bytes(1024*123) '123.0 kB' >>> humanize_bytes(1024*12342) '12.1 MB' >>> humanize_bytes(1024*12342,2) '12.05 MB' >>> humanize_bytes(1024*1234,2) '1.21 MB' >>> humanize_bytes(1024*1234*1111,2) '1.31 GB' >>> humanize_bytes(1024*1234*1111,1) '1.3 GB'

def iterate_files(files, fast=False): (source)

Loop over all the records of the provided Shodan output file(s).

def open_file(filename, mode='a', compresslevel=9): (source)

Undocumented

def write_banner(fout, banner): (source)

Undocumented