Add python version check and fix bug due to moving the stash lib into lib

This commit is contained in:
L1ghtn1ng 2019-01-20 03:02:29 +00:00
parent 9d23a733b5
commit d95097f6dd
4 changed files with 51 additions and 47 deletions

View file

@ -6,7 +6,7 @@
* | |_| | | | __/ / __ / (_| | | \ V / __/\__ \ || __/ | *
* \__|_| |_|\___| \/ /_/ \__,_|_| \_/ \___||___/\__\___|_| *
* *
* theHarvester 3.0.6 v183 *
* theHarvester 3.0.6 v184 *
* Coded by Christian Martorella *
* Edge-Security Research *
* cmartorella@edge-security.com *

View file

@ -18,7 +18,7 @@ def banner():
print("* | |_| | | | __/ / __ / (_| | | \ V / __/\__ \ || __/ | *")
print("* \__|_| |_|\___| \/ /_/ \__,_|_| \_/ \___||___/\__\___|_| *")
print('* *')
print('* theHarvester 3.0.6 v183 *')
print('* theHarvester 3.0.6 v184 *')
print('* Coded by Christian Martorella *')
print('* Edge-Security Research *')
print('* cmartorella@edge-security.com *')
@ -27,7 +27,7 @@ def banner():
@staticmethod
def get_supportedengines():
supportedengines = set(['baidu',
supportedengines = {'baidu',
'bing',
'bingapi',
'censys',
@ -51,7 +51,7 @@ def get_supportedengines():
'virustotal',
'yahoo',
'all'
])
}
return supportedengines
@staticmethod

View file

@ -3,7 +3,7 @@
import plotly.graph_objs as go
import plotly.plotly as py
import plotly
import stash
from lib import stash
try:
db = stash.stash_manager()
db.do_init()
@ -40,7 +40,7 @@ def drawlatestscangraph(self,domain,latestscandata):
}, auto_open=False, include_plotlyjs=False, filename='report.html', output_type='div')
return barchartcode
except Exception as e:
print('Error generating HTML bar graph code for domain: ' + str(e))
print(f'Error generating HTML bar graph code for domain: {e}')
def drawscattergraphscanhistory(self, domain, scanhistorydomain):
try:
@ -93,7 +93,7 @@ def drawscattergraphscanhistory(self,domain,scanhistorydomain):
'layout': layout}, auto_open=False, include_plotlyjs=False, filename='report.html', output_type='div')
return scatterchartcode
except Exception as e:
print('Error generating HTML for the historical graph for domain: ' + str(e))
print(f'Error generating HTML for the historical graph for domain: {e}')
except Exception as e:
print('Error in the reportgraph module: ' + str(e))
print(f'Error in the reportgraph module: {e}')

View file

@ -12,6 +12,7 @@
import datetime
import ipaddress
import re
from platform import python_version
import time
try:
@ -938,6 +939,9 @@ def start():
if __name__ == '__main__':
if python_version()[0:3] < '3.6':
print('\033[93m[!] Please make sure you have python 3.6+ installed, quitting.\033[0m')
sys.exit(1)
try:
start()
except KeyboardInterrupt: