Hello community,

here is the log from the commit of package python-shodan for openSUSE:Factory 
checked in at 2020-04-14 15:11:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-shodan (Old)
 and      /work/SRC/openSUSE:Factory/.python-shodan.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-shodan"

Tue Apr 14 15:11:22 2020 rev:22 rq:793756 version:1.23.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-shodan/python-shodan.changes      
2020-03-27 22:01:25.858937016 +0100
+++ /work/SRC/openSUSE:Factory/.python-shodan.new.2738/python-shodan.changes    
2020-04-14 16:32:42.000168764 +0200
@@ -1,0 +2,12 @@
+Tue Apr  7 07:07:18 UTC 2020 - Sebastian Wagner <[email protected]>
+
+- update to version 1.23.0:
+ - Add new CLI command: shodan alert domain
+
+-------------------------------------------------------------------
+Fri Mar 27 18:31:29 UTC 2020 - Sebastian Wagner <[email protected]>
+
+- update to version 1.22.1:
+ - vulns: Fix bug when converting data file to CSV using Python3
+
+-------------------------------------------------------------------

Old:
----
  shodan-1.22.0.tar.gz

New:
----
  shodan-1.23.0.tar.gz

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

Other differences:
------------------
++++++ python-shodan.spec ++++++
--- /var/tmp/diff_new_pack.mkvhZR/_old  2020-04-14 16:32:42.536169172 +0200
+++ /var/tmp/diff_new_pack.mkvhZR/_new  2020-04-14 16:32:42.540169175 +0200
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %{!?license: %global license %doc}
 Name:           python-shodan
-Version:        1.22.0
+Version:        1.23.0
 Release:        0
 Summary:        Python library and command-line utility for Shodan
 License:        MIT

++++++ shodan-1.22.0.tar.gz -> shodan-1.23.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.22.0/CHANGELOG.md 
new/shodan-1.23.0/CHANGELOG.md
--- old/shodan-1.22.0/CHANGELOG.md      2020-01-20 20:57:07.000000000 +0100
+++ new/shodan-1.23.0/CHANGELOG.md      2020-04-06 22:00:31.000000000 +0200
@@ -1,6 +1,18 @@
 CHANGELOG
 =========
 
+1.23.0
+------
+* Add new CLI command: shodan alert domain
+
+1.22.1
+------
+* Fix bug when converting data file to CSV using Python3
+
+1.22.0
+------
+* Add support for new vulnerability streaming endpoints
+
 1.21.3
 ------
 * Fix geo.json file converter
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.22.0/PKG-INFO new/shodan-1.23.0/PKG-INFO
--- old/shodan-1.22.0/PKG-INFO  2020-03-18 00:29:29.000000000 +0100
+++ new/shodan-1.23.0/PKG-INFO  2020-04-06 22:10:29.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: shodan
-Version: 1.22.0
+Version: 1.23.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.22.0/setup.py new/shodan-1.23.0/setup.py
--- old/shodan-1.22.0/setup.py  2020-03-18 00:07:11.000000000 +0100
+++ new/shodan-1.23.0/setup.py  2020-04-06 21:29:29.000000000 +0200
@@ -2,12 +2,14 @@
 
 from setuptools import setup
 
+
 DEPENDENCIES = open('requirements.txt', 'r').read().split('\n')
 README = open('README.rst', 'r').read()
 
+
 setup(
     name='shodan',
-    version='1.22.0',
+    version='1.23.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.22.0/shodan/cli/alert.py 
new/shodan-1.23.0/shodan/cli/alert.py
--- old/shodan-1.22.0/shodan/cli/alert.py       2019-02-24 10:31:35.000000000 
+0100
+++ new/shodan-1.23.0/shodan/cli/alert.py       2020-04-06 22:06:05.000000000 
+0200
@@ -46,6 +46,35 @@
     click.secho('Alert ID: {}'.format(alert['id']), fg='cyan')
 
 
[email protected](name='domain')
[email protected]('domain', metavar='<domain>', type=str)
[email protected]('--triggers', help='List of triggers to enable', 
default='malware,industrial_control_system,internet_scanner,iot,open_database,new_service,ssl_expired,vulnerable')
+def alert_domain(domain, triggers):
+    """Create a network alert based on a domain name"""
+    key = get_api_key()
+
+    api = shodan.Shodan(key)
+    try:
+        # Grab a list of IPs for the domain
+        domain = domain.lower()
+        click.secho('Looking up domain information...', dim=True)
+        info = api.dns.domain_info(domain, type='A')
+        domain_ips = set([record['value'] for record in info['data']])
+
+        # Create the actual alert
+        click.secho('Creating alert...', dim=True)
+        alert = api.create_alert('__domain: {}'.format(domain), 
list(domain_ips))
+
+        # Enable the triggers so it starts getting managed by Shodan Monitor
+        click.secho('Enabling triggers...', dim=True)
+        api.enable_alert_trigger(alert['id'], triggers)
+    except shodan.APIError as e:
+        raise click.ClickException(e.value)
+
+    click.secho('Successfully created domain alert!', fg='green')
+    click.secho('Alert ID: {}'.format(alert['id']), fg='cyan')
+
+
 @alert.command(name='info')
 @click.argument('alert', metavar='<alert id>')
 def alert_info(alert):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.22.0/shodan/cli/converter/csvc.py 
new/shodan-1.23.0/shodan/cli/converter/csvc.py
--- old/shodan-1.22.0/shodan/cli/converter/csvc.py      2019-02-11 
03:12:57.000000000 +0100
+++ new/shodan-1.23.0/shodan/cli/converter/csvc.py      2020-03-27 
18:11:51.000000000 +0100
@@ -54,7 +54,7 @@
             # The "vulns" property can't be nicely flattened as-is so we turn
             # it into a list before processing the banner.
             if 'vulns' in banner:
-                banner['vulns'] = banner['vulns'].keys()
+                banner['vulns'] = list(banner['vulns'].keys())  # Python3 
returns dict_keys so we neeed to cover that to a list
 
             try:
                 row = []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.22.0/shodan/cli/converter/geojson.py 
new/shodan-1.23.0/shodan/cli/converter/geojson.py
--- old/shodan-1.22.0/shodan/cli/converter/geojson.py   2020-01-20 
20:49:17.000000000 +0100
+++ new/shodan-1.23.0/shodan/cli/converter/geojson.py   2020-04-06 
22:06:15.000000000 +0200
@@ -48,5 +48,5 @@
                 },
             }
             self.fout.write(dumps(feature) + ',')
-        except Exception as e:
+        except Exception:
             pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.22.0/shodan.egg-info/PKG-INFO 
new/shodan-1.23.0/shodan.egg-info/PKG-INFO
--- old/shodan-1.22.0/shodan.egg-info/PKG-INFO  2020-03-18 00:29:29.000000000 
+0100
+++ new/shodan-1.23.0/shodan.egg-info/PKG-INFO  2020-04-06 22:10:29.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: shodan
-Version: 1.22.0
+Version: 1.23.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