Hello community,

here is the log from the commit of package python-shodan for openSUSE:Factory 
checked in at 2019-05-13 14:49:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-shodan (Old)
 and      /work/SRC/openSUSE:Factory/.python-shodan.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-shodan"

Mon May 13 14:49:31 2019 rev:12 rq:701018 version:1.13.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-shodan/python-shodan.changes      
2019-04-30 13:03:54.522068714 +0200
+++ /work/SRC/openSUSE:Factory/.python-shodan.new.5148/python-shodan.changes    
2019-05-13 14:49:31.942636436 +0200
@@ -1,0 +2,7 @@
+Fri May  3 18:23:49 UTC 2019 - Sebastian Wagner <[email protected]>
+
+- update to version 1.13.0:
+ * New command **shodan domain** to lookup a domain in Shodan's DNS database
+ * Override environment configured settings if explicit proxy settings are 
supplied (@cudeso)
+
+-------------------------------------------------------------------

Old:
----
  shodan-1.12.1.tar.gz

New:
----
  shodan-1.13.0.tar.gz

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

Other differences:
------------------
++++++ python-shodan.spec ++++++
--- /var/tmp/diff_new_pack.XCgqmq/_old  2019-05-13 14:49:32.406637606 +0200
+++ /var/tmp/diff_new_pack.XCgqmq/_new  2019-05-13 14:49:32.410637616 +0200
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %{!?license: %global license %doc}
 Name:           python-shodan
-Version:        1.12.1
+Version:        1.13.0
 Release:        0
 Summary:        Python library and command-line utility for Shodan
 License:        MIT

++++++ shodan-1.12.1.tar.gz -> shodan-1.13.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.12.1/CHANGELOG.md 
new/shodan-1.13.0/CHANGELOG.md
--- old/shodan-1.12.1/CHANGELOG.md      2019-04-11 22:37:54.000000000 +0200
+++ new/shodan-1.13.0/CHANGELOG.md      2019-05-03 00:32:10.000000000 +0200
@@ -1,6 +1,11 @@
 CHANGELOG
 =========
 
+1.13.0
+------
+* New command **shodan domain** to lookup a domain in Shodan's DNS database
+* Override environment configured settings if explicit proxy settings are 
supplied (@cudeso)
+
 1.12.1
 ------
 * Fix Excel file conversion that resulted in empty .xlsx files
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.12.1/PKG-INFO new/shodan-1.13.0/PKG-INFO
--- old/shodan-1.12.1/PKG-INFO  2019-04-11 22:39:24.000000000 +0200
+++ new/shodan-1.13.0/PKG-INFO  2019-05-03 00:35:47.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: shodan
-Version: 1.12.1
+Version: 1.13.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.12.1/setup.py new/shodan-1.13.0/setup.py
--- old/shodan-1.12.1/setup.py  2019-04-11 22:37:02.000000000 +0200
+++ new/shodan-1.13.0/setup.py  2019-05-03 00:30:28.000000000 +0200
@@ -7,7 +7,7 @@
 
 setup(
     name='shodan',
-    version='1.12.1',
+    version='1.13.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.12.1/shodan/__main__.py 
new/shodan-1.13.0/shodan/__main__.py
--- old/shodan-1.12.1/shodan/__main__.py        2019-02-11 01:22:17.000000000 
+0100
+++ new/shodan-1.13.0/shodan/__main__.py        2019-05-03 00:28:54.000000000 
+0200
@@ -125,6 +125,31 @@
         click.echo(click.style('\rSuccessfully created new file: 
{}'.format(filename), fg='green'))
 
 
[email protected](name='domain')
[email protected]('domain', metavar='<domain>')
+def domain_info(domain):
+    """View all available information for a domain"""
+    key = get_api_key()
+    api = shodan.Shodan(key)
+
+    try:
+        info = api.dns.domain_info(domain)
+    except shodan.APIError as e:
+        raise click.ClickException(e.value)
+
+    click.secho(info['domain'].upper(), fg='green')
+    
+    click.echo('')
+    for record in info['data']:
+        click.echo(
+            '{:32}  {:14}  {}'.format(
+                click.style(record['subdomain'], fg='cyan'),
+                click.style(record['type'], fg='yellow'),
+                record['value']
+            )
+        )
+
+
 @main.command()
 @click.argument('key', metavar='<api key>')
 def init(key):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.12.1/shodan/client.py 
new/shodan-1.13.0/shodan/client.py
--- old/shodan-1.12.1/shodan/client.py  2019-04-07 00:49:54.000000000 +0200
+++ new/shodan-1.13.0/shodan/client.py  2019-05-02 20:24:41.000000000 +0200
@@ -64,6 +64,16 @@
             """
             return self.parent._request('/shodan/data/{}'.format(dataset), {})
 
+    class Dns:
+
+        def __init__(self, parent):
+            self.parent = parent
+
+        def domain_info(self, domain):
+            """Grab the DNS information for a domain.
+            """
+            return self.parent._request('/dns/domain/{}'.format(domain), {})
+
     class Tools:
 
         def __init__(self, parent):
@@ -182,6 +192,7 @@
         self.base_url = 'https://api.shodan.io'
         self.base_exploits_url = 'https://exploits.shodan.io'
         self.data = self.Data(self)
+        self.dns = self.Dns(self)
         self.exploits = self.Exploits(self)
         self.labs = self.Labs(self)
         self.org = self.Organization(self)
@@ -190,6 +201,7 @@
         self._session = requests.Session()
         if proxies:
             self._session.proxies.update(proxies)
+            self._session.trust_env = False
 
     def _request(self, function, params, service='shodan', method='get'):
         """General-purpose function to create web requests to SHODAN.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.12.1/shodan.egg-info/PKG-INFO 
new/shodan-1.13.0/shodan.egg-info/PKG-INFO
--- old/shodan-1.12.1/shodan.egg-info/PKG-INFO  2019-04-11 22:39:24.000000000 
+0200
+++ new/shodan-1.13.0/shodan.egg-info/PKG-INFO  2019-05-03 00:35:47.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: shodan
-Version: 1.12.1
+Version: 1.13.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