From b1036160265681d8ed8765ac4eb674f514073c71 Mon Sep 17 00:00:00 2001 From: sscottgvit Date: Tue, 8 Jan 2019 10:02:10 -0600 Subject: [PATCH 01/40] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 50e2692..d23eaa3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,10 @@ -# pyShodan +pyShodan (https://govanguard.io) +== +[![Build Status](https://travis-ci.com/GoVanguard/pyShodan.svg?branch=master)](https://travis-ci.com/GoVanguard/pyShodan) +[![Known Vulnerabilities](https://snyk.io/test/github/GoVanguard/pyShodan/badge.svg?targetFile=requirements.txt)](https://snyk.io/test/github/GoVanguard/pyShodan?targetFile=requirements.txt) +[![Maintainability](https://api.codeclimate.com/v1/badges/6b69cfa99c674d04e7a9/maintainability)](https://codeclimate.com/github/GoVanguard/pyShodan/maintainability) + +# About pyShodan Python 3 script for interacting with Shodan API. Has three modes of operation: making an API query for a search term, for a single IP address, or for a list of IP addresses in a .txt file. ## Installation From 65e16d9e6767dccaa0ac45e1868fad785e96c698 Mon Sep 17 00:00:00 2001 From: sscottgvit Date: Tue, 8 Jan 2019 10:08:47 -0600 Subject: [PATCH 02/40] Add requirements file --- requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..5177000 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +shodan==1.10.4 From 3510d7a28db5625865f3c028bf712049a1e1276e Mon Sep 17 00:00:00 2001 From: jchoy14 Date: Fri, 18 Jan 2019 15:03:32 -0500 Subject: [PATCH 03/40] Converted to library --- pyShodan/__init__.py | 80 +++++++++++++++++++++++++++++++++ pyShodan.py => pyShodan/test.py | 75 ++++++++++++------------------- requirements.txt | 2 +- setup.py | 23 ++++++++++ 4 files changed, 132 insertions(+), 48 deletions(-) create mode 100644 pyShodan/__init__.py rename pyShodan.py => pyShodan/test.py (56%) create mode 100644 setup.py diff --git a/pyShodan/__init__.py b/pyShodan/__init__.py new file mode 100644 index 0000000..a38243d --- /dev/null +++ b/pyShodan/__init__.py @@ -0,0 +1,80 @@ +##################################################################################### +# pyShodan: Python API Wrapper for Shodan # +# Copyright (c) 2019 GoVanguard # +##################################################################################### +# This file is part of pyShodan. # +# # +# pyShodan is free software: you can redistribute it and/or modify # +# it under the terms of the GNU Lesser General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# pyShodan is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Lesser General Public License for more details. # +# # +# You should have received a copy of the GNU Lesser General Public License # +# along with pyShodan. If not, see . # +##################################################################################### + +import shodan +import sys + +class pyShodan: + + #Constructor + def __init__(self, apiToken: str, debug=False): + self.__api = shodan.Shodan(apiToken) + self.__debug = debug + + def debug(self, val: bool): + self.__debug = val + + def searchTerm(self, searchStr: str): + api = self.__api + hostinfo = [] + # Wrap the request in a try/ except block to catch errors + # Search Shodan + results = api.search(searchStr) + + # Format the results into list + print('Results found: %s' % results['total']) + for result in results['matches']: + hostinfo.append([result['ip_str'].replace(","," "), result['data'].replace(","," ").encode("utf-8"),result['port']]) + + return hostinfo + + def searchIp(self, searchHost: str): + api = self.__api + try: + host = api.host(searchHost) + hostinfo = [] + + for item in host['data']: + hostinfo.append([item['ip_str'], item['org'], str(item['data'].replace(',',' ').strip('\t\n\r')), item['port']]) + + except shodan.APIError as e: + print("Error: %s" % e) + + return hostinfo + + def searchList(self, f: str): + api = self.__api + hostinfo = [] + + with open(f,'r') as dafile: + x = dafile.read().splitlines() + + for i in range(len(x)): + try: + time.sleep(2) + host = api.host(x[i]) + for item in host['data']: + hostinfo.append([item['ip_str'], item['org'], str(item['data']).replace(',',' ').strip('\r\n\t'), item['port']]) + except shodan.APIError as e: + print("Error: %s" % e) + if "no information available" in str(e).lower(): + print("No information is available for %s" % str(x[i])) + + return hostinfo diff --git a/pyShodan.py b/pyShodan/test.py similarity index 56% rename from pyShodan.py rename to pyShodan/test.py index 50d4e1b..871eb81 100644 --- a/pyShodan.py +++ b/pyShodan/test.py @@ -1,4 +1,24 @@ -import shodan +##################################################################################### +# pyShodan: Python API Wrapper for Shodan # +# Copyright (c) 2019 GoVanguard # +##################################################################################### +# This file is part of pyShodan. # +# # +# pyShodan is free software: you can redistribute it and/or modify # +# it under the terms of the GNU Lesser General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# pyShodan is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Lesser General Public License for more details. # +# # +# You should have received a copy of the GNU Lesser General Public License # +# along with pyShodan. If not, see . # +##################################################################################### + +from pyShodan import pyShodan import sys import argparse import csv @@ -6,25 +26,14 @@ import datetime def getApiKey(k): - SHODAN_API_KEY = k - api = shodan.Shodan(SHODAN_API_KEY) + api = k return api def searchTerm(s): searchStr = s api = getApiKey(args.apiKey) - hostinfo = [] - # Wrap the request in a try/ except block to catch errors - # Search Shodan - results = api.search(searchStr) - - # Show the results - print('Results found: %s' % results['total']) - for result in results['matches']: - print('IP: %s' % result['ip_str']) - print(result['data']) - print('') - hostinfo.append([result['ip_str'].replace(","," "), result['data'].replace(","," ").encode("utf-8"),result['port']]) + ps = pyShodan(api, False) + hostinfo = ps.searchTerm(searchStr) title = "shodanOutput-" + searchStr + ".csv" with open(title,"w") as csvfile: @@ -39,23 +48,10 @@ def searchTerm(s): def searchIp(d): searchHost = d api = getApiKey(args.apiKey) + ps = pyShodan(api, False) try: - host = api.host(searchHost) - # Print general info - print(""" - IP: %s - Organization: %s - Operating System: %s - """ % (host['ip_str'], host.get('org', 'n/a'), host.get('os', 'n/a'))) - - hostinfo = [] + hostinfo = ps.searchIp(searchHost) - for item in host['data']: - hostinfo.append([item['ip_str'], item['org'], str(item['data'].replace(',',' ').strip('\t\n\r')), item['port']]) - print(""" - Port: %s - Banner: %s - """ % (item['port'], item['data'])) title = "shodanOutput-" + searchHost + ".csv" with open(title,"w") as csvfile: header = ["Host IP", "FQDN", "Banner", "Ports"] @@ -70,25 +66,10 @@ def searchIp(d): def searchList(f): api = getApiKey(args.apiKey) - hostinfo = [] - + hostinfo = ps.searchList(f) with open(f,'r') as dafile: x = dafile.read().splitlines() - for i in range(len(x)): - try: - time.sleep(2) - host = api.host(x[i]) - for item in host['data']: - hostinfo.append([item['ip_str'], item['org'], str(item['data']).replace(',',' ').strip('\r\n\t'), item['port']]) - except shodan.APIError as e: - print("Error: %s" % e) - if "no information available" in str(e).lower(): - print("No information is available for %s" % str(x[i])) - - for i in range(len(hostinfo)): - print("\n" + str(hostinfo[i]) + "\n") - title = "shodanOutput-ipList-" + str(datetime.datetime.now()) + ".csv" with open(title,"w") as csvfile: header = ["Host IP", "FQDN", "Banner", "Ports"] @@ -100,7 +81,7 @@ def searchList(f): print(title + " created in script directory") if __name__ == "__main__": - parser = argparse.ArgumentParser(description="Python script for interacting with Shodan API") + parser = argparse.ArgumentParser(description="pyShodan test script") parser.add_argument("--search", "-s", action="store", type=str, dest="searchVal", help="Search Shodan for a general term") parser.add_argument("--ipaddr", "-ip", action="store", type=str, dest="ipSearch", help="Search Shodan for a specific IP address") diff --git a/requirements.txt b/requirements.txt index 5177000..2a13432 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -shodan==1.10.4 +shodan==1.10.4 \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..9b63e15 --- /dev/null +++ b/setup.py @@ -0,0 +1,23 @@ +import setuptools + +with open("README.md", "r") as fh: + long_description = fh.read() + +setuptools.setup( + name="pyShodan", + version="0.1.0", + author="Shane Scott", + author_email="sscott@gvit.com", + description="Python library for querying the Shodan API", + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/GoVanguard/pyShodan", + packages=['pyShodan'], + classifiers=( + 'Development Status :: 3 - Alpha', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)', + 'Programming Language :: Python :: 3.6', + 'Operating System :: OS Independent', + ), +) From c8c1c6eacbdd7cbdcff85d5452999f5e2bc5766e Mon Sep 17 00:00:00 2001 From: jchoy14 Date: Fri, 18 Jan 2019 16:41:28 -0500 Subject: [PATCH 04/40] Added comments --- pyShodan/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyShodan/__init__.py b/pyShodan/__init__.py index a38243d..dfd3d2e 100644 --- a/pyShodan/__init__.py +++ b/pyShodan/__init__.py @@ -31,6 +31,7 @@ def __init__(self, apiToken: str, debug=False): def debug(self, val: bool): self.__debug = val + #Search Shodan using a string query def searchTerm(self, searchStr: str): api = self.__api hostinfo = [] @@ -45,6 +46,7 @@ def searchTerm(self, searchStr: str): return hostinfo + #Search Shodan for an IP address def searchIp(self, searchHost: str): api = self.__api try: @@ -59,6 +61,7 @@ def searchIp(self, searchHost: str): return hostinfo + #Search Shodan for a list of IP addresses def searchList(self, f: str): api = self.__api hostinfo = [] From 1a7ada2a14d9ac56e6513d97f43accabb539535c Mon Sep 17 00:00:00 2001 From: jchoy14 <28782996+jchoy14@users.noreply.github.com> Date: Fri, 18 Jan 2019 16:49:21 -0500 Subject: [PATCH 05/40] Added comments --- pyShodan/test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyShodan/test.py b/pyShodan/test.py index 871eb81..f0b1845 100644 --- a/pyShodan/test.py +++ b/pyShodan/test.py @@ -25,10 +25,12 @@ import time import datetime +#Return API key def getApiKey(k): api = k return api +#Search Shodan for string query def searchTerm(s): searchStr = s api = getApiKey(args.apiKey) @@ -45,6 +47,7 @@ def searchTerm(s): print(title + " created in script directory") +#Search Shodan for specific IP address def searchIp(d): searchHost = d api = getApiKey(args.apiKey) @@ -64,6 +67,7 @@ def searchIp(d): except shodan.APIError as e: print("Error: %s" % e) +#Search Shodan for list of IP addresses def searchList(f): api = getApiKey(args.apiKey) hostinfo = ps.searchList(f) From 92842c1af8e4fe91f151b2a84d8d45ae62288d61 Mon Sep 17 00:00:00 2001 From: jchoy14 <28782996+jchoy14@users.noreply.github.com> Date: Thu, 24 Jan 2019 17:17:06 -0500 Subject: [PATCH 06/40] Fixed incorrect variable declaration in searchIp method --- LICENSE | 165 +++++++++++++++++++ packageIt.sh | 5 + pushPackage.sh | 3 + pyShodan/__init__.py | 5 +- pyShodan/__pycache__/__init__.cpython-36.pyc | Bin 0 -> 2164 bytes pyShodan/test.py | 4 - 6 files changed, 174 insertions(+), 8 deletions(-) create mode 100644 LICENSE create mode 100644 packageIt.sh create mode 100644 pushPackage.sh create mode 100644 pyShodan/__pycache__/__init__.cpython-36.pyc diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..65c5ca8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/packageIt.sh b/packageIt.sh new file mode 100644 index 0000000..2367beb --- /dev/null +++ b/packageIt.sh @@ -0,0 +1,5 @@ +#!/bin/bash +rm -Rf dist/ +rm -Rf build/ +rm -Rf pydradis3.egg-info/ +python3 setup.py sdist bdist_wheel diff --git a/pushPackage.sh b/pushPackage.sh new file mode 100644 index 0000000..d387a75 --- /dev/null +++ b/pushPackage.sh @@ -0,0 +1,3 @@ +#!/bin/bash +#twine upload --repository-url https://test.pypi.org/legacy/ dist/* +twine upload --repository-url https://upload.pypi.org/legacy/ dist/* diff --git a/pyShodan/__init__.py b/pyShodan/__init__.py index dfd3d2e..47162f6 100644 --- a/pyShodan/__init__.py +++ b/pyShodan/__init__.py @@ -31,7 +31,6 @@ def __init__(self, apiToken: str, debug=False): def debug(self, val: bool): self.__debug = val - #Search Shodan using a string query def searchTerm(self, searchStr: str): api = self.__api hostinfo = [] @@ -46,12 +45,11 @@ def searchTerm(self, searchStr: str): return hostinfo - #Search Shodan for an IP address def searchIp(self, searchHost: str): api = self.__api + hostinfo = [] try: host = api.host(searchHost) - hostinfo = [] for item in host['data']: hostinfo.append([item['ip_str'], item['org'], str(item['data'].replace(',',' ').strip('\t\n\r')), item['port']]) @@ -61,7 +59,6 @@ def searchIp(self, searchHost: str): return hostinfo - #Search Shodan for a list of IP addresses def searchList(self, f: str): api = self.__api hostinfo = [] diff --git a/pyShodan/__pycache__/__init__.cpython-36.pyc b/pyShodan/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..51c857b54c510903bf614e500e9992eb6b35642d GIT binary patch literal 2164 zcmZuyPjB2r6rZujUfbE-Zc?Zk0c9!lun4M3pi)&;RcI-+LMv#4609K0$xIS&9NV3l zlw{@YWqXDTN4@~xfseo^m@8a*xWansY7enGgy-RFe6Qzv#feM|=I1*{{(ZIrW*fpQ0$S_2_S zOgVwoE5hZ@FO<8SJ@;ZJJnn(z^VV|~`!E-P74itI7FbJQwRs1u0IV)p=XejSkT1ij z=S@%@Ki(^OTHGH{6QotPR_=>p8^gyBdk5NGXzBt8O-8h)Q(BY6sU46mC*X(<2h8}& zdW!wVqv<9y=Sc#dP4AS=#n$2Oz%@*Xd`IFj#hF|?1;5$9qGC^%I?dzOL8`a+gff0s zB}&Ve^n;hQZx~N?I`$6r&WAS)t4gT{zVsk+VBcQPc$LfwZTz&VM8QoQFFwakO!AxyMm$vetpW^$nDWCz3z<9 z&tYGz1+GtaehDYd!N)Lq&@A{rgR%hscx?gy(LI2hTDWgmxDj9=10;~35qy{h@B#j* z191COtPe}VF0+95*U365t}&whQENYvKT%s(| ze*M7ilCOa|Xf?FF3A((9VimIcBx_12TEnDBIn+#*XFAUccmzC|7Q4c@xhP_$vjY)(Di@-%31YKM z;^SwtO!iU39Fy;$!1OX+Uj88DAZoJg3XadSEcSW2ljXwDBSW*sCDylm7sadZ?5vW% z%9Oqh(+V@xrk&HK7a-*z`QRmh^rI{A^7rWb|9um1?{Glx4D2r4)Kl(t-$TEuG@uA;`qRA biqKWZ$`1UW2NT?CLb{D*Z2x8f4V-@gl{o41 literal 0 HcmV?d00001 diff --git a/pyShodan/test.py b/pyShodan/test.py index f0b1845..871eb81 100644 --- a/pyShodan/test.py +++ b/pyShodan/test.py @@ -25,12 +25,10 @@ import time import datetime -#Return API key def getApiKey(k): api = k return api -#Search Shodan for string query def searchTerm(s): searchStr = s api = getApiKey(args.apiKey) @@ -47,7 +45,6 @@ def searchTerm(s): print(title + " created in script directory") -#Search Shodan for specific IP address def searchIp(d): searchHost = d api = getApiKey(args.apiKey) @@ -67,7 +64,6 @@ def searchIp(d): except shodan.APIError as e: print("Error: %s" % e) -#Search Shodan for list of IP addresses def searchList(f): api = getApiKey(args.apiKey) hostinfo = ps.searchList(f) From 03bd75800da49569ca1f573840a36f153a6444fd Mon Sep 17 00:00:00 2001 From: jchoy14 <28782996+jchoy14@users.noreply.github.com> Date: Tue, 5 Feb 2019 14:17:58 -0500 Subject: [PATCH 07/40] Added comments --- pyShodan/__init__.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pyShodan/__init__.py b/pyShodan/__init__.py index 47162f6..18f0071 100644 --- a/pyShodan/__init__.py +++ b/pyShodan/__init__.py @@ -34,25 +34,27 @@ def debug(self, val: bool): def searchTerm(self, searchStr: str): api = self.__api hostinfo = [] - # Wrap the request in a try/ except block to catch errors - # Search Shodan + + # Search Shodan for this term results = api.search(searchStr) # Format the results into list print('Results found: %s' % results['total']) for result in results['matches']: - hostinfo.append([result['ip_str'].replace(","," "), result['data'].replace(","," ").encode("utf-8"),result['port']]) + hostinfo.append([result['ip_str'].replace(","," "), result['data'].replace(","," ").encode("utf-8"),result['port']]) # Store the results in a list return hostinfo def searchIp(self, searchHost: str): api = self.__api hostinfo = [] + + # Search Shodan for this IP address try: host = api.host(searchHost) for item in host['data']: - hostinfo.append([item['ip_str'], item['org'], str(item['data'].replace(',',' ').strip('\t\n\r')), item['port']]) + hostinfo.append([item['ip_str'], item['org'], str(item['data'].replace(',',' ').strip('\t\n\r')), item['port']]) # Store the results in a list except shodan.APIError as e: print("Error: %s" % e) @@ -62,16 +64,18 @@ def searchIp(self, searchHost: str): def searchList(self, f: str): api = self.__api hostinfo = [] - + + # Open the file containing a list of IP addresses with open(f,'r') as dafile: x = dafile.read().splitlines() + # Iterate through lines in the file for i in range(len(x)): try: time.sleep(2) - host = api.host(x[i]) + host = api.host(x[i]) # Search Shodan for the host on the current line in the file for item in host['data']: - hostinfo.append([item['ip_str'], item['org'], str(item['data']).replace(',',' ').strip('\r\n\t'), item['port']]) + hostinfo.append([item['ip_str'], item['org'], str(item['data']).replace(',',' ').strip('\r\n\t'), item['port']]) # Store the results in a list except shodan.APIError as e: print("Error: %s" % e) if "no information available" in str(e).lower(): From 7af7fd0e3df4cffaa234beb99ee7cd05d5f19ef7 Mon Sep 17 00:00:00 2001 From: jchoy14 <28782996+jchoy14@users.noreply.github.com> Date: Tue, 5 Feb 2019 15:05:09 -0500 Subject: [PATCH 08/40] Added missing import + bugfixes Fixed searchList method errors in test.py and condensed the one in __init__.py --- pyShodan/__init__.py | 7 ++----- pyShodan/test.py | 6 +++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/pyShodan/__init__.py b/pyShodan/__init__.py index 18f0071..5d6e210 100644 --- a/pyShodan/__init__.py +++ b/pyShodan/__init__.py @@ -20,6 +20,7 @@ import shodan import sys +import time class pyShodan: @@ -65,12 +66,8 @@ def searchList(self, f: str): api = self.__api hostinfo = [] - # Open the file containing a list of IP addresses - with open(f,'r') as dafile: - x = dafile.read().splitlines() - # Iterate through lines in the file - for i in range(len(x)): + for i in range(len(f.read().splitlines())): try: time.sleep(2) host = api.host(x[i]) # Search Shodan for the host on the current line in the file diff --git a/pyShodan/test.py b/pyShodan/test.py index 871eb81..b963471 100644 --- a/pyShodan/test.py +++ b/pyShodan/test.py @@ -66,11 +66,11 @@ def searchIp(d): def searchList(f): api = getApiKey(args.apiKey) + ps = pyShodan(api, False) hostinfo = ps.searchList(f) - with open(f,'r') as dafile: - x = dafile.read().splitlines() + d = datetime.datetime.today() - title = "shodanOutput-ipList-" + str(datetime.datetime.now()) + ".csv" + title = "shodanOutput-ipList_" + d.strftime("%d-%m-%Y_%H-%M-%S") + ".csv" with open(title,"w") as csvfile: header = ["Host IP", "FQDN", "Banner", "Ports"] writer = csv.writer(csvfile, delimiter=",") From ff9d858ed4fe1e5c1a7fbb148a64cabcdf2ffffe Mon Sep 17 00:00:00 2001 From: jchoy14 <28782996+jchoy14@users.noreply.github.com> Date: Tue, 5 Feb 2019 15:08:39 -0500 Subject: [PATCH 09/40] Cleanup --- pyShodan/__pycache__/__init__.cpython-36.pyc | Bin 2164 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 pyShodan/__pycache__/__init__.cpython-36.pyc diff --git a/pyShodan/__pycache__/__init__.cpython-36.pyc b/pyShodan/__pycache__/__init__.cpython-36.pyc deleted file mode 100644 index 51c857b54c510903bf614e500e9992eb6b35642d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2164 zcmZuyPjB2r6rZujUfbE-Zc?Zk0c9!lun4M3pi)&;RcI-+LMv#4609K0$xIS&9NV3l zlw{@YWqXDTN4@~xfseo^m@8a*xWansY7enGgy-RFe6Qzv#feM|=I1*{{(ZIrW*fpQ0$S_2_S zOgVwoE5hZ@FO<8SJ@;ZJJnn(z^VV|~`!E-P74itI7FbJQwRs1u0IV)p=XejSkT1ij z=S@%@Ki(^OTHGH{6QotPR_=>p8^gyBdk5NGXzBt8O-8h)Q(BY6sU46mC*X(<2h8}& zdW!wVqv<9y=Sc#dP4AS=#n$2Oz%@*Xd`IFj#hF|?1;5$9qGC^%I?dzOL8`a+gff0s zB}&Ve^n;hQZx~N?I`$6r&WAS)t4gT{zVsk+VBcQPc$LfwZTz&VM8QoQFFwakO!AxyMm$vetpW^$nDWCz3z<9 z&tYGz1+GtaehDYd!N)Lq&@A{rgR%hscx?gy(LI2hTDWgmxDj9=10;~35qy{h@B#j* z191COtPe}VF0+95*U365t}&whQENYvKT%s(| ze*M7ilCOa|Xf?FF3A((9VimIcBx_12TEnDBIn+#*XFAUccmzC|7Q4c@xhP_$vjY)(Di@-%31YKM z;^SwtO!iU39Fy;$!1OX+Uj88DAZoJg3XadSEcSW2ljXwDBSW*sCDylm7sadZ?5vW% z%9Oqh(+V@xrk&HK7a-*z`QRmh^rI{A^7rWb|9um1?{Glx4D2r4)Kl(t-$TEuG@uA;`qRA biqKWZ$`1UW2NT?CLb{D*Z2x8f4V-@gl{o41 From 9f3bfac3018a08ca54d7b415949e8491153c8c16 Mon Sep 17 00:00:00 2001 From: jchoy14 <28782996+jchoy14@users.noreply.github.com> Date: Tue, 5 Feb 2019 15:26:42 -0500 Subject: [PATCH 10/40] Cleaned up all methods and removed duplicate code --- pyShodan/test.py | 41 +++++++++++++---------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/pyShodan/test.py b/pyShodan/test.py index b963471..d1d0ae8 100644 --- a/pyShodan/test.py +++ b/pyShodan/test.py @@ -29,21 +29,22 @@ def getApiKey(k): api = k return api +def writeFile(t, h): + with open(t,"w") as csvfile: + header = ["Host IP", "FQDN", "Banner", "Ports"] + writer = csv.writer(csvfile, delimiter=",") + writer.writerow(header) + for i in range(len(h)): + writer.writerow(h[i]) + print(t + " created in script directory") + def searchTerm(s): searchStr = s api = getApiKey(args.apiKey) ps = pyShodan(api, False) hostinfo = ps.searchTerm(searchStr) - title = "shodanOutput-" + searchStr + ".csv" - with open(title,"w") as csvfile: - header = ["Host IP", "Banner","Ports"] - writer = csv.writer(csvfile, delimiter=",") - writer.writerow(header) - for i in range(len(hostinfo)): - writer.writerow(hostinfo[i]) - - print(title + " created in script directory") + writeFile(title, hostinfo) def searchIp(d): searchHost = d @@ -51,34 +52,18 @@ def searchIp(d): ps = pyShodan(api, False) try: hostinfo = ps.searchIp(searchHost) - title = "shodanOutput-" + searchHost + ".csv" - with open(title,"w") as csvfile: - header = ["Host IP", "FQDN", "Banner", "Ports"] - writer = csv.writer(csvfile, delimiter=",") - writer.writerow(header) - for i in range(len(hostinfo)): - writer.writerow(hostinfo[i]) - - print(title + " created in script directory") + writeFile(title, hostinfo) except shodan.APIError as e: print("Error: %s" % e) def searchList(f): api = getApiKey(args.apiKey) ps = pyShodan(api, False) - hostinfo = ps.searchList(f) d = datetime.datetime.today() - + hostinfo = ps.searchList(f) title = "shodanOutput-ipList_" + d.strftime("%d-%m-%Y_%H-%M-%S") + ".csv" - with open(title,"w") as csvfile: - header = ["Host IP", "FQDN", "Banner", "Ports"] - writer = csv.writer(csvfile, delimiter=",") - writer.writerow(header) - for i in range(len(hostinfo)): - writer.writerow(hostinfo[i]) - - print(title + " created in script directory") + writeFile(title, hostinfo) if __name__ == "__main__": parser = argparse.ArgumentParser(description="pyShodan test script") From 9e5bfe55888f8730a6919d6202be2f2566eb2b5a Mon Sep 17 00:00:00 2001 From: jchoy14 <28782996+jchoy14@users.noreply.github.com> Date: Tue, 12 Feb 2019 11:40:40 -0500 Subject: [PATCH 11/40] Pushed to PyPi (test) --- build/lib/pyShodan/__init__.py | 81 +++++++++++++++++++++++ build/lib/pyShodan/test.py | 86 +++++++++++++++++++++++++ dist/pyShodan-0.2.0-py3-none-any.whl | Bin 0 -> 7369 bytes dist/pyShodan-0.2.0.tar.gz | Bin 0 -> 3516 bytes packageIt.sh | 2 +- pyShodan.egg-info/PKG-INFO | 46 +++++++++++++ pyShodan.egg-info/SOURCES.txt | 8 +++ pyShodan.egg-info/dependency_links.txt | 1 + pyShodan.egg-info/top_level.txt | 1 + setup.py | 2 +- 10 files changed, 225 insertions(+), 2 deletions(-) create mode 100644 build/lib/pyShodan/__init__.py create mode 100644 build/lib/pyShodan/test.py create mode 100644 dist/pyShodan-0.2.0-py3-none-any.whl create mode 100644 dist/pyShodan-0.2.0.tar.gz create mode 100644 pyShodan.egg-info/PKG-INFO create mode 100644 pyShodan.egg-info/SOURCES.txt create mode 100644 pyShodan.egg-info/dependency_links.txt create mode 100644 pyShodan.egg-info/top_level.txt diff --git a/build/lib/pyShodan/__init__.py b/build/lib/pyShodan/__init__.py new file mode 100644 index 0000000..5d6e210 --- /dev/null +++ b/build/lib/pyShodan/__init__.py @@ -0,0 +1,81 @@ +##################################################################################### +# pyShodan: Python API Wrapper for Shodan # +# Copyright (c) 2019 GoVanguard # +##################################################################################### +# This file is part of pyShodan. # +# # +# pyShodan is free software: you can redistribute it and/or modify # +# it under the terms of the GNU Lesser General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# pyShodan is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Lesser General Public License for more details. # +# # +# You should have received a copy of the GNU Lesser General Public License # +# along with pyShodan. If not, see . # +##################################################################################### + +import shodan +import sys +import time + +class pyShodan: + + #Constructor + def __init__(self, apiToken: str, debug=False): + self.__api = shodan.Shodan(apiToken) + self.__debug = debug + + def debug(self, val: bool): + self.__debug = val + + def searchTerm(self, searchStr: str): + api = self.__api + hostinfo = [] + + # Search Shodan for this term + results = api.search(searchStr) + + # Format the results into list + print('Results found: %s' % results['total']) + for result in results['matches']: + hostinfo.append([result['ip_str'].replace(","," "), result['data'].replace(","," ").encode("utf-8"),result['port']]) # Store the results in a list + + return hostinfo + + def searchIp(self, searchHost: str): + api = self.__api + hostinfo = [] + + # Search Shodan for this IP address + try: + host = api.host(searchHost) + + for item in host['data']: + hostinfo.append([item['ip_str'], item['org'], str(item['data'].replace(',',' ').strip('\t\n\r')), item['port']]) # Store the results in a list + + except shodan.APIError as e: + print("Error: %s" % e) + + return hostinfo + + def searchList(self, f: str): + api = self.__api + hostinfo = [] + + # Iterate through lines in the file + for i in range(len(f.read().splitlines())): + try: + time.sleep(2) + host = api.host(x[i]) # Search Shodan for the host on the current line in the file + for item in host['data']: + hostinfo.append([item['ip_str'], item['org'], str(item['data']).replace(',',' ').strip('\r\n\t'), item['port']]) # Store the results in a list + except shodan.APIError as e: + print("Error: %s" % e) + if "no information available" in str(e).lower(): + print("No information is available for %s" % str(x[i])) + + return hostinfo diff --git a/build/lib/pyShodan/test.py b/build/lib/pyShodan/test.py new file mode 100644 index 0000000..d1d0ae8 --- /dev/null +++ b/build/lib/pyShodan/test.py @@ -0,0 +1,86 @@ +##################################################################################### +# pyShodan: Python API Wrapper for Shodan # +# Copyright (c) 2019 GoVanguard # +##################################################################################### +# This file is part of pyShodan. # +# # +# pyShodan is free software: you can redistribute it and/or modify # +# it under the terms of the GNU Lesser General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# pyShodan is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Lesser General Public License for more details. # +# # +# You should have received a copy of the GNU Lesser General Public License # +# along with pyShodan. If not, see . # +##################################################################################### + +from pyShodan import pyShodan +import sys +import argparse +import csv +import time +import datetime + +def getApiKey(k): + api = k + return api + +def writeFile(t, h): + with open(t,"w") as csvfile: + header = ["Host IP", "FQDN", "Banner", "Ports"] + writer = csv.writer(csvfile, delimiter=",") + writer.writerow(header) + for i in range(len(h)): + writer.writerow(h[i]) + print(t + " created in script directory") + +def searchTerm(s): + searchStr = s + api = getApiKey(args.apiKey) + ps = pyShodan(api, False) + hostinfo = ps.searchTerm(searchStr) + title = "shodanOutput-" + searchStr + ".csv" + writeFile(title, hostinfo) + +def searchIp(d): + searchHost = d + api = getApiKey(args.apiKey) + ps = pyShodan(api, False) + try: + hostinfo = ps.searchIp(searchHost) + title = "shodanOutput-" + searchHost + ".csv" + writeFile(title, hostinfo) + except shodan.APIError as e: + print("Error: %s" % e) + +def searchList(f): + api = getApiKey(args.apiKey) + ps = pyShodan(api, False) + d = datetime.datetime.today() + hostinfo = ps.searchList(f) + title = "shodanOutput-ipList_" + d.strftime("%d-%m-%Y_%H-%M-%S") + ".csv" + writeFile(title, hostinfo) + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description="pyShodan test script") + + parser.add_argument("--search", "-s", action="store", type=str, dest="searchVal", help="Search Shodan for a general term") + parser.add_argument("--ipaddr", "-ip", action="store", type=str, dest="ipSearch", help="Search Shodan for a specific IP address") + parser.add_argument("--iplist", action="store", dest="ipList", help="Search Shodan for every IP address in a txt file") + parser.add_argument("--api", "-api", action="store", type=str, dest="apiKey", required=True, help="Shodan API key") + args = parser.parse_args() + + if args.searchVal: + searchTerm(args.searchVal) + elif args.ipSearch: + searchIp(args.ipSearch) + elif args.ipList: + searchList(args.ipList) + elif args.apiKey: + getApiKey(apiKey) + else: + print("Invalid arguments, see -h for details. Example use: python pyShodan.py -s SearchTerm -ip IPAddress -api SHODAN-api-key") diff --git a/dist/pyShodan-0.2.0-py3-none-any.whl b/dist/pyShodan-0.2.0-py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..3e5b0af5096968c66a5f49a2bd950516746834c5 GIT binary patch literal 7369 zcmaKx1yEdD*0vi9?he5v4K%L75~Ok0;OQp>YBP3vR(ZxVr`#2>$2J z_s!gy`^|sPsa?Cysaj91s&n48_g=4>A`&tY002M(oacg7ir!V%nIQuJQ8)m=A8%cK zG;Lih&73(+OzfQPASNapu0Cx#PA-cAc#p=pPwQ*B@yOoivjOw19`8tdJ^%!{9c?7y z$)2%igUtC@;**V@?x>iCPUSN_s2@7%ef)ndiS;vZa*U3zw70y=|5O!`u8`&^6=cQB z1f7aolc*Dw#V(yxQ>Ni8U$pyCYgFc6cmt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_ut6-!OAuUw-T`kZEdmOogQJ39=fama9K&0AUr=9En< zlNece`!MNHZbr)3wCkjqG-OB(0PXX)mN4S%@;uFx(LkW8i14z!}cW5SiK&LgPU5n^w z0#%vc{ss7}Yt-&1dmQa}beIs6<+VNGOPX5m%b?pQbgX>;H2#!J5RNs!L*nAUm`xZ$(O*7LbHODn)~2qavg zX$~tG)zZw?K&!r_PRTaiHQcr_65ql+J(?DBXyKx~^H5cDLyuW#!F>;u^ZU`<*zskT z*V%>N$!-})d$S2_L3>is*`e~9a^%)e^tpUf`^MC5;y-~T8~O%dhU9|5SpZ;aof KET#D4>Hh%;yjr&a literal 0 HcmV?d00001 diff --git a/dist/pyShodan-0.2.0.tar.gz b/dist/pyShodan-0.2.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..319f94e1dc39f7a051833df5d663f27a1ec535b0 GIT binary patch literal 3516 zcmV;t4MXxDiwFqc^P z*AgGYA?LxF5t(4tpZGTQsx`A=)^=We3#b9?@9)cBfW=?=TyO3+YkT{R{U)@l*LQcD zFUa1DXMl(c8WOURNoFVagFukyfA8&^YWM8;eB=CYwOXtAzuRmz7x>@U+ikrdHO>ET z4)2(tHWjq`frZ@hy#vxP>sy60I%Nk$3CC7pUMt09tI&_8QyR_=NN*-4zDHbV7{WUl z`62l|V&Tm3#zagQi4l-aue((^@u#dB&@o`12odmuot?2GCehHe{OQgc{{!{L5e@B~ zblgq^=)(g*Lp?xd`9i3|Dw|TrJs_N8>3_zzjzBzHg;U339*05RpS?Xh|9G}lc+I#K zI)RWgP{@ffC&Ir?Mm8P4yj36xwA<^EKHEB;N7c4A4p?5h)!duV3^T>zD^;k%Uj_U}AWoY5v>;|T=BN!LS(k{cfGo<#I zNxDGx$4neME^CME_s9v^lzD=i;q?5! zir;?wEq#IIB$n%gUOrBnO{iXhDmU~60|X#AHnY{rCgvw?b_tRQ)lj9@-rW0X)m&b) z0I_)%C`(%Lcf}DSaDpZ*i<~gwi)xoc^`3+IN=pDkD9EuN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W%qyE>M8U5dbz#mHLP^9($89?2^MDYqDTnbNy%?!W zzIfeakhzEsreZWn4iF=r6ssv8jkp_Ldr$AI7b|gTa zc?_UkTsQ`x8s)CZKmM?S>b^L`_F}<`b^|N^0x^(RxQn?j5DIq`0@;sqLRFW5S~uWu z@%B|oRh6!jI&1#Dgtv|Kvr*}R&qAe2rtJe?g>r4b_M=b^*`vM*<$65)Nk}y>!*5yd qUm7%M(4aws1`QfCXwaZRg9Z&6G-%MEL4$_B3j7boTuO8RcmM!=a?85_ literal 0 HcmV?d00001 diff --git a/packageIt.sh b/packageIt.sh index 2367beb..d97bfa8 100644 --- a/packageIt.sh +++ b/packageIt.sh @@ -1,5 +1,5 @@ #!/bin/bash rm -Rf dist/ rm -Rf build/ -rm -Rf pydradis3.egg-info/ +rm -Rf pyShodan.egg-info/ python3 setup.py sdist bdist_wheel diff --git a/pyShodan.egg-info/PKG-INFO b/pyShodan.egg-info/PKG-INFO new file mode 100644 index 0000000..050c208 --- /dev/null +++ b/pyShodan.egg-info/PKG-INFO @@ -0,0 +1,46 @@ +Metadata-Version: 2.1 +Name: pyShodan +Version: 0.2.0 +Summary: Python library for querying the Shodan API +Home-page: https://github.com/GoVanguard/pyShodan +Author: Shane Scott +Author-email: sscott@gvit.com +License: UNKNOWN +Description: pyShodan (https://govanguard.io) + == + [![Build Status](https://travis-ci.com/GoVanguard/pyShodan.svg?branch=master)](https://travis-ci.com/GoVanguard/pyShodan) + [![Known Vulnerabilities](https://snyk.io/test/github/GoVanguard/pyShodan/badge.svg?targetFile=requirements.txt)](https://snyk.io/test/github/GoVanguard/pyShodan?targetFile=requirements.txt) + [![Maintainability](https://api.codeclimate.com/v1/badges/6b69cfa99c674d04e7a9/maintainability)](https://codeclimate.com/github/GoVanguard/pyShodan/maintainability) + + # About pyShodan + Python 3 script for interacting with Shodan API. Has three modes of operation: making an API query for a search term, for a single IP address, or for a list of IP addresses in a .txt file. + + ## Installation + ``` + git clone https://github.com/GoVanguard/pyShodan.git + ``` + + ## Recommended Python Version + Tested on Python 3.5+. + + ## Dependencies + * Shodan (pip3 install shodan) + + ## Usage + Short Form | Long Form | Description + ----------------- | -------------- |------------- + -h | --help | show this help message and exit + -s | --search | Search Shodan for a general term + -ip | --ipaddr | Search Shodan for a specific IP address + n/a | --iplist | Search Shodan for every IP address in a txt file + -api | --api | Shodan API key (required) + + Output is printed to stdout as well as CSV files in the script directory. + +Platform: UNKNOWN +Classifier: Development Status :: 3 - Alpha +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2) +Classifier: Programming Language :: Python :: 3.6 +Classifier: Operating System :: OS Independent +Description-Content-Type: text/markdown diff --git a/pyShodan.egg-info/SOURCES.txt b/pyShodan.egg-info/SOURCES.txt new file mode 100644 index 0000000..32d5214 --- /dev/null +++ b/pyShodan.egg-info/SOURCES.txt @@ -0,0 +1,8 @@ +README.md +setup.py +pyShodan/__init__.py +pyShodan/test.py +pyShodan.egg-info/PKG-INFO +pyShodan.egg-info/SOURCES.txt +pyShodan.egg-info/dependency_links.txt +pyShodan.egg-info/top_level.txt \ No newline at end of file diff --git a/pyShodan.egg-info/dependency_links.txt b/pyShodan.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/pyShodan.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/pyShodan.egg-info/top_level.txt b/pyShodan.egg-info/top_level.txt new file mode 100644 index 0000000..7c84cfa --- /dev/null +++ b/pyShodan.egg-info/top_level.txt @@ -0,0 +1 @@ +pyShodan diff --git a/setup.py b/setup.py index 9b63e15..876e693 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pyShodan", - version="0.1.0", + version="0.2.0", author="Shane Scott", author_email="sscott@gvit.com", description="Python library for querying the Shodan API", From 4bdaf3cda066a45bfbe449a3fdc430e0a628e905 Mon Sep 17 00:00:00 2001 From: jchoy14 <28782996+jchoy14@users.noreply.github.com> Date: Wed, 20 Feb 2019 11:03:46 -0500 Subject: [PATCH 12/40] Added gitignore --- .gitignore | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e4ee1c6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,92 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# OSX Stuff +.DS_Store + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# IPython Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# dotenv +.env + +# virtualenv +.venv/ +venv/ +ENV/ + +# Spyder project settings +.spyderproject + +# Rope project settings +.ropeproject \ No newline at end of file From 7b2bfb19cb5568bd63400ccd065d9d6772b588be Mon Sep 17 00:00:00 2001 From: jchoy14 <28782996+jchoy14@users.noreply.github.com> Date: Wed, 20 Feb 2019 11:06:46 -0500 Subject: [PATCH 13/40] gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e4ee1c6..a12fb62 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ __pycache__/ .Python env/ build/ +.build/ develop-eggs/ downloads/ eggs/ From d210171589af66ed626ebb90ded1291ba72e5c63 Mon Sep 17 00:00:00 2001 From: jchoy14 <28782996+jchoy14@users.noreply.github.com> Date: Wed, 20 Feb 2019 11:08:40 -0500 Subject: [PATCH 14/40] Fixed untracked files --- build/lib/pyShodan/__init__.py | 81 ------------------------ build/lib/pyShodan/test.py | 86 -------------------------- pyShodan.egg-info/PKG-INFO | 46 -------------- pyShodan.egg-info/SOURCES.txt | 8 --- pyShodan.egg-info/dependency_links.txt | 1 - pyShodan.egg-info/top_level.txt | 1 - 6 files changed, 223 deletions(-) delete mode 100644 build/lib/pyShodan/__init__.py delete mode 100644 build/lib/pyShodan/test.py delete mode 100644 pyShodan.egg-info/PKG-INFO delete mode 100644 pyShodan.egg-info/SOURCES.txt delete mode 100644 pyShodan.egg-info/dependency_links.txt delete mode 100644 pyShodan.egg-info/top_level.txt diff --git a/build/lib/pyShodan/__init__.py b/build/lib/pyShodan/__init__.py deleted file mode 100644 index 5d6e210..0000000 --- a/build/lib/pyShodan/__init__.py +++ /dev/null @@ -1,81 +0,0 @@ -##################################################################################### -# pyShodan: Python API Wrapper for Shodan # -# Copyright (c) 2019 GoVanguard # -##################################################################################### -# This file is part of pyShodan. # -# # -# pyShodan is free software: you can redistribute it and/or modify # -# it under the terms of the GNU Lesser General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# pyShodan is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU Lesser General Public License for more details. # -# # -# You should have received a copy of the GNU Lesser General Public License # -# along with pyShodan. If not, see . # -##################################################################################### - -import shodan -import sys -import time - -class pyShodan: - - #Constructor - def __init__(self, apiToken: str, debug=False): - self.__api = shodan.Shodan(apiToken) - self.__debug = debug - - def debug(self, val: bool): - self.__debug = val - - def searchTerm(self, searchStr: str): - api = self.__api - hostinfo = [] - - # Search Shodan for this term - results = api.search(searchStr) - - # Format the results into list - print('Results found: %s' % results['total']) - for result in results['matches']: - hostinfo.append([result['ip_str'].replace(","," "), result['data'].replace(","," ").encode("utf-8"),result['port']]) # Store the results in a list - - return hostinfo - - def searchIp(self, searchHost: str): - api = self.__api - hostinfo = [] - - # Search Shodan for this IP address - try: - host = api.host(searchHost) - - for item in host['data']: - hostinfo.append([item['ip_str'], item['org'], str(item['data'].replace(',',' ').strip('\t\n\r')), item['port']]) # Store the results in a list - - except shodan.APIError as e: - print("Error: %s" % e) - - return hostinfo - - def searchList(self, f: str): - api = self.__api - hostinfo = [] - - # Iterate through lines in the file - for i in range(len(f.read().splitlines())): - try: - time.sleep(2) - host = api.host(x[i]) # Search Shodan for the host on the current line in the file - for item in host['data']: - hostinfo.append([item['ip_str'], item['org'], str(item['data']).replace(',',' ').strip('\r\n\t'), item['port']]) # Store the results in a list - except shodan.APIError as e: - print("Error: %s" % e) - if "no information available" in str(e).lower(): - print("No information is available for %s" % str(x[i])) - - return hostinfo diff --git a/build/lib/pyShodan/test.py b/build/lib/pyShodan/test.py deleted file mode 100644 index d1d0ae8..0000000 --- a/build/lib/pyShodan/test.py +++ /dev/null @@ -1,86 +0,0 @@ -##################################################################################### -# pyShodan: Python API Wrapper for Shodan # -# Copyright (c) 2019 GoVanguard # -##################################################################################### -# This file is part of pyShodan. # -# # -# pyShodan is free software: you can redistribute it and/or modify # -# it under the terms of the GNU Lesser General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# pyShodan is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU Lesser General Public License for more details. # -# # -# You should have received a copy of the GNU Lesser General Public License # -# along with pyShodan. If not, see . # -##################################################################################### - -from pyShodan import pyShodan -import sys -import argparse -import csv -import time -import datetime - -def getApiKey(k): - api = k - return api - -def writeFile(t, h): - with open(t,"w") as csvfile: - header = ["Host IP", "FQDN", "Banner", "Ports"] - writer = csv.writer(csvfile, delimiter=",") - writer.writerow(header) - for i in range(len(h)): - writer.writerow(h[i]) - print(t + " created in script directory") - -def searchTerm(s): - searchStr = s - api = getApiKey(args.apiKey) - ps = pyShodan(api, False) - hostinfo = ps.searchTerm(searchStr) - title = "shodanOutput-" + searchStr + ".csv" - writeFile(title, hostinfo) - -def searchIp(d): - searchHost = d - api = getApiKey(args.apiKey) - ps = pyShodan(api, False) - try: - hostinfo = ps.searchIp(searchHost) - title = "shodanOutput-" + searchHost + ".csv" - writeFile(title, hostinfo) - except shodan.APIError as e: - print("Error: %s" % e) - -def searchList(f): - api = getApiKey(args.apiKey) - ps = pyShodan(api, False) - d = datetime.datetime.today() - hostinfo = ps.searchList(f) - title = "shodanOutput-ipList_" + d.strftime("%d-%m-%Y_%H-%M-%S") + ".csv" - writeFile(title, hostinfo) - -if __name__ == "__main__": - parser = argparse.ArgumentParser(description="pyShodan test script") - - parser.add_argument("--search", "-s", action="store", type=str, dest="searchVal", help="Search Shodan for a general term") - parser.add_argument("--ipaddr", "-ip", action="store", type=str, dest="ipSearch", help="Search Shodan for a specific IP address") - parser.add_argument("--iplist", action="store", dest="ipList", help="Search Shodan for every IP address in a txt file") - parser.add_argument("--api", "-api", action="store", type=str, dest="apiKey", required=True, help="Shodan API key") - args = parser.parse_args() - - if args.searchVal: - searchTerm(args.searchVal) - elif args.ipSearch: - searchIp(args.ipSearch) - elif args.ipList: - searchList(args.ipList) - elif args.apiKey: - getApiKey(apiKey) - else: - print("Invalid arguments, see -h for details. Example use: python pyShodan.py -s SearchTerm -ip IPAddress -api SHODAN-api-key") diff --git a/pyShodan.egg-info/PKG-INFO b/pyShodan.egg-info/PKG-INFO deleted file mode 100644 index 050c208..0000000 --- a/pyShodan.egg-info/PKG-INFO +++ /dev/null @@ -1,46 +0,0 @@ -Metadata-Version: 2.1 -Name: pyShodan -Version: 0.2.0 -Summary: Python library for querying the Shodan API -Home-page: https://github.com/GoVanguard/pyShodan -Author: Shane Scott -Author-email: sscott@gvit.com -License: UNKNOWN -Description: pyShodan (https://govanguard.io) - == - [![Build Status](https://travis-ci.com/GoVanguard/pyShodan.svg?branch=master)](https://travis-ci.com/GoVanguard/pyShodan) - [![Known Vulnerabilities](https://snyk.io/test/github/GoVanguard/pyShodan/badge.svg?targetFile=requirements.txt)](https://snyk.io/test/github/GoVanguard/pyShodan?targetFile=requirements.txt) - [![Maintainability](https://api.codeclimate.com/v1/badges/6b69cfa99c674d04e7a9/maintainability)](https://codeclimate.com/github/GoVanguard/pyShodan/maintainability) - - # About pyShodan - Python 3 script for interacting with Shodan API. Has three modes of operation: making an API query for a search term, for a single IP address, or for a list of IP addresses in a .txt file. - - ## Installation - ``` - git clone https://github.com/GoVanguard/pyShodan.git - ``` - - ## Recommended Python Version - Tested on Python 3.5+. - - ## Dependencies - * Shodan (pip3 install shodan) - - ## Usage - Short Form | Long Form | Description - ----------------- | -------------- |------------- - -h | --help | show this help message and exit - -s | --search | Search Shodan for a general term - -ip | --ipaddr | Search Shodan for a specific IP address - n/a | --iplist | Search Shodan for every IP address in a txt file - -api | --api | Shodan API key (required) - - Output is printed to stdout as well as CSV files in the script directory. - -Platform: UNKNOWN -Classifier: Development Status :: 3 - Alpha -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2) -Classifier: Programming Language :: Python :: 3.6 -Classifier: Operating System :: OS Independent -Description-Content-Type: text/markdown diff --git a/pyShodan.egg-info/SOURCES.txt b/pyShodan.egg-info/SOURCES.txt deleted file mode 100644 index 32d5214..0000000 --- a/pyShodan.egg-info/SOURCES.txt +++ /dev/null @@ -1,8 +0,0 @@ -README.md -setup.py -pyShodan/__init__.py -pyShodan/test.py -pyShodan.egg-info/PKG-INFO -pyShodan.egg-info/SOURCES.txt -pyShodan.egg-info/dependency_links.txt -pyShodan.egg-info/top_level.txt \ No newline at end of file diff --git a/pyShodan.egg-info/dependency_links.txt b/pyShodan.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/pyShodan.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/pyShodan.egg-info/top_level.txt b/pyShodan.egg-info/top_level.txt deleted file mode 100644 index 7c84cfa..0000000 --- a/pyShodan.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -pyShodan From c53877667b34504490b71ee50a2a383941f927b1 Mon Sep 17 00:00:00 2001 From: jchoy14 <28782996+jchoy14@users.noreply.github.com> Date: Wed, 20 Feb 2019 15:33:00 -0500 Subject: [PATCH 15/40] travis-ci --- .travis.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..845c19f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: python + +sudo: true + +python: + +- 3.6 + +install: + - pip install -r requirements.txt + - python setup.py install + +script: + - python ./pyShodan/test.py \ No newline at end of file From af804dba8565d0d43e01b9dbd244be530fdd818c Mon Sep 17 00:00:00 2001 From: jchoy14 <28782996+jchoy14@users.noreply.github.com> Date: Wed, 20 Feb 2019 15:34:30 -0500 Subject: [PATCH 16/40] travis-ci --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 845c19f..4f2de03 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,6 @@ python: install: - pip install -r requirements.txt - - python setup.py install script: - python ./pyShodan/test.py \ No newline at end of file From e680b2f8a5853eca6c5415e88efe7e131c3c848b Mon Sep 17 00:00:00 2001 From: jchoy14 <28782996+jchoy14@users.noreply.github.com> Date: Wed, 20 Feb 2019 15:51:10 -0500 Subject: [PATCH 17/40] travis-ci --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4f2de03..729cd77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,4 +10,4 @@ install: - pip install -r requirements.txt script: - - python ./pyShodan/test.py \ No newline at end of file + - python ./pyShodan/__init__.py \ No newline at end of file From 50d0bd8e6f3d311e0b8bbf95327fa833ba1b98af Mon Sep 17 00:00:00 2001 From: sscottgvit Date: Sun, 5 May 2019 19:53:46 -0500 Subject: [PATCH 18/40] Bug fixes --- .travis.yml | 2 +- dist/pyShodan-0.2.0-py3-none-any.whl | Bin 7369 -> 0 bytes dist/pyShodan-0.2.0.tar.gz | Bin 3516 -> 0 bytes dist/pyShodan-0.2.1-py3-none-any.whl | Bin 0 -> 6049 bytes dist/pyShodan-0.2.1.tar.gz | Bin 0 -> 3560 bytes pyShodan/__init__.py | 50 +++++++++++++++++++-------- requirements.txt | 2 +- setup.py | 6 ++-- 8 files changed, 40 insertions(+), 20 deletions(-) delete mode 100644 dist/pyShodan-0.2.0-py3-none-any.whl delete mode 100644 dist/pyShodan-0.2.0.tar.gz create mode 100644 dist/pyShodan-0.2.1-py3-none-any.whl create mode 100644 dist/pyShodan-0.2.1.tar.gz diff --git a/.travis.yml b/.travis.yml index 729cd77..7b4c334 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,4 +10,4 @@ install: - pip install -r requirements.txt script: - - python ./pyShodan/__init__.py \ No newline at end of file + - python ./pyShodan/__init__.py diff --git a/dist/pyShodan-0.2.0-py3-none-any.whl b/dist/pyShodan-0.2.0-py3-none-any.whl deleted file mode 100644 index 3e5b0af5096968c66a5f49a2bd950516746834c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7369 zcmaKx1yEdD*0vi9?he5v4K%L75~Ok0;OQp>YBP3vR(ZxVr`#2>$2J z_s!gy`^|sPsa?Cysaj91s&n48_g=4>A`&tY002M(oacg7ir!V%nIQuJQ8)m=A8%cK zG;Lih&73(+OzfQPASNapu0Cx#PA-cAc#p=pPwQ*B@yOoivjOw19`8tdJ^%!{9c?7y z$)2%igUtC@;**V@?x>iCPUSN_s2@7%ef)ndiS;vZa*U3zw70y=|5O!`u8`&^6=cQB z1f7aolc*Dw#V(yxQ>Ni8U$pyCYgFc6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&dw_ut6-!OAuUw-T`kZEdmOogQJ39=fama9K&0AUr=9En< zlNece`!MNHZbr)3wCkjqG-OB(0PXX)mN4S%@;uFx(LkW8i14z!}cW5SiK&LgPU5n^w z0#%vc{ss7}Yt-&1dmQa}beIs6<+VNGOPX5m%b?pQbgX>;H2#!J5RNs!L*nAUm`xZ$(O*7LbHODn)~2qavg zX$~tG)zZw?K&!r_PRTaiHQcr_65ql+J(?DBXyKx~^H5cDLyuW#!F>;u^ZU`<*zskT z*V%>N$!-})d$S2_L3>is*`e~9a^%)e^tpUf`^MC5;y-~T8~O%dhU9|5SpZ;aof KET#D4>Hh%;yjr&a diff --git a/dist/pyShodan-0.2.0.tar.gz b/dist/pyShodan-0.2.0.tar.gz deleted file mode 100644 index 319f94e1dc39f7a051833df5d663f27a1ec535b0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3516 zcmV;t4MXxDiwFqc^P z*AgGYA?LxF5t(4tpZGTQsx`A=)^=We3#b9?@9)cBfW=?=TyO3+YkT{R{U)@l*LQcD zFUa1DXMl(c8WOURNoFVagFukyfA8&^YWM8;eB=CYwOXtAzuRmz7x>@U+ikrdHO>ET z4)2(tHWjq`frZ@hy#vxP>sy60I%Nk$3CC7pUMt09tI&_8QyR_=NN*-4zDHbV7{WUl z`62l|V&Tm3#zagQi4l-aue((^@u#dB&@o`12odmuot?2GCehHe{OQgc{{!{L5e@B~ zblgq^=)(g*Lp?xd`9i3|Dw|TrJs_N8>3_zzjzBzHg;U339*05RpS?Xh|9G}lc+I#K zI)RWgP{@ffC&Ir?Mm8P4yj36xwA<^EKHEB;N7c4A4p?5h)!duV3^T>zD^;k%Uj_U}AWoY5v>;|T=BN!LS(k{cfGo<#I zNxDGx$4neME^CME_s9v^lzD=i;q?5! zir;?wEq#IIB$n%gUOrBnO{iXhDmU~60|X#AHnY{rCgvw?b_tRQ)lj9@-rW0X)m&b) z0I_)%C`(%Lcf}DSaDpZ*i<~gwi)xoc^`3+IN=pDk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ynrC4pW%qyE>M8U5dbz#mHLP^9($89?2^MDYqDTnbNy%?!W zzIfeakhzEsreZWn4iF=r6ssv8jkp_Ldr$AI7b|gTa zc?_UkTsQ`x8s)CZKmM?S>b^L`_F}<`b^|N^0x^(RxQn?j5DIq`0@;sqLRFW5S~uWu z@%B|oRh6!jI&1#Dgtv|Kvr*}R&qAe2rtJe?g>r4b_M=b^*`vM*<$65)Nk}y>!*5yd qUm7%M(4aws1`QfCXwaZRg9Z&6G-%MEL4$_B3j7boTuO8RcmM!=a?85_ diff --git a/dist/pyShodan-0.2.1-py3-none-any.whl b/dist/pyShodan-0.2.1-py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..59f8c84e1ac187d1167ca9dc995237b9ae45793f GIT binary patch literal 6049 zcmaKw1yodP*T;v389JntQo02N1!-`GVPF_akd_c>7)rWJx*O^4AqE6#L5J>;P)brM z0g;dUzTbVl*Z2GGIqO+xowL^dt+USF&;P&AhC^|1sQ~~0A%FtENR>3vAGZJ(0JuXA z0Q~XP!9(M@y_t!fpplW4ofXo^NWj5kQOCgki#WOWhR&;!s(7#s+Vj*r82e;O1mGh4<7vfo`k68|R z%q5C_`{T|lRpF4cmt>QB`}1_18Fa4&2S`NpBS=|_UGM};M59*v2S4FA;ZQqkR7i>3 z*TTEoB!jiq6!I$V)|BVq$&!|}P9j~iLut`nPPB${7_eql7vDKZ?is=?OAJngvqvz# zJ>SZG6hh{(#2Dk*z11xkBpaHn{S^;N=9Oldd6V)Yf~dan4zuj#p_7**Oz4d?zF6Q^ zU}1-JDybkR)#g(4Yl8fb?hl)rTeqT2kYY@WssiDgM0w6g;^X;qNalUWO<{&UkxT7k zsYX3Aq@U>5l-}4n+JZo8R$tZ=I)#ZgRcXq5n#qt_hosqk-ayq9;ZLN zPK|*i)i&}Te%nL>O@$|hA4FBkhmQ;ZP z7F*i5xItJ?>f1vR+677J3x@hTn~i0-J3?j;t^%yTlY}6Qy}A25YIBpM-XC=$=;wn< znn<42du$6Kz%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Hl&DaLt_4?y^BzkS3@Xxk3tjjgsAbBFEugJvgzcn zYEtni6>M*Zv8;wfv?b{zgbh~j&(4VOo;I~>Y-I1X2+jrFXI9s|&mO~8>j|vL{YHJ6 z_GD;Ue2nUz_tk-ep9#aC^e z^f@-VIYP=KsUJVhorXwAhX`-8W@ZD;vrv{|O0%+*enp*P4b}{ek$5W@NR224!>hMA zF^C-bCXU=r3%c+!xrJaimO6zHu?;-q=W4$hsgIQPoGw*;0OKlN4Mt(0M)YOzE>OHe zr8V(OyXu(?-KCsK$;SK5Sh|#Wtdh#-B|xxu|6yZf84}DJC+)*wwZRF8NoGi0xKwvn zaOD1It3Qm+d|BEl7O)P&t!`<51N5c6!iPh#u&HtW|1s%xX8(0u`TueG(>VS*H2o{# z{~AgBJ01YI@}IgMzy62tzXOWDM*m+e`mbnQ;IHWaGOphm_TQ<$cTc~l9mM}Y{aY{f zJM(vs{>7{${RigX9Q$|X??(NL`Qx9M|FZ4hS-+d>FIM99u;|Y`{MVQK(`tXm{l4FS e;owyNfcy9EhePr3{|F$wJ}s^VgPrD&yZ-^PT(#~1 literal 0 HcmV?d00001 diff --git a/dist/pyShodan-0.2.1.tar.gz b/dist/pyShodan-0.2.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..df91ea00ee23885ea3b97930a10e1a92f719e294 GIT binary patch literal 3560 zcmV2-PF&N>)>ATajPp8^z%B;`{xR`r_ znCR&Q{M&d`!|^K`iJ{j^A20uM`6_Z;n~b>0BX*T`<)L}&u$twpo4&zrr~d-7c-E{p zHyNj4{nsf68d&$O9g#=2IFlvU@i~#0& zH7SCoE+vB@F>O1fj8zGg%R1L#9C2rrFqY#%4YGqwfJw%RWxgN-56qzJiut7Fzy0=G z`V4d=mg|EiK2CiNs9uREKk7M!-XJYDwG)!YrY3E50n!JxP?ONy==`#J4Xz1tdp=MHOu4qz`#tU1<*a@cUS4hZN!~?JiK=>d;owo`13F9^z3efU93gQKS4@V!xJjAqcGmK4z z4QMUyhl`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setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pyShodan", - version="0.2.0", + version="0.2.1", author="Shane Scott", author_email="sscott@gvit.com", description="Python library for querying the Shodan API", @@ -14,9 +14,9 @@ url="https://github.com/GoVanguard/pyShodan", packages=['pyShodan'], classifiers=( - 'Development Status :: 3 - Alpha', + 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', - 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)', + 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 'Programming Language :: Python :: 3.6', 'Operating System :: OS Independent', ), From 72047927e8d2f9f4dbd6c71ef266367977f253b7 Mon Sep 17 00:00:00 2001 From: sscottgvit Date: Sun, 5 May 2019 20:10:14 -0500 Subject: [PATCH 19/40] Add IP class detection --- .gitignore | 5 ++++- pyShodan/__init__.py | 6 ++++++ requirements.txt | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a12fb62..1b4da88 100644 --- a/.gitignore +++ b/.gitignore @@ -90,4 +90,7 @@ ENV/ .spyderproject # Rope project settings -.ropeproject \ No newline at end of file +.ropeproject + +# local test +test.py diff --git a/pyShodan/__init__.py b/pyShodan/__init__.py index 8d8f539..493e547 100644 --- a/pyShodan/__init__.py +++ b/pyShodan/__init__.py @@ -21,6 +21,7 @@ import shodan import sys import time +from IPy import IP class PyShodan: @@ -63,6 +64,11 @@ def searchIp(self, searchHost: str): if not searchHost: return 'No search input' + searchHostIpType = IP(searchHost).iptype() + + if searchHostIpType != "PUBLIC": + return "Warning, {0} isn't public.. Shodan only tracks public IPs".format(searchHost) + hostinfo = [] # Search Shodan for this IP address diff --git a/requirements.txt b/requirements.txt index c708368..08cacc5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ shodan>=1.10.4 +IPy>=1.0.0 From 2d1462755c966d804b90fea61e2fa8e62bca59e8 Mon Sep 17 00:00:00 2001 From: sscottgvit Date: Tue, 7 May 2019 11:15:22 -0500 Subject: [PATCH 20/40] Minor fixes --- dist/pyShodan-0.2.1-py3-none-any.whl | Bin 6049 -> 0 bytes dist/pyShodan-0.2.1.tar.gz | Bin 3560 -> 0 bytes dist/pyShodan-0.2.2-py3-none-any.whl | Bin 0 -> 6195 bytes dist/pyShodan-0.2.2.tar.gz | Bin 0 -> 3704 bytes pyShodan/__init__.py | 31 ++++++++++++++++----------- setup.py | 2 +- 6 files changed, 20 insertions(+), 13 deletions(-) delete mode 100644 dist/pyShodan-0.2.1-py3-none-any.whl delete mode 100644 dist/pyShodan-0.2.1.tar.gz create mode 100644 dist/pyShodan-0.2.2-py3-none-any.whl create mode 100644 dist/pyShodan-0.2.2.tar.gz diff --git a/dist/pyShodan-0.2.1-py3-none-any.whl b/dist/pyShodan-0.2.1-py3-none-any.whl deleted file mode 100644 index 59f8c84e1ac187d1167ca9dc995237b9ae45793f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6049 zcmaKw1yodP*T;v389JntQo02N1!-`GVPF_akd_c>7)rWJx*O^4AqE6#L5J>;P)brM z0g;dUzTbVl*Z2GGIqO+xowL^dt+USF&;P&AhC^|1sQ~~0A%FtENR>3vAGZJ(0JuXA z0Q~XP!9(M@y_t!fpplW4ofXo^NWj5kQOCgki#WOWhR&;!s(7#s+Vj*r82e;O1mGh4<7vfo`k68|R z%q5C_`{T|lRpF4cmt>QB`}1_18Fa4&2S`NpBS=|_UGM};M59*v2S4FA;ZQqkR7i>3 z*TTEoB!jiq6!I$V)|BVq$&!|}P9j~iLut`nPPB${7_eql7vDKZ?is=?OAJngvqvz# zJ>SZG6hh{(#2Dk*z11xkBpaHn{S^;N=9Oldd6V)Yf~dan4zuj#p_7**Oz4d?zF6Q^ zU}1-JDybkR)#g(4Yl8fb?hl)rTeqT2kYY@WssiDgM0w6g;^X;qNalUWO<{&UkxT7k zsYX3Aq@U>5l-}4n+JZo8R$tZ=I)#ZgRcXq5n#qt_hosqk-ayq9;ZLN zPK|*i)i&}Te%nL>O@$|hA4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SSm;3s8Id25>s_R#uvbTIU3v7w;Jv%xAF4if7iD03_)*IP|l@`6-pL*tmh}551af zKc?<3Ff-^bqP)WXyQa+CWHLy-Hl&DaLt_4?y^BzkS3@Xxk3tjjgsAbBFEugJvgzcn zYEtni6>M*Zv8;wfv?b{zgbh~j&(4VOo;I~>Y-I1X2+jrFXI9s|&mO~8>j|vL{YHJ6 z_GD;Ue2nUz_tk-ep9#aC^e z^f@-VIYP=KsUJVhorXwAhX`-8W@ZD;vrv{|O0%+*enp*P4b}{ek$5W@NR224!>hMA zF^C-bCXU=r3%c+!xrJaimO6zHu?;-q=W4$hsgIQPoGw*;0OKlN4Mt(0M)YOzE>OHe zr8V(OyXu(?-KCsK$;SK5Sh|#Wtdh#-B|xxu|6yZf84}DJC+)*wwZRF8NoGi0xKwvn zaOD1It3Qm+d|BEl7O)P&t!`<51N5c6!iPh#u&HtW|1s%xX8(0u`TueG(>VS*H2o{# z{~AgBJ01YI@}IgMzy62tzXOWDM*m+e`mbnQ;IHWaGOphm_TQ<$cTc~l9mM}Y{aY{f zJM(vs{>7{${RigX9Q$|X??(NL`Qx9M|FZ4hS-+d>FIM99u;|Y`{MVQK(`tXm{l4FS e;owyNfcy9EhePr3{|F$wJ}s^VgPrD&yZ-^PT(#~1 diff --git a/dist/pyShodan-0.2.1.tar.gz b/dist/pyShodan-0.2.1.tar.gz deleted file mode 100644 index df91ea00ee23885ea3b97930a10e1a92f719e294..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3560 zcmV2-PF&N>)>ATajPp8^z%B;`{xR`r_ znCR&Q{M&d`!|^K`iJ{j^A20uM`6_Z;n~b>0BX*T`<)L}&u$twpo4&zrr~d-7c-E{p zHyNj4{nsf68d&$O9g#=2IFlvU@i~#0& zH7SCoE+vB@F>O1fj8zGg%R1L#9C2rrFqY#%4YGqwfJw%RWxgN-56qzJiut7Fzy0=G z`V4d=mg|EiK2CiNs9uREKk7M!-XJYDwG)!YrY3E50n!JxP?ON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Kx>$W!)q(xxoxc{e<=4 zAv{J(QAQ$$UZB|4RYPyjC$ldrcaPtm!vty%9>ZY|wQonID`r(MPB0|UNJ2!DYhya6 z!tJKUzc1h04k8i&`F}TV?-%x8*ImfZ+aJF1=Qi%23IDAl@$Yy9gu4*i`>Ojtg#YhP z{5kr+Rp`H>Q?Y(U|IN34tJi<0{$4!&qJnV$f%=zH>UZYv7X6DUdEblq<2(PB>0b={ zcjoUt{fim*Pt1S0_V29Uz4aH1>Aq3)KlA&;X@AH4e%ycIR*3!q_wU260YpXn8Gvy= NtnT#!O8oQb{{TA=3P1n= literal 0 HcmV?d00001 diff --git a/dist/pyShodan-0.2.2.tar.gz b/dist/pyShodan-0.2.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..4c6589d5f336bbac70cab2652b77bf89d1e4b1fc GIT binary patch literal 3704 zcmV-;4u|m{iwFp~T+mzs|72-%bT4puQ)q8wVQwujE;24ME_7jX0PS3RbKAHP_uu>! zIA%PedJ-+k4>fMpR&ne^bB?WAPBIyvM+cLT#4$zk2+)qE*YDn45PZp$Y$uM>%n_M8 zlXxtEeE_>Z0tyzRnQv3C*)lt3XKUkIq!y%Zw~K$<-Q8CHZ<03J+dF$Zt=+v&7xLRX z?e6vl+1+@C6mdaALN++Jd?8lXyRST%Nb>gwNkLKm!(ZMs2Pa3T&nf?%?bgnc{C7Lu zoek2eoi7 zA-t1`ACliA7A_obO2mwjxH;($2ijYI&YA(80@;}m0pH)+nmS?@U740Y-+JSJpx!j1 zp}m!M+K+&ExDQ0A2c(euDzC}r)N%JoERugsZybSCv}4C&9)}*@pZs!i`td}2&A1gh zfskWQ2oob6fPbTUH66dM5tVwq^zq`Si&v53+GHfCi1=mNRD|@#;Z4g~HGGrbO#caN z@vK>IPPt%V{SmF}`4Rl$`L`bV5V;-;>6PO;!eP0gaBp!9W`+omRf!q@2KMm_%EKqBI}3-$OoHQt}~~CNuJ!a zyg?v8E^{3&kakuGeK{VKpg70`gk+XX^931runfAc98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`)_Y|I+^{$T7bX*)^1n! z{~Rf~j)QU+zVC8P%YFw%Ps2gH?HQt+yWdu$6XvjAB zn+e%39_S63sqWVGbg6O~P_36|)?3af zuQs;gZxmyB|6ebBqfnHi5Qh9P7gV(fsC5mV7w=uvl9JkGTx6wRQ+UrvKPJ`Ie=e#u zvYPjNEy`E@+K)wfS`YeGly7kVry^Cm-q7mRUR9+kRjEo!@T#{U2&%$m3WcmM!lf;k`n literal 0 HcmV?d00001 diff --git a/pyShodan/__init__.py b/pyShodan/__init__.py index 493e547..ddb64df 100644 --- a/pyShodan/__init__.py +++ b/pyShodan/__init__.py @@ -38,26 +38,30 @@ def createSession(self): else: return 'Set API Key' - def searchTerm(self, searchStr: str): + def searchTerm(self, searchStr: str, allData = False): if not self.shodanSession: return 'Set API Key' if not searchHost: return 'No search input' - hostinfo = [] + hostResult = [] # Search Shodan for this term - results = self.shodanSession.search(searchStr) + apiResult = self.shodanSession.search(searchStr) # Format the results into list print('Results found: %s' % results['total']) - for result in results['matches']: - hostinfo.append([result['ip_str'].replace(","," "), result['data'].replace(","," ").encode("utf-8"),result['port']]) # Store the results in a list - return hostinfo + if allData == True: + hostResult = apiResult['matches'] + else: + for result in apiResult['matches']: + hostResult.append([result['ip_str'].replace(","," "), result['data'].replace(","," ").encode("utf-8"),result['port']]) # Store the results in a list - def searchIp(self, searchHost: str): + return hostResult + + def searchIp(self, searchHost: str, allData = False): if not self.shodanSession: return 'Set API Key' @@ -69,19 +73,22 @@ def searchIp(self, searchHost: str): if searchHostIpType != "PUBLIC": return "Warning, {0} isn't public.. Shodan only tracks public IPs".format(searchHost) - hostinfo = [] + hostResult = [] # Search Shodan for this IP address try: - host = self.shodanSession.host(searchHost) + apiResult = self.shodanSession.host(searchHost) - for item in host['data']: - hostinfo.append([item['ip_str'], item['org'], str(item['data'].replace(',',' ').strip('\t\n\r')), item['port']]) # Store the results in a list + if allData == True: + hostResult = apiResult + else: + for item in apiResult['data']: + hostResult.append([item['ip_str'], item['org'], str(item['data'].replace(',',' ').strip('\t\n\r')), item['port']]) # Store the results in a list except shodan.APIError as e: print("Error: %s" % e) - return hostinfo + return hostResult def searchList(self, inputFile: str): if not self.shodanSession: diff --git a/setup.py b/setup.py index feeaf9a..ed5986b 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pyShodan", - version="0.2.1", + version="0.2.2", author="Shane Scott", author_email="sscott@gvit.com", description="Python library for querying the Shodan API", From e72df4bdcfb94bc85987e741bea4f1770fc16d02 Mon Sep 17 00:00:00 2001 From: sscottgvit Date: Tue, 7 May 2019 14:14:31 -0500 Subject: [PATCH 21/40] Fix deps --- dist/pyShodan-0.2.2.tar.gz | Bin 3704 -> 0 bytes ...ny.whl => pyShodan-0.2.3-py3-none-any.whl} | Bin 6195 -> 6241 bytes dist/pyShodan-0.2.3.tar.gz | Bin 0 -> 3750 bytes setup.py | 3 ++- 4 files changed, 2 insertions(+), 1 deletion(-) delete mode 100644 dist/pyShodan-0.2.2.tar.gz rename dist/{pyShodan-0.2.2-py3-none-any.whl => pyShodan-0.2.3-py3-none-any.whl} (53%) create mode 100644 dist/pyShodan-0.2.3.tar.gz diff --git a/dist/pyShodan-0.2.2.tar.gz b/dist/pyShodan-0.2.2.tar.gz deleted file mode 100644 index 4c6589d5f336bbac70cab2652b77bf89d1e4b1fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3704 zcmV-;4u|m{iwFp~T+mzs|72-%bT4puQ)q8wVQwujE;24ME_7jX0PS3RbKAHP_uu>! zIA%PedJ-+k4>fMpR&ne^bB?WAPBIyvM+cLT#4$zk2+)qE*YDn45PZp$Y$uM>%n_M8 zlXxtEeE_>Z0tyzRnQv3C*)lt3XKUkIq!y%Zw~K$<-Q8CHZ<03J+dF$Zt=+v&7xLRX z?e6vl+1+@C6mdaALN++Jd?8lXyRST%Nb>gwNkLKm!(ZMs2Pa3T&nf?%?bgnc{C7Lu zoek2eoi7 zA-t1`ACliA7A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Q@r|LFAn*}>uH3&Q>f$N%W_7yW;D zYgPXLbELDw{_A&#=G@je6H#CW3$5%7ptgK5R9hV>YHO89dl$IVIW&h78|7sJh>>unu-433zk9+LDv$xw(=fB~(Er0)EXScfl z|E%&~iHh}l+V?}jesJ{bhd{lwJ1Ex=jc#enXcmG`UxZ#^Lv1}uwE~^emeHttP$(@$ zogR%gJsxFx5_IWlP^BkDlfDg#^p)t5_H<~`v+VzI5NJ)N&$$1$T0477=RfwKLbd-t zN4kJOZ;XN7r6%Zfd?ok!9+5A23mcwWS`{4pS^WP51lo8;`)_Y|I+^{$T7bX*)^1n! z{~Rf~j)QU+zVC8P%YFw%Ps2gH?HQt+yWdu$6XvjAB zn+e%39_S63sqWVGbg6O~P_36|)?3af zuQs;gZxmyB|6ebBqfnHi5Qh9P7gV(fsC5mV7w=uvl9JkGTx6wRQ+UrvKPJ`Ie=e#u zvYPjNEy`E@+K)wfS`YeGly7kVry^Cm-q7mRUR9+kRjEo!@T#{U2&%$m3WcmM!lf;k`n diff --git a/dist/pyShodan-0.2.2-py3-none-any.whl b/dist/pyShodan-0.2.3-py3-none-any.whl similarity index 53% rename from dist/pyShodan-0.2.2-py3-none-any.whl rename to dist/pyShodan-0.2.3-py3-none-any.whl index 33f5f3c5b741e1966e7043b0af84bc5916bb42ea..1ab130f37a3038c795a38a69cce7dfe6082a5ed4 100644 GIT binary patch delta 2277 zcmZ`*c{CL68XjBLK^ePDmJCAnbt24!grTzU*<~y<_GPkWO&Wsfo%8CdCm*l!v#9x}Sqr94-7m*X~;A%)S# z{YU*h-p{pG0vr7N2_pf0!_JPs>r)6Xi|`Oq1K`JRH&WB zGz)E##JbSds?Y|nfuwUF%_@}siNC!%i^rHP?=?}eMI8;4zR zXh|!`c?*`6Yb?S*-IA=bM!2PZetO5AiPR7&TP7hi=_E+IzuH9S1?0oS|UASQnGZsQ56jeJvWpNf- z<(@4oW9aV9y0DY-7HC_j4MF9YZ`hW4e-C4z=N=)3sZLPks^_X%fue_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)gR1tRnJPFy7I1(K6I|Feym(; zWHldns+_O-tq+y+v>x?LIp5&nN6M;py`j~sJ*`Srs#2AzRHZ6asY+F Date: Mon, 28 Sep 2020 12:53:15 -0400 Subject: [PATCH 22/40] Updated broken import --- pyShodan/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyShodan/test.py b/pyShodan/test.py index d1d0ae8..e6b913c 100644 --- a/pyShodan/test.py +++ b/pyShodan/test.py @@ -18,7 +18,7 @@ # along with pyShodan. If not, see . # ##################################################################################### -from pyShodan import pyShodan +from pyShodan import PyShodan import sys import argparse import csv From a4a02d88b37b934b6f09049bbfad810290f5ffc9 Mon Sep 17 00:00:00 2001 From: jchoy14 <28782996+jchoy14@users.noreply.github.com> Date: Fri, 9 Oct 2020 17:31:19 -0400 Subject: [PATCH 23/40] Updated test script --- pyShodan/test.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pyShodan/test.py b/pyShodan/test.py index e6b913c..0665870 100644 --- a/pyShodan/test.py +++ b/pyShodan/test.py @@ -41,7 +41,9 @@ def writeFile(t, h): def searchTerm(s): searchStr = s api = getApiKey(args.apiKey) - ps = pyShodan(api, False) + ps = PyShodan() + ps.apiKey = api + ps.createSession() hostinfo = ps.searchTerm(searchStr) title = "shodanOutput-" + searchStr + ".csv" writeFile(title, hostinfo) @@ -49,7 +51,9 @@ def searchTerm(s): def searchIp(d): searchHost = d api = getApiKey(args.apiKey) - ps = pyShodan(api, False) + ps = PyShodan() + ps.apiKey = api + ps.createSession() try: hostinfo = ps.searchIp(searchHost) title = "shodanOutput-" + searchHost + ".csv" @@ -59,7 +63,9 @@ def searchIp(d): def searchList(f): api = getApiKey(args.apiKey) - ps = pyShodan(api, False) + ps = PyShodan() + ps.apiKey = api + ps.createSession() d = datetime.datetime.today() hostinfo = ps.searchList(f) title = "shodanOutput-ipList_" + d.strftime("%d-%m-%Y_%H-%M-%S") + ".csv" From 7502ea01895dea33e8d1259bcc38ad9760983651 Mon Sep 17 00:00:00 2001 From: Tdeforge <75676514+Tdeforge@users.noreply.github.com> Date: Fri, 11 Dec 2020 05:13:31 -0800 Subject: [PATCH 24/40] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d23eaa3..7f0518a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ pyShodan (https://govanguard.io) [![Maintainability](https://api.codeclimate.com/v1/badges/6b69cfa99c674d04e7a9/maintainability)](https://codeclimate.com/github/GoVanguard/pyShodan/maintainability) # About pyShodan -Python 3 script for interacting with Shodan API. Has three modes of operation: making an API query for a search term, for a single IP address, or for a list of IP addresses in a .txt file. +Python 3 script for interacting with Shodan API. Has three modes of operation: making an API query for a search term, a single IP address, or for a list of IP addresses in a .txt file. ## Installation ``` From dcd3358c8963a8d6b8e0ca80144a1d7f07e0592e Mon Sep 17 00:00:00 2001 From: jchoy14 <28782996+jchoy14@users.noreply.github.com> Date: Fri, 15 Jan 2021 13:58:17 -0500 Subject: [PATCH 25/40] Fixed searchList function --- pyShodan/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyShodan/__init__.py b/pyShodan/__init__.py index ddb64df..5100b03 100644 --- a/pyShodan/__init__.py +++ b/pyShodan/__init__.py @@ -95,12 +95,14 @@ def searchList(self, inputFile: str): return 'Set API Key' if not inputFile: - return 'No inout file' + return 'No input file' hostinfo = [] + with open(inputFile,'r') as f: + x = f.read().splitlines() # Iterate through lines in the file - for i in range(len(inputFile.read().splitlines())): + for i in range(len(x)): try: time.sleep(2) host = self.shodanSession.host(x[i]) # Search Shodan for the host on the current line in the file From 709a81e6da6ba386a3ddbec2855658103bc1fd82 Mon Sep 17 00:00:00 2001 From: sscottgvit Date: Wed, 2 Jun 2021 13:30:25 -0500 Subject: [PATCH 26/40] Update to 0.2.4 --- README.md | 9 --------- dist/pyShodan-0.2.3-py3-none-any.whl | Bin 6241 -> 0 bytes dist/pyShodan-0.2.3.tar.gz | Bin 3750 -> 0 bytes dist/pyShodan-0.2.4-py3-none-any.whl | Bin 0 -> 6001 bytes dist/pyShodan-0.2.4.tar.gz | Bin 0 -> 6075 bytes requirements.txt | 4 ++-- setup.py | 4 ++-- 7 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 dist/pyShodan-0.2.3-py3-none-any.whl delete mode 100644 dist/pyShodan-0.2.3.tar.gz create mode 100644 dist/pyShodan-0.2.4-py3-none-any.whl create mode 100644 dist/pyShodan-0.2.4.tar.gz diff --git a/README.md b/README.md index 7f0518a..5021398 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,4 @@ Tested on Python 3.5+. ## Dependencies * Shodan (pip3 install shodan) -## Usage -Short Form | Long Form | Description ------------------ | -------------- |------------- --h | --help | show this help message and exit --s | --search | Search Shodan for a general term --ip | --ipaddr | Search Shodan for a specific IP address -n/a | --iplist | Search Shodan for every IP address in a txt file --api | --api | Shodan API key (required) - Output is printed to stdout as well as CSV files in the script directory. diff --git a/dist/pyShodan-0.2.3-py3-none-any.whl b/dist/pyShodan-0.2.3-py3-none-any.whl deleted file mode 100644 index 1ab130f37a3038c795a38a69cce7dfe6082a5ed4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6241 zcmaKw2Q*ym*2neUyA(Zo??Q+e45Lo;Hi#NMM(=_QB8WQ3Afop$dWjyrcL~vDL?^n> zd++z&yf^pW_nh^tv(8y-|JFY1?C1aAXKR5lv8d3{(D2Z-xbig42`@z@u+h+t$OfIU$@vHEs!DS_b^*c3H zOu(1H@ftKja4H~oq0n~gZh?exO@=6suzBCBdpcZq+)m^_sGl=cX6W@S9M7nGJ)Y}cyU{w?SY$iQA?Gx} znUfn+4bY=gpY+4O=Hhsn7|<1FIM2rT`0C2h(^o?<=VzN@MP1Dn zBW`r>tUt+0tO#8jRMZ$NKZQ1jUQNJuJoZpT_2^!uAQbQT>^d^~>xXsNh#=y7e$mf{ z$p&@|`##7W`F4gl7!^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txgmkJ?_lyK5j5F}W?#Se@g^sHMatL$WO3R0Ye#n*{BTA>Y}^-W<>40iwNrzN80v zFDCx=qVTK?`%8zJ@)w)TwJ4aM>pr($UJC>zYNZ#OzZ09~bx!mgu z(~|du3U$V>(9f(il2t3ClEr*PZE@1|=sZQYHtScR+p1!v^>;jCSyU~l0jFz!C2Ngt zA%sk`noNENPmN#TSzSIT=~b->|5&Yo^+s=Aul*eV9Q+*B8VwELOZDnW1>J2$-6tz3 zm2sqsk_O1*rLd0gq>$MpoAi--P_9<;HmVkUo7=}pH;GcP%^J`h2{kTG@EJyqExck{ z2R1>p9MkV8)C-QK7t0Hz@iYpP$u#?^1-kDA(6{aOd@k?ytSFBxTFDaeDOiQ4 zs>~L(DR%>zHG{BlN7jCT{}u;9zx@2?$>H%qb^h~r!GC>i#90pU_B>rv_~!i2-~T$? z**j<-wGXQL|8um;v{&|jtNwq38=+rz{}c5eKDR6VukL?V_dl!qpVj@(>i%bS|FgRP zS+(CJ{!=FE*W`Uq&j0q?rT7m5z~d_Zdyb}d<$L{QWeF<%U!(tntB==b=Yy|M|3~$| z-99PS{|@%sM~9XEKS$G1{q=eG&4+Vq<{E;>$=sSRjdf>%jq(L?V{^s8*eXoM(@KrT zc8|2?bsWxzKBi`0BeIqLe?xLU?*Gg69|!;{|NpG~ue^Vy|DgY=8~B!UJfi>mC;Nw) z{FZd?_c#oFVHnvFXERL)@TUkO`I9(fb(t~(*s4~w zs#UFORjXRns#dkCRjq1Ot6J5nR<){Ct!h=PTGgsnwW?LEYX3jl{{iQhyvzWg002Qr BwlDwy literal 0 HcmV?d00001 diff --git a/requirements.txt b/requirements.txt index 08cacc5..32d2c6d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -shodan>=1.10.4 -IPy>=1.0.0 +shodan>=1.1025 +IPy>=1.1 diff --git a/setup.py b/setup.py index d5c8401..096be00 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,11 @@ import setuptools with open("README.md", "r") as fh: - long_description = fh.read() + long_description = str(fh.read()) setuptools.setup( name="pyShodan", - version="0.2.3", + version="0.2.4", author="Shane Scott", author_email="sscott@gvit.com", description="Python library for querying the Shodan API", From 00cd8a286caa04b3bf29d8db403ecacc4e64be61 Mon Sep 17 00:00:00 2001 From: sscottgvit Date: Wed, 2 Jun 2021 13:33:25 -0500 Subject: [PATCH 27/40] Fix dep typo --- dist/pyShodan-0.2.4.tar.gz | Bin 6075 -> 0 bytes ...ny.whl => pyShodan-0.2.5-py3-none-any.whl} | Bin 6001 -> 6003 bytes dist/pyShodan-0.2.5.tar.gz | Bin 0 -> 6074 bytes requirements.txt | 2 +- setup.py | 2 +- 5 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 dist/pyShodan-0.2.4.tar.gz rename dist/{pyShodan-0.2.4-py3-none-any.whl => pyShodan-0.2.5-py3-none-any.whl} (54%) create mode 100644 dist/pyShodan-0.2.5.tar.gz diff --git a/dist/pyShodan-0.2.4.tar.gz b/dist/pyShodan-0.2.4.tar.gz deleted file mode 100644 index 694c3eb48c5260596dcdcc6ac9651af191828854..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6075 zcmV;s7eweEiwFpHx3^#d|72-%bT4puQ)q8wVQwujE;24OE_7jX0PQ_%bK5wQ{>)#2 zWhy1V&ac_K^UL$=?gi_Ad<~Mplyn$u zefyC|!V3e|ZnA?{?7xzLvjgC~VX(7szKp!dG-ma)20dhNBhJ|%9LEbg;_Pjh1g;&! z=qBq0j>Z0c8prd~-QBSmTVXWW{hPtgA9%D30jMX~oJTV+j=9U?kU0RI*@4SkPsEWo zN@C8S?+D<{@TJFv!NM_%r!dm@93BYH+|Ws8JcyeN`ZH&02NN%tFfT^%K^QaJ_rnEu zEd%gpH#qb`t&c!)NhdA@kJvjN@W}RAKN$ghcA@6*0w;{-VPwaE0S<`)Z9%9yVc>eW zUV-2=8@I`rEFA2HlA?LJ(*l2!fqBEXBfg>{+avb$!Ff zULdicw_U*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m5z~d_Zdyb}d<$L{QWeF<%U!(tntB==b=Yy|M|3~$| z-99PS{|@%sM~9XEKS$G1{q=eG&4+Vq<{E;>$=sSRjdf>%jq(L?V{^s8*eXoM(@KrT zc8|2?bsWxzKBi`0BeIqLe?xLU?*Gg69|!;{|NpG~ue^Vy|DgY=8~B!UJfi>mC;Nw) z{FZd?_c#oFVHnvFXERL)@TUkO`I9(fb(t~(*s4~w zs#UFORjXRns#dkCRjq1Ot6J5nR<){Ct!h=PTGgsnwW?LEYX3jl{{iQhyvzWg002Qr BwlDwy diff --git a/dist/pyShodan-0.2.4-py3-none-any.whl b/dist/pyShodan-0.2.5-py3-none-any.whl similarity index 54% rename from dist/pyShodan-0.2.4-py3-none-any.whl rename to dist/pyShodan-0.2.5-py3-none-any.whl index c83b50a769767cba11a0ebb667c0336a3fb28865..9b037cf8e2270d298e89fe3fb26a624b687b1496 100644 GIT binary patch delta 1989 zcmZXVc{CL28^;GXyBReMu4Rl7$-Ye~OV+M&L&(nDiJ{4wt)a=7Tto;nhLj~sma?xQ zx6#-ynyYMsY?m9dg`uhO1$@+KN8N#O9-jOy0#RSI-9_EP)a*E^Pat0DC=P-s3hlA=Hk_hK^~=3y<~q{_s{f|BDmR;7vNzI!c^H6)f$fUb4_*@ zFY3sW7cX5?a_9mK`T04|89oZ_D+BINJhT_^I;WD8hxZm_%ZXbUP<;zOe=U|nPkX|A z38snW!A`T!bBiTuGwQzeu3q3&OKjUjH{0PEu>V?pGgU0d&Na5eZ2d5t@;3dvG7jZR z8{REQX9V3{PSM&Sw7L6^ParzarWq-!^K_ndiw6oqrnFt2zs|B|;=T=(hO_ro2Rlkx z9`pMB1E+JananT6NKo{a*qz99jzh*O5&6at zj<9~mEV7r%+GmFsQAq&>z^I@IBbvgDv2tCof4CC6HX)AC!tiFGPj1MDHbqpd;wBi` zUeYJ3FB_vCEP}yI1E}c8HXR-|;*g%vlb7-{S+n2}E7Hy}#NT7co!GE1;W3@x-$7fr zp=i}*X=52Q(zC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7PfP5Ls;0otLZnjPx6%tCq}v`*1c1|O@bWj z4_2n?=cGpjM7N%v^R4YZ15s;cJs&v&k?;DoCm`~$o^${rKj88652|;gX*4RwR<){C zt!h=PTGgsnwW?LEYE`RR)v8vts#UFORjXRns#dkCRjq1O`~T7Y4`C4{r2wD+0PR+u AC;$Ke literal 0 HcmV?d00001 diff --git a/requirements.txt b/requirements.txt index 32d2c6d..992c23e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -shodan>=1.1025 +shodan>=1.25.0 IPy>=1.1 diff --git a/setup.py b/setup.py index 096be00..628201a 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pyShodan", - version="0.2.4", + version="0.2.5", author="Shane Scott", author_email="sscott@gvit.com", description="Python library for querying the Shodan API", From 32a443151b2f388c07bf2316b27648d77c801b90 Mon Sep 17 00:00:00 2001 From: Justin Adams <90347212+jcavanguard@users.noreply.github.com> Date: Mon, 18 Oct 2021 13:25:41 -0400 Subject: [PATCH 28/40] Create setup.cfg Setting up flake8 style guide. --- setup.cfg | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..e7e517c --- /dev/null +++ b/setup.cfg @@ -0,0 +1,4 @@ +[flake8] +select=E501,F811,F823,F831,F841,E502,E703,E704,E713,E741,E742,E743,W291,W601,W602 +exclude=.git,.idea,tmp,backup,log,images,venv +max-line-length: 120 From 9c4a9f2f3c90aab109bdd213c8d5a98781605cca Mon Sep 17 00:00:00 2001 From: Drew Callaway Date: Wed, 8 Jun 2022 11:49:35 -0500 Subject: [PATCH 29/40] Increment version number for published py libraries. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 628201a..cde8a9f 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pyShodan", - version="0.2.5", + version="0.2.6", author="Shane Scott", author_email="sscott@gvit.com", description="Python library for querying the Shodan API", From 69604baf6d25b8a9db48050e9be41b9299f46419 Mon Sep 17 00:00:00 2001 From: Drew Callaway Date: Wed, 8 Jun 2022 11:57:45 -0500 Subject: [PATCH 30/40] Added Changelog.txt per Shane. --- Changelog.txt | Bin 0 -> 12336 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Changelog.txt diff --git a/Changelog.txt b/Changelog.txt new file mode 100644 index 0000000000000000000000000000000000000000..99be51152fde251441e430bcff5eaed6e5acb76e GIT binary patch literal 12336 zcmdVgYj0E883o|;xl;dwKenm{CCS0?75e3*RAgTzI&Eyf63lg*?O1n)BNY1oM+^}Z~yTid*9}+?(g+e zwio&SQ_g>t?}NOz^SYbaP4l^v5sos4t-QzC`mT+6E1yQ}UH2Jvk8=IIjre8m`KqDx zOSVqCvtahR-ThVm(pC#!~C&l?_B zuiN8uME{b1!N=|MmD|ahjWd7ix1Ig9a<;78Zr+zy?tU9X@nV$u9OaJhGA1K9&X`tL zd3F28c4p!6EdSsdtBR-p$T3`k*Zb@_$~I1(1hu2Jt7vrdoNm}ng7r#o@Gq9^ER(%S)a1!d)d3(e;t;@T39|C>R08% z_1Me!FR#bLjOpLG8d4C2;G2xtY`iZrf08>)Gk=O=)>w((v-~RrebXVB%p0nE;m3a7 zu7KZR_HSq1;6A=Jm~EXic{9xZ7KF^4wn6N5KDWZNao)RYkXvNli_D+K(TIcKxSwCJ zTr><1ayN{$hc?icS-uys^W*H9wBviZZk(+lwow6!{=QvJDe#*9k8_p(E2UVTb6pDY zuxTb`=MQj^k{2V*_inZ)*>h1Lu3}_)3i?2g&Fjx$Dhp@z{0A*6tzXAg_lFgmrdiXB z3eT~WB}1Nm!W1v(*-H%;`Ax5J{UH1Bci6t4w)>TDd6qlEe3G;G+x4#64dx%7b={~x z$Un~;-n5sWhj*#LQkS=Kj4or>WgWQ4>A!Y=OoZ^Ddz|k(@jHt(tmXxwJI)z=AKm2p zrun9f`;EDL91nk(*KxzQ)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wsDX{hC+@B4(`9AzrCo z@1!w`-xA?t8%8+~hB7Qxt`~2wP6=MBK@TDJrMpDEewIDTi~71r-=!CeRlist{Bpmz zm{xK4KcmSfO*#9gvBVX9<;48Fd#kNyVCuOw9=)DTQ;)(rRne;J`@|`Jsh+mcPu6*3 zpOn%w5txaOw*^IgOZN1kstu#K+7}*mn|9shi@I%ezj6_blc7+y>Ppr#YAl$>I`Xf%5lR$Ws4tas6{+pNEvL zP(9b7gH|1k>P(6vv5Oa|zDFThRb_U~vqDZ?R1D=k#Iox^s`mjsQk7xwlUC5DJ>>ze z#_3{ILr30a+@n0pSx@_kRw_@f=MPphgY}lmGnUd(f5^}~xf|u@8|vvMd9j*2OEp?+ zE$_oUoplQM^)VDB!f+WGUX9`Bag9}qB>2V3SwtOG5mx1aVO4~wmfEBWyY1fJ@}ZEd zV>f{lKPnd5jBB5VlkO}9_o6;(D0ot_t%^8}XSr2>q3^r{KCwvlTwQS*GW-nTm$gY5 zl6Yg8^ECrFSTYQ-!Kyq78i=`1Rc|*@S)q#TxdE zUlt#lPzt{pk5=(H%gjFZJQQqbvS%siBmJT6vLwu4bMUCjotj-$mGlr;9V@FC4Q^lG Z&iZ=vroQh{qE+fG7kv@iT#clR{(q46*rxyh literal 0 HcmV?d00001 From 59b2993e5dd065324c4bc172710d87d6b0d79d94 Mon Sep 17 00:00:00 2001 From: sscottgvit Date: Fri, 3 May 2024 10:43:59 -0500 Subject: [PATCH 31/40] Code improvements, Add git actions, other cleanup --- .github/workflows/master.yml | 103 ++++++++++++++++++++++++ Changelog.txt | Bin 12336 -> 0 bytes README.md | 2 +- dist/pyShodan-0.2.5-py3-none-any.whl | Bin 6003 -> 0 bytes dist/pyShodan-0.2.5.tar.gz | Bin 6074 -> 0 bytes packageIt.sh | 5 -- pushPackage.sh | 3 - pyShodan/__init__.py | 113 ++++++++++----------------- requirements.txt | 4 +- setup.py | 7 +- 10 files changed, 154 insertions(+), 83 deletions(-) create mode 100644 .github/workflows/master.yml delete mode 100644 Changelog.txt delete mode 100644 dist/pyShodan-0.2.5-py3-none-any.whl delete mode 100644 dist/pyShodan-0.2.5.tar.gz delete mode 100644 packageIt.sh delete mode 100644 pushPackage.sh diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml new file mode 100644 index 0000000..01d3dcc --- /dev/null +++ b/.github/workflows/master.yml @@ -0,0 +1,103 @@ +name: Python package + +on: + push: + tags: + - 'package*' + workflow_dispatch: + +jobs: + prepare: + runs-on: ubuntu-latest + outputs: + new_version: ${{ steps.version.outputs.new_version }} + + steps: + - uses: actions/checkout@v2 + + - name: Extract and increment version using sed and awk + id: increment_version + run: | + version=$(sed -n "s/^ *version=['\"]\([^'\"]*\)['\"],/\1/p" setup.py) + new_version=$(echo $version | awk -F. -v OFS=. '{$NF += 1; print}') + sed -i "s;$version;$new_version;g" setup.py + echo "new_version=$new_version" >> $GITHUB_ENV + + - name: Get last commit details + id: last_commit + run: | + commit_message=$(git log -1 --pretty=%B) + commit_author=$(git log -1 --pretty=%an) + echo "commit_message=$commit_message" >> $GITHUB_ENV + echo "commit_author=$commit_author" >> $GITHUB_ENV + + - name: Update ChangeLog + run: | + echo "## v${{ env.new_version }} - $(date +'%Y-%m-%d')" >> ChangeLog.md + echo "- Last commit by ${{ env.commit_author }}: ${{ env.commit_message }}" >> ChangeLog.md + + - name: Commit and push changes + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add setup.py ChangeLog.md + git commit -m "Bump version to ${{ env.new_version }} and update ChangeLog" + git push + + + build: + needs: prepare + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + python-version: [3.11] + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 semgrep setuptools wheel build twine + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Lint with flake8 + run: | + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=128 --statistics + + - name: Security scan with Semgrep + run: | + semgrep --config=p/r2c + + - name: Patch version using sed and awk (not because we can't pull the commited update in prepare) + run: | + version=$(sed -n "s/^ *version=['\"]\([^'\"]*\)['\"],/\1/p" setup.py) + new_version=$(echo $version | awk -F. -v OFS=. '{$NF += 1; print}') + sed -i "s;$version;$new_version;g" setup.py + + - name: Build the package + run: python setup.py sdist bdist_wheel + + - name: Build and publish + if: success() + run: | + twine upload dist/* + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + + - name: Upload artifacts + if: success() + uses: actions/upload-artifact@v4 + with: + name: dist-${{ matrix.python-version }}-${{ matrix.os }} + path: dist/* + if-no-files-found: error + retention-days: 90 diff --git a/Changelog.txt b/Changelog.txt deleted file mode 100644 index 99be51152fde251441e430bcff5eaed6e5acb76e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12336 zcmdVgYj0E883o|;xl;dwKenm{CCS0?75e3*RAgTzI&Eyf63lg*?O1n)BNY1oM+^}Z~yTid*9}+?(g+e zwio&SQ_g>t?}NOz^SYbaP4l^v5sos4t-QzC`mT+6E1yQ}UH2Jvk8=IIjre8m`KqDx zOSVqCvtahR-ThVm(pC#!~C&l?_B zuiN8uME{b1!N=|MmD|ahjWd7ix1Ig9a<;78Zr+zy?tU9X@nV$u9OaJhGA1K9&X`tL zd3F28c4p!6EdSsdtBR-p$T3`k*Zb@_$~I1(1hu2Jt7vrdoNm}ng7r#o@Gq9^ER(%S)a1!d)d3(e;t;@T39|C>R08% z_1Me!FR#bLjOpLG8d4C2;G2xtY`iZrf08>)Gk=O=)>w((v-~RrebXVB%p0nE;m3a7 zu7KZR_HSq1;6A=Jm~EXic{9xZ7KF^4wn6N5KDWZNao)RYkXvNli_D+K(TIcKxSwCJ zTr><1ayN{$hc?icS-uys^W*H9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ki=qJj z-@n|Rn&z-$VHYyKUo^(j`|4BJ(!!C?5Zi>g44S~p!~p4wMWnH5yU zN~NIhKK1-xwY*2MqKm$3*bd6asNGja%g@LSL<}s!dZ=U2Qx!mULfo(CICv(uP*pCu z+U>G~%U!{$?N@xD>gD-`%~oqwIXANeH7hnCgQbZwGj$hU$5#0!)f?Ui|Eo(XZc_`Z z3N;0)n0GU5mtIO=zdHU`KV5M(N+Q?liEI)}eL70|(Q3GGsplZntZ+}Xucyy5i$it! znvy-(A{UwsDX{hC+@B4(`9AzrCo z@1!w`-xA?t8%8+~hB7Qxt`~2wP6=MBK@TDJrMpDEewIDTi~71r-=!CeRlist{Bpmz zm{xK4KcmSfO*#9gvBVX9<;48Fd#kNyVCuOw9=)DTQ;)(rRne;J`@|`Jsh+mcPu6*3 zpOn%w5txaOw*^IgOZN1kstu#K+7}*mn|9shi@I%ezj6_blc7+y>Ppr#YAl$>I`Xf%5lR$Ws4tas6{+pNEvL zP(9b7gH|1k>P(6vv5Oa|zDFThRb_U~vqDZ?R1D=k#Iox^s`mjsQk7xwlUC5DJ>>ze z#_3{ILr30a+@n0pSx@_kRw_@f=MPphgY}lmGnUd(f5^}~xf|u@8|vvMd9j*2OEp?+ zE$_oUoplQM^)VDB!f+WGUX9`Bag9}qB>2V3SwtOG5mx1aVO4~wmfEBWyY1fJ@}ZEd zV>f{lKPnd5jBB5VlkO}9_o6;(D0ot_t%^8}XSr2>q3^r{KCwvlTwQS*GW-nTm$gY5 zl6Yg8^ECrFSTYQ-!Kyq78i=`1Rc|*@S)q#TxdE zUlt#lPzt{pk5=(H%gjFZJQQqbvS%siBmJT6vLwu4bMUCjotj-$mGlr;9V@FC4Q^lG Z&iZ=vroQh{qE+fG7kv@iT#clR{(q46*rxyh diff --git a/README.md b/README.md index 5021398..608c8bd 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -pyShodan (https://govanguard.io) +pyShodan (https://gotham-security.com) == [![Build Status](https://travis-ci.com/GoVanguard/pyShodan.svg?branch=master)](https://travis-ci.com/GoVanguard/pyShodan) [![Known Vulnerabilities](https://snyk.io/test/github/GoVanguard/pyShodan/badge.svg?targetFile=requirements.txt)](https://snyk.io/test/github/GoVanguard/pyShodan?targetFile=requirements.txt) diff --git a/dist/pyShodan-0.2.5-py3-none-any.whl b/dist/pyShodan-0.2.5-py3-none-any.whl deleted file mode 100644 index 9b037cf8e2270d298e89fe3fb26a624b687b1496..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6003 zcmaKw1yoe)`o>2P>5@K3BN9WGbPf^%!!Xh?3@|8-bjpwdf^IkqZ@!{)ZfN zt1Kvu*i6LB`w!4|{d5Spib2;-NNhKS<;jktwqlR@4FA3SEdxV1lfnU!p+- zrraKQ`_f93rT}lAgkaK zpXj`z;$4NAu)c8t7Q(%LzYoi3Ey-ZXXe7U?x{D<9<4(l1D~Rm}vVL*vV%6!v%^CI1 z)sHcnp`BY=s<8^j4iX(~5ADn(oQD@ai2N_KG$R-1=5DUa=2!S_BeqT@i!?YdzZcLV zTLy?d;?G8>_70quRpE9b$+P!0?>iu0;ZTjb)x9xNPlP@qWbITx*EyLN)IA-OjNDUV zke|fLi;!MslMa)TUp_vGogD4`BB~qTzje^d6#&$v3in$`4T6Anmy8+>+}{-**?p>! zFJg7wk2{^6aE7;*Yc2OByXlh(yBOdr(kWG1*%tPB&34K z+fZU)d!Ikq(abdR`l_^i#1AtCf@A1Mm7Gp>Z2eJ}OyiJ>8>kQDHxffglPgEZuVkwD z{bz756vE8}Hrq7UgyXORh;mQ|zomv5U*9zIC?--XcY}U-%p~!W9t(Y0p9<1t+XZ`O zd*sDksC1c0h^X%lP83%*#%x}!)_u>rN4B25?E1yp##1c!JKL=(Ke5lt-WPjBPYJM0 z_}#m~dp^S}&d*z95KVA9d`{0l+>Dl*RZnFp-e zd&TK8C-AilbD>GK!$uc*ALW)ks4nB?d34Qwe_iJ7YcZo2GhgSjHfKKwa&99XHe1uM z_;70!wyR2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EP!I8W&B-LaT{EE z0k?%zz_bd)=uIsy@q}kJ_U)I0NX4x8v*{0>rKery?g?b{EtK8mQpzQ&+_?C}2NnA)C@ww5^@!!E74N)y?-njzLM*j${aXW(_f0om=$d)M zpCS^&T;5h99IO4^B*I&()%#C7M`JZC%%zQxE{2x5VvtyhrKZ4(bE-T< zJpkd{8v``}kP(dm+^WNUAXHIK-{Z{{Dp=_r3Nh;cKlr?Rum8Soz5l%Z<>7ygL4V!- z>*xP}_5uL6-cRp_0{`9pKf{3kCH!AK>`y`^)=$DeGUS(z_E+k!EzeKtEY5GJe`|n# zW&RqMKbc2(zhV9@Jbz{WnwdYDGIxXMzy7~}JpI2D^jFreIroz_^E=jGsrL`uFV+4N f$4K;>qy4A$!AfX%Y5V7J9Rpx`XBVe`3J&luiiE>L diff --git a/dist/pyShodan-0.2.5.tar.gz b/dist/pyShodan-0.2.5.tar.gz deleted file mode 100644 index 660cd23b514ee747c460d5fa78f02fb3db3d0868..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6074 zcmV;r7e(kFiwFqa&bMF!|72-%bT4puQ)q8wVQwujE;24PE_7jX0PQ{fbKAIb{+WLT z9y1w9eG>g4+iKkEwK~U1)N^draxQb@%ji)gB(bJQJ%Y5NcKW|}cLDHAA9gN@@2*E= z<}8uGVzJ-50CbDha2C3D&^oY=tdsq{@6isRbvhmVd)PTS$p6)C@9_BGYE?bQc%c`+Pb+_1M7R~I+EOE&oM14sr_(qXX8 z?I#`yFAP|_$&OyJ|40JPj)3!q!Op|QD)OeYnAOi4^pL%YIA_Cf5-;tDvo~Q9xONPq zo2(x=7W>y(952rH_a|avh0%2XZw9+~;L$1spq^k09?iWt<}Qmv<^XhN2QG6x5l7xQ zi8+J5V}LiummU`e3nwg|!ARe8cpx})LnoQ@AZ{|~&zzYZOub;rycod;Va#mb50~7v z48Wh=;?M`RJ_5xhowyJ@VsClCBim<#WDM}xrJBPFoG@C1ksSjDI3xzN1)=JMf$QOV z1%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0 @@ -#!/bin/bash -rm -Rf dist/ -rm -Rf build/ -rm -Rf pyShodan.egg-info/ -python3 setup.py sdist bdist_wheel diff --git a/pushPackage.sh b/pushPackage.sh deleted file mode 100644 index d387a75..0000000 --- a/pushPackage.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -#twine upload --repository-url https://test.pypi.org/legacy/ dist/* -twine upload --repository-url https://upload.pypi.org/legacy/ dist/* diff --git a/pyShodan/__init__.py b/pyShodan/__init__.py index 5100b03..b2845b4 100644 --- a/pyShodan/__init__.py +++ b/pyShodan/__init__.py @@ -1,67 +1,42 @@ -##################################################################################### -# pyShodan: Python API Wrapper for Shodan # -# Copyright (c) 2019 GoVanguard # -##################################################################################### -# This file is part of pyShodan. # -# # -# pyShodan is free software: you can redistribute it and/or modify # -# it under the terms of the GNU Lesser General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# pyShodan is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU Lesser General Public License for more details. # -# # -# You should have received a copy of the GNU Lesser General Public License # -# along with pyShodan. If not, see . # -##################################################################################### - import shodan import sys import time from IPy import IP +from typing import List, Union, Tuple + class PyShodan: - #Constructor - def __init__(self): - self.apiKey = None - self.debug = False + def __init__(self, apiKey: str = None, debug: bool = False): + self.apiKey = apiKey + self.debug = debug self.shodanSession = None - def createSession(self): + def createSession(self) -> Union[None, str]: if self.apiKey: self.shodanSession = shodan.Shodan(self.apiKey) - return else: return 'Set API Key' - def searchTerm(self, searchStr: str, allData = False): + def searchTerm(self, searchStr: str, allData: bool = False) -> Union[List[dict], str]: if not self.shodanSession: return 'Set API Key' - if not searchHost: + if not searchStr: return 'No search input' - hostResult = [] - - # Search Shodan for this term - apiResult = self.shodanSession.search(searchStr) - - # Format the results into list - print('Results found: %s' % results['total']) - - if allData == True: - hostResult = apiResult['matches'] - else: - for result in apiResult['matches']: - hostResult.append([result['ip_str'].replace(","," "), result['data'].replace(","," ").encode("utf-8"),result['port']]) # Store the results in a list + try: + apiResult = self.shodanSession.search(searchStr) + print(f'Results found: {apiResult["total"]}') - return hostResult + if allData: + return apiResult['matches'] + else: + return [[result['ip_str'], result['data'], result['port']] for result in apiResult['matches']] + except shodan.APIError as e: + return f"Error: {e}" - def searchIp(self, searchHost: str, allData = False): + def searchIp(self, searchHost: str, allData: bool = False) -> Union[List[dict], str]: if not self.shodanSession: return 'Set API Key' @@ -71,46 +46,42 @@ def searchIp(self, searchHost: str, allData = False): searchHostIpType = IP(searchHost).iptype() if searchHostIpType != "PUBLIC": - return "Warning, {0} isn't public.. Shodan only tracks public IPs".format(searchHost) - - hostResult = [] + return f"Warning, {searchHost} isn't public. Shodan only tracks public IPs." - # Search Shodan for this IP address try: apiResult = self.shodanSession.host(searchHost) - if allData == True: - hostResult = apiResult + if allData: + return apiResult else: - for item in apiResult['data']: - hostResult.append([item['ip_str'], item['org'], str(item['data'].replace(',',' ').strip('\t\n\r')), item['port']]) # Store the results in a list - + return [[item['ip_str'], item['org'], item['data'].replace(',', ' ').strip(), item['port']] for item in apiResult['data']] except shodan.APIError as e: - print("Error: %s" % e) - - return hostResult + return f"Error: {e}" - def searchList(self, inputFile: str): + def searchList(self, inputFile: str) -> Union[List[dict], str]: if not self.shodanSession: return 'Set API Key' if not inputFile: return 'No input file' - hostinfo = [] - with open(inputFile,'r') as f: - x = f.read().splitlines() + try: + with open(inputFile, 'r') as f: + ips = f.read().splitlines() - # Iterate through lines in the file - for i in range(len(x)): - try: + hostInfo = [] + for ip in ips: time.sleep(2) - host = self.shodanSession.host(x[i]) # Search Shodan for the host on the current line in the file - for item in host['data']: - hostinfo.append([item['ip_str'], item['org'], str(item['data']).replace(',',' ').strip('\r\n\t'), item['port']]) # Store the results in a list - except shodan.APIError as e: - print("Error: %s" % e) - if "no information available" in str(e).lower(): - print("No information is available for %s" % str(x[i])) - - return hostinfo + try: + host = self.shodanSession.host(ip) + for item in host['data']: + hostInfo.append([item['ip_str'], item['org'], item['data'].replace(',', ' ').strip(), item['port']]) + except shodan.APIError as e: + if "no information available" in str(e).lower(): + print(f"No information is available for {ip}") + else: + print(f"Error: {e}") + + return hostInfo + except Exception as e: + return f"Error while reading file: {e}" diff --git a/requirements.txt b/requirements.txt index 992c23e..a488be7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -shodan>=1.25.0 -IPy>=1.1 +shodan +IPy diff --git a/setup.py b/setup.py index cde8a9f..b5934d1 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ name="pyShodan", version="0.2.6", author="Shane Scott", - author_email="sscott@gvit.com", + author_email="sscott@gotham-security.com", description="Python library for querying the Shodan API", long_description=long_description, long_description_content_type="text/markdown", @@ -19,6 +19,11 @@ 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'Operating System :: OS Independent', ), ) From 514e822b1c5aa6f2f3d952eef23a1501f03e1812 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 3 May 2024 15:45:26 +0000 Subject: [PATCH 32/40] Bump version to 0.2.7 and update ChangeLog --- ChangeLog.md | 2 ++ setup.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 ChangeLog.md diff --git a/ChangeLog.md b/ChangeLog.md new file mode 100644 index 0000000..25191fd --- /dev/null +++ b/ChangeLog.md @@ -0,0 +1,2 @@ +## v0.2.7 - 2024-05-03 +- Last commit by sscottgvit: Code improvements, Add git actions, other cleanup diff --git a/setup.py b/setup.py index b5934d1..0cafdde 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pyShodan", - version="0.2.6", + version="0.2.7", author="Shane Scott", author_email="sscott@gotham-security.com", description="Python library for querying the Shodan API", From e353c5e278628b2bff07b8aac25d14c99805e7d2 Mon Sep 17 00:00:00 2001 From: sscottgvit Date: Fri, 3 May 2024 10:48:38 -0500 Subject: [PATCH 33/40] Update of sample script --- pyShodan/test.py | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/pyShodan/test.py b/pyShodan/test.py index 0665870..2c27f89 100644 --- a/pyShodan/test.py +++ b/pyShodan/test.py @@ -1,24 +1,5 @@ -##################################################################################### -# pyShodan: Python API Wrapper for Shodan # -# Copyright (c) 2019 GoVanguard # -##################################################################################### -# This file is part of pyShodan. # -# # -# pyShodan is free software: you can redistribute it and/or modify # -# it under the terms of the GNU Lesser General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# pyShodan is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU Lesser General Public License for more details. # -# # -# You should have received a copy of the GNU Lesser General Public License # -# along with pyShodan. If not, see . # -##################################################################################### - -from pyShodan import PyShodan +from . import PyShodan +import shodan import sys import argparse import csv From 89567a1c1543ed267438aa6469f1318b669f172b Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 3 May 2024 15:52:05 +0000 Subject: [PATCH 34/40] Bump version to 0.2.8 and update ChangeLog --- ChangeLog.md | 2 ++ setup.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 25191fd..ceb9c87 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,2 +1,4 @@ ## v0.2.7 - 2024-05-03 - Last commit by sscottgvit: Code improvements, Add git actions, other cleanup +## v0.2.8 - 2024-05-03 +- Last commit by sscottgvit: Merge branch 'master' of github.com:GoVanguard/pyShodan diff --git a/setup.py b/setup.py index 0cafdde..1675dc9 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pyShodan", - version="0.2.7", + version="0.2.8", author="Shane Scott", author_email="sscott@gotham-security.com", description="Python library for querying the Shodan API", From e6ca02ef55d4a53230527818d63aec7f3a8f5302 Mon Sep 17 00:00:00 2001 From: sscottgvit Date: Fri, 3 May 2024 10:53:27 -0500 Subject: [PATCH 35/40] Update sample script --- pyShodan/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyShodan/test.py b/pyShodan/test.py index 2c27f89..3f97c4d 100644 --- a/pyShodan/test.py +++ b/pyShodan/test.py @@ -68,6 +68,6 @@ def searchList(f): elif args.ipList: searchList(args.ipList) elif args.apiKey: - getApiKey(apiKey) + getApiKey(args.apiKey) else: print("Invalid arguments, see -h for details. Example use: python pyShodan.py -s SearchTerm -ip IPAddress -api SHODAN-api-key") From ba6debfb2841ad68dd4786cf7eb8bae880f1fd21 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 3 May 2024 16:02:01 +0000 Subject: [PATCH 36/40] Bump version to 0.2.9 and update ChangeLog --- ChangeLog.md | 2 ++ setup.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index ceb9c87..42be3b8 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,3 +2,5 @@ - Last commit by sscottgvit: Code improvements, Add git actions, other cleanup ## v0.2.8 - 2024-05-03 - Last commit by sscottgvit: Merge branch 'master' of github.com:GoVanguard/pyShodan +## v0.2.9 - 2024-05-03 +- Last commit by sscottgvit: Merge branch 'master' of github.com:GoVanguard/pyShodan diff --git a/setup.py b/setup.py index 1675dc9..2bbea9d 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pyShodan", - version="0.2.8", + version="0.2.9", author="Shane Scott", author_email="sscott@gotham-security.com", description="Python library for querying the Shodan API", From 608feb5862edc06600bf925d6ccc8bbf3b873a8a Mon Sep 17 00:00:00 2001 From: sscottgvit Date: Fri, 3 May 2024 11:07:31 -0500 Subject: [PATCH 37/40] Update readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 608c8bd..f1cf2ab 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ pyShodan (https://gotham-security.com) == -[![Build Status](https://travis-ci.com/GoVanguard/pyShodan.svg?branch=master)](https://travis-ci.com/GoVanguard/pyShodan) +[![Python package](https://github.com/GoVanguard/pyShodan/actions/workflows/master.yml/badge.svg)](https://github.com/GoVanguard/pyShodan/actions/workflows/master.yml) [![Known Vulnerabilities](https://snyk.io/test/github/GoVanguard/pyShodan/badge.svg?targetFile=requirements.txt)](https://snyk.io/test/github/GoVanguard/pyShodan?targetFile=requirements.txt) [![Maintainability](https://api.codeclimate.com/v1/badges/6b69cfa99c674d04e7a9/maintainability)](https://codeclimate.com/github/GoVanguard/pyShodan/maintainability) @@ -13,7 +13,7 @@ git clone https://github.com/GoVanguard/pyShodan.git ``` ## Recommended Python Version -Tested on Python 3.5+. +Tested on Python 3.6+. ## Dependencies * Shodan (pip3 install shodan) From fe5a1a4b0ab4d5aa8f511ffe5216939f2c8bd92d Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 3 May 2024 16:07:57 +0000 Subject: [PATCH 38/40] Bump version to 0.2.10 and update ChangeLog --- ChangeLog.md | 2 ++ setup.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 42be3b8..9d50216 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -4,3 +4,5 @@ - Last commit by sscottgvit: Merge branch 'master' of github.com:GoVanguard/pyShodan ## v0.2.9 - 2024-05-03 - Last commit by sscottgvit: Merge branch 'master' of github.com:GoVanguard/pyShodan +## v0.2.10 - 2024-05-03 +- Last commit by sscottgvit: Merge branch 'master' of github.com:GoVanguard/pyShodan diff --git a/setup.py b/setup.py index 2bbea9d..0e6a060 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pyShodan", - version="0.2.9", + version="0.2.10", author="Shane Scott", author_email="sscott@gotham-security.com", description="Python library for querying the Shodan API", From b054c4a23104439d1dce72e200be2704a6de97d1 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 3 May 2024 16:14:57 +0000 Subject: [PATCH 39/40] Bump version to 0.2.11 and update ChangeLog --- ChangeLog.md | 2 ++ setup.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 9d50216..4b3b33b 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -6,3 +6,5 @@ - Last commit by sscottgvit: Merge branch 'master' of github.com:GoVanguard/pyShodan ## v0.2.10 - 2024-05-03 - Last commit by sscottgvit: Merge branch 'master' of github.com:GoVanguard/pyShodan +## v0.2.11 - 2024-05-03 +- Last commit by GitHub Action: Bump version to 0.2.10 and update ChangeLog diff --git a/setup.py b/setup.py index 0e6a060..0baf7ff 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pyShodan", - version="0.2.10", + version="0.2.11", author="Shane Scott", author_email="sscott@gotham-security.com", description="Python library for querying the Shodan API", From 214536a8ef94eba128b0231dfd1231c2b90025f0 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Thu, 8 Aug 2024 09:53:03 +0000 Subject: [PATCH 40/40] fix: requirements.txt to reduce vulnerabilities The following vulnerabilities are fixed by pinning transitive dependencies: - https://snyk.io/vuln/SNYK-PYTHON-CERTIFI-3164749 - https://snyk.io/vuln/SNYK-PYTHON-CERTIFI-5805047 - https://snyk.io/vuln/SNYK-PYTHON-CERTIFI-7430173 - https://snyk.io/vuln/SNYK-PYTHON-IDNA-6597975 - https://snyk.io/vuln/SNYK-PYTHON-REQUESTS-5595532 --- requirements.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/requirements.txt b/requirements.txt index a488be7..f34a04e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,5 @@ shodan IPy +certifi>=2024.7.4 # not directly required, pinned by Snyk to avoid a vulnerability +idna>=3.7 # not directly required, pinned by Snyk to avoid a vulnerability +requests>=2.31.0 # not directly required, pinned by Snyk to avoid a vulnerability