Hello community, here is the log from the commit of package python-shodan for openSUSE:Factory checked in at 2019-07-29 17:30:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-shodan (Old) and /work/SRC/openSUSE:Factory/.python-shodan.new.4126 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-shodan" Mon Jul 29 17:30:09 2019 rev:13 rq:719384 version:1.14.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-shodan/python-shodan.changes 2019-05-13 14:49:31.942636436 +0200 +++ /work/SRC/openSUSE:Factory/.python-shodan.new.4126/python-shodan.changes 2019-07-29 17:30:15.042216492 +0200 @@ -1,0 +2,7 @@ +Sun Jul 21 12:32:25 UTC 2019 - Sebastian Wagner <sebix+novell.com@sebix.at> + +- update to version 1.14.0: + - New command **shodan version** (#104). + - Only change api_key file permissions if needed (#103) + +------------------------------------------------------------------- Old: ---- shodan-1.13.0.tar.gz New: ---- shodan-1.14.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-shodan.spec ++++++ --- /var/tmp/diff_new_pack.S4tI0D/_old 2019-07-29 17:30:19.386214884 +0200 +++ /var/tmp/diff_new_pack.S4tI0D/_new 2019-07-29 17:30:19.390214883 +0200 @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %{!?license: %global license %doc} Name: python-shodan -Version: 1.13.0 +Version: 1.14.0 Release: 0 Summary: Python library and command-line utility for Shodan License: MIT ++++++ shodan-1.13.0.tar.gz -> shodan-1.14.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shodan-1.13.0/CHANGELOG.md new/shodan-1.14.0/CHANGELOG.md --- old/shodan-1.13.0/CHANGELOG.md 2019-05-03 00:32:10.000000000 +0200 +++ new/shodan-1.14.0/CHANGELOG.md 2019-07-20 03:14:01.000000000 +0200 @@ -1,6 +1,11 @@ CHANGELOG ========= +1.14.0 +---------- +* New command **shodan version** (#104). +* Only change api_key file permissions if needed (#103) + 1.13.0 ------ * New command **shodan domain** to lookup a domain in Shodan's DNS database diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shodan-1.13.0/PKG-INFO new/shodan-1.14.0/PKG-INFO --- old/shodan-1.13.0/PKG-INFO 2019-05-03 00:35:47.000000000 +0200 +++ new/shodan-1.14.0/PKG-INFO 2019-07-20 03:16:22.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: shodan -Version: 1.13.0 +Version: 1.14.0 Summary: Python library and command-line utility for Shodan (https://developer.shodan.io) Home-page: http://github.com/achillean/shodan-python/tree/master Author: John Matherly diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shodan-1.13.0/setup.py new/shodan-1.14.0/setup.py --- old/shodan-1.13.0/setup.py 2019-05-03 00:30:28.000000000 +0200 +++ new/shodan-1.14.0/setup.py 2019-07-20 03:14:06.000000000 +0200 @@ -7,7 +7,7 @@ setup( name='shodan', - version='1.13.0', + version='1.14.0', description='Python library and command-line utility for Shodan (https://developer.shodan.io)', long_description=README, long_description_content_type='text/x-rst', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shodan-1.13.0/shodan/__main__.py new/shodan-1.14.0/shodan/__main__.py --- old/shodan-1.13.0/shodan/__main__.py 2019-05-03 00:28:54.000000000 +0200 +++ new/shodan-1.14.0/shodan/__main__.py 2019-07-20 03:09:37.000000000 +0200 @@ -29,6 +29,7 @@ import csv import os import os.path +import pkg_resources import shodan import shodan.helpers as helpers import threading @@ -138,7 +139,7 @@ raise click.ClickException(e.value) click.secho(info['domain'].upper(), fg='green') - + click.echo('') for record in info['data']: click.echo( @@ -753,5 +754,11 @@ raise click.ClickException(u'{}'.format(e)) +@main.command() +def version(): + """Print version of this tool.""" + print(pkg_resources.get_distribution("shodan").version) + + if __name__ == '__main__': main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shodan-1.13.0/shodan/cli/helpers.py new/shodan-1.14.0/shodan/cli/helpers.py --- old/shodan-1.13.0/shodan/cli/helpers.py 2019-02-11 01:45:35.000000000 +0100 +++ new/shodan-1.14.0/shodan/cli/helpers.py 2019-07-20 03:09:37.000000000 +0200 @@ -27,7 +27,8 @@ raise click.ClickException('Please run "shodan init <api key>" before using this command') # Make sure it is a read-only file - os.chmod(keyfile, 0o600) + if not oct(os.stat(keyfile).st_mode).endswith("600"): + os.chmod(keyfile, 0o600) with open(keyfile, 'r') as fin: return fin.read().strip() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shodan-1.13.0/shodan/client.py new/shodan-1.14.0/shodan/client.py --- old/shodan-1.13.0/shodan/client.py 2019-05-02 20:24:41.000000000 +0200 +++ new/shodan-1.14.0/shodan/client.py 2019-07-20 03:09:37.000000000 +0200 @@ -443,7 +443,7 @@ :param minify: (optional) Whether to minify the banner and only return the important data :type minify: bool :param retries: (optional) How often to retry the search in case it times out - :type minify: int + :type retries: int :returns: A search cursor that can be used as an iterator/ generator. """ @@ -466,7 +466,7 @@ except Exception: # We've retried several times but it keeps failing, so lets error out if tries >= retries: - break + raise APIError('Retry limit reached ({:d})'.format(retries)) tries += 1 time.sleep(1.0) # wait 1 second if the search errored out for some reason diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shodan-1.13.0/shodan.egg-info/PKG-INFO new/shodan-1.14.0/shodan.egg-info/PKG-INFO --- old/shodan-1.13.0/shodan.egg-info/PKG-INFO 2019-05-03 00:35:47.000000000 +0200 +++ new/shodan-1.14.0/shodan.egg-info/PKG-INFO 2019-07-20 03:16:22.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: shodan -Version: 1.13.0 +Version: 1.14.0 Summary: Python library and command-line utility for Shodan (https://developer.shodan.io) Home-page: http://github.com/achillean/shodan-python/tree/master Author: John Matherly