Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PyShodan Script added, PythonScript importer added, Label fixes, Bug …
…fixes
- Loading branch information
root
authored and
root
committed
May 6, 2019
1 parent
e9602da
commit 6f6fc94
Showing
16 changed files
with
174 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from pyExploitDb import PyExploitDb | ||
|
||
def prime(): | ||
pEdb = PyExploitDb() | ||
pEdb.debug = False | ||
pEdb.openFile() | ||
|
||
if __name__ == "__main__": | ||
prime() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,24 @@ | ||
#!/bin/bash | ||
|
||
# Setup linked Windows NMAP | ||
if [ ! -f "/sbin/nmap" ] | ||
if [ -f "/usr/bin/nmap" ] | ||
then | ||
nmapBinCheck=$(cat /usr/bin/nmap | grep -c "nmap.exe") | ||
else | ||
nmapBinCheck=1 | ||
fi | ||
|
||
if [ ! -f "/sbin/nmap" ] | [ ${nmapBinCheck} -eq 0 ] | ||
then | ||
echo "Installing Link to Windows NMAP..." | ||
mv /usr/bin/nmap /usr/bin/nmap_lin | ||
today=$(date +%s) | ||
mv /usr/bin/nmap /usr/bin/nmap_lin_${today} | ||
cp ./deps/nmap-wsl.sh /sbin/nmap | ||
chmod a+x /sbin/nmap | ||
ln -s /sbin/nmap /usr/bin/nmap | ||
if [ ! -f "/sbin/nmap" ] | ||
then | ||
ln -s /sbin/nmap /usr/bin/nmap | ||
fi | ||
else | ||
echo "Link to Windows NMAP already exists; skipping." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/python3 | ||
|
||
import sys | ||
print('Dummy!') | ||
sys.exit(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from pyShodan import PyShodan | ||
|
||
class PyShodanScript(): | ||
def __init__(self): | ||
self.dbHost = None | ||
self.session = None | ||
|
||
def setDbHost(self, dbHost): | ||
self.dbHost = dbHost | ||
|
||
def setSession(self, session): | ||
self.session = session | ||
|
||
def run(self): | ||
print('Running PyShodan Class') | ||
if self.dbHost: | ||
pyShodanObj = PyShodan() | ||
pyShodanObj.apiKey = "SNYEkE0gdwNu9BRURVDjWPXePCquXqht" | ||
pyShodanObj.createSession() | ||
pyShodanResults = pyShodanObj.searchIp(self.dbHost.ipv4, allData = True) | ||
if pyShodanResults: | ||
self.dbHost.latitude = pyShodanResults.get('latitude', 'unknown') | ||
self.dbHost.longitude = pyShodanResults.get('longitude', 'unknown') | ||
self.dbHost.asn = pyShodanResults.get('asn', 'unknown') | ||
self.dbHost.ips = pyShodanResults.get('isp', 'unknown') | ||
self.dbHost.city = pyShodanResults.get('city', 'unknown') | ||
self.dbHost.countryCode = pyShodanResults.get('country_code', 'unknown') | ||
self.session.add(self.dbHost) | ||
|
||
if __name__ == "__main__": | ||
pass |
Oops, something went wrong.