Hello community,

here is the log from the commit of package python-shodan for openSUSE:Factory 
checked in at 2020-03-27 22:01:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-shodan (Old)
 and      /work/SRC/openSUSE:Factory/.python-shodan.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-shodan"

Fri Mar 27 22:01:17 2020 rev:21 rq:789033 version:1.22.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-shodan/python-shodan.changes      
2020-02-09 20:49:35.118915032 +0100
+++ /work/SRC/openSUSE:Factory/.python-shodan.new.3160/python-shodan.changes    
2020-03-27 22:01:25.858937016 +0100
@@ -1,0 +2,7 @@
+Fri Mar 27 10:45:45 UTC 2020 - [email protected]
+
+- version update to 1.22.0
+  * New Streaming API method: /shodan/vulns/{vulns} to subscribe to IPs
+    that are vulnerable to an issue
+
+-------------------------------------------------------------------

Old:
----
  shodan-1.21.3.tar.gz

New:
----
  shodan-1.22.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-shodan.spec ++++++
--- /var/tmp/diff_new_pack.7HaWki/_old  2020-03-27 22:01:28.514938561 +0100
+++ /var/tmp/diff_new_pack.7HaWki/_new  2020-03-27 22:01:28.526938568 +0100
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %{!?license: %global license %doc}
 Name:           python-shodan
-Version:        1.21.3
+Version:        1.22.0
 Release:        0
 Summary:        Python library and command-line utility for Shodan
 License:        MIT
@@ -77,7 +77,7 @@
 
 %files %{python_files}
 %doc AUTHORS README.rst
-%%license LICENSE
+%license LICENSE
 %python3_only %{_bindir}/shodan
 %{python_sitelib}/*
 %python3_only %{_mandir}/man1/shodan.1%{ext_man}

++++++ shodan-1.21.3.tar.gz -> shodan-1.22.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.21.3/PKG-INFO new/shodan-1.22.0/PKG-INFO
--- old/shodan-1.21.3/PKG-INFO  2020-01-20 21:22:45.000000000 +0100
+++ new/shodan-1.22.0/PKG-INFO  2020-03-18 00:29:29.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: shodan
-Version: 1.21.3
+Version: 1.22.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.21.3/docs/examples/gifcreator.rst 
new/shodan-1.22.0/docs/examples/gifcreator.rst
--- old/shodan-1.21.3/docs/examples/gifcreator.rst      2016-01-17 
04:32:15.000000000 +0100
+++ new/shodan-1.22.0/docs/examples/gifcreator.rst      2020-03-17 
23:24:35.000000000 +0100
@@ -106,7 +106,7 @@
                        os.system('rm -f /tmp/gif-image-*.jpg')
        
                        # Show a progress indicator
-                       print result['ip_str']
+                       print(result['ip_str'])
 
 
-The full code is also available on GitHub: 
https://gist.github.com/achillean/963eea552233d9550101
\ No newline at end of file
+The full code is also available on GitHub: 
https://gist.github.com/achillean/963eea552233d9550101
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.21.3/docs/examples/query-summary.rst 
new/shodan-1.22.0/docs/examples/query-summary.rst
--- old/shodan-1.21.3/docs/examples/query-summary.rst   2017-12-03 
06:42:17.000000000 +0100
+++ new/shodan-1.22.0/docs/examples/query-summary.rst   2020-03-17 
23:24:35.000000000 +0100
@@ -48,7 +48,7 @@
 
        # Input validation
        if len(sys.argv) == 1:
-           print 'Usage: %s <search query>' % sys.argv[0]
+           print('Usage: %s <search query>' % sys.argv[0])
            sys.exit(1)
 
        try:
@@ -62,22 +62,22 @@
            # And it also runs faster than doing a search().
            result = api.count(query, facets=FACETS)
            
-           print 'Shodan Summary Information'
-           print 'Query: %s' % query
-           print 'Total Results: %s\n' % result['total']
+           print('Shodan Summary Information')
+           print('Query: %s' % query)
+           print('Total Results: %s\n' % result['total'])
            
            # Print the summary info from the facets
            for facet in result['facets']:
-               print FACET_TITLES[facet]
+               print(FACET_TITLES[facet])
                
                for term in result['facets'][facet]:
-                   print '%s: %s' % (term['value'], term['count'])
+                   print('%s: %s' % (term['value'], term['count']))
 
                # Print an empty line between summary info
-               print ''
+               print('')
            
-       except Exception, e:
-           print 'Error: %s' % e
+       except Exception as e:
+           print('Error: %s' % e)
            sys.exit(1)
 
        """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.21.3/docs/tutorial.rst 
new/shodan-1.22.0/docs/tutorial.rst
--- old/shodan-1.21.3/docs/tutorial.rst 2018-03-16 22:31:41.000000000 +0100
+++ new/shodan-1.22.0/docs/tutorial.rst 2020-03-17 23:24:35.000000000 +0100
@@ -56,7 +56,7 @@
                        print('IP: {}'.format(result['ip_str']))
                        print(result['data'])
                        print('')
-       except shodan.APIError, e:
+       except shodan.APIError as e:
                print('Error: {}'.format(e))
 
 Stepping through the code, we first call the :py:func:`Shodan.search` method 
on the `api` object which
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.21.3/setup.py new/shodan-1.22.0/setup.py
--- old/shodan-1.21.3/setup.py  2020-01-20 20:55:55.000000000 +0100
+++ new/shodan-1.22.0/setup.py  2020-03-18 00:07:11.000000000 +0100
@@ -7,7 +7,7 @@
 
 setup(
     name='shodan',
-    version='1.21.3',
+    version='1.22.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.21.3/shodan/__main__.py 
new/shodan-1.22.0/shodan/__main__.py
--- old/shodan-1.21.3/shodan/__main__.py        2020-01-20 20:55:45.000000000 
+0100
+++ new/shodan-1.22.0/shodan/__main__.py        2020-03-18 00:28:27.000000000 
+0100
@@ -635,7 +635,8 @@
 @click.option('--alert', help='The network alert ID or "all" to subscribe to 
all network alerts on your account.', default=None, type=str)
 @click.option('--tags', help='A comma-separated list of tags to grab data 
on.', default=None, type=str)
 @click.option('--compresslevel', help='The gzip compression level (0-9; 0 = no 
compression, 9 = most compression', default=9, type=int)
-def stream(color, fields, separator, limit, datadir, ports, quiet, timeout, 
streamer, countries, asn, alert, tags, compresslevel):
[email protected]('--vulns', help='A comma-separated list of vulnerabilities to 
grab data on.', default=None, type=str)
+def stream(color, fields, separator, limit, datadir, ports, quiet, timeout, 
streamer, countries, asn, alert, tags, compresslevel, vulns):
     """Stream data in real-time."""
     # Setup the Shodan API
     key = get_api_key()
@@ -663,9 +664,11 @@
         stream_type.append('alert')
     if tags:
         stream_type.append('tags')
+    if vulns:
+        stream_type.append('vulns')
 
     if len(stream_type) > 1:
-        raise click.ClickException('Please use --ports, --countries, --tags OR 
--asn. You cant subscribe to multiple filtered streams at once.')
+        raise click.ClickException('Please use --ports, --countries, --tags, 
--vulns OR --asn. You cant subscribe to multiple filtered streams at once.')
 
     stream_args = None
 
@@ -689,6 +692,9 @@
     
     if tags:
         stream_args = tags.split(',')
+    
+    if vulns:
+        stream_args = vulns.split(',')
 
     # Flatten the list of stream types
     # Possible values are:
@@ -710,6 +716,7 @@
             'countries': api.stream.countries(args, timeout=timeout),
             'ports': api.stream.ports(args, timeout=timeout),
             'tags': api.stream.tags(args, timeout=timeout),
+            'vulns': api.stream.vulns(args, timeout=timeout),
         }.get(name, 'all')
 
     stream = _create_stream(stream_type, stream_args, timeout=timeout)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.21.3/shodan/cli/worldmap.py 
new/shodan-1.22.0/shodan/cli/worldmap.py
--- old/shodan-1.21.3/shodan/cli/worldmap.py    2019-02-11 01:44:09.000000000 
+0100
+++ new/shodan-1.22.0/shodan/cli/worldmap.py    2020-03-17 23:24:35.000000000 
+0100
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 '''
 F-Secure Virus World Map console edition
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.21.3/shodan/stream.py 
new/shodan-1.22.0/shodan/stream.py
--- old/shodan-1.21.3/shodan/stream.py  2019-09-21 19:00:41.000000000 +0200
+++ new/shodan-1.22.0/shodan/stream.py  2020-03-18 00:22:04.000000000 +0100
@@ -134,3 +134,14 @@
         stream = self._create_stream('/shodan/tags/%s' % ','.join(tags), 
timeout=timeout)
         for line in self._iter_stream(stream, raw):
             yield line
+
+    def vulns(self, vulns, raw=False, timeout=None):
+        """
+        A filtered version of the "banners" stream to only return banners that 
match the vulnerabilities of interest.
+
+        :param vulns: A list of vulns to return banner data on.
+        :type vulns: string[]
+        """
+        stream = self._create_stream('/shodan/vulns/%s' % ','.join(vulns), 
timeout=timeout)
+        for line in self._iter_stream(stream, raw):
+            yield line
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.21.3/shodan.egg-info/PKG-INFO 
new/shodan-1.22.0/shodan.egg-info/PKG-INFO
--- old/shodan-1.21.3/shodan.egg-info/PKG-INFO  2020-01-20 21:22:45.000000000 
+0100
+++ new/shodan-1.22.0/shodan.egg-info/PKG-INFO  2020-03-18 00:29:29.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: shodan
-Version: 1.21.3
+Version: 1.22.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


Reply via email to