diff --git a/classes/cache.py b/classes/cache.py index a3860a6..2667b78 100644 --- a/classes/cache.py +++ b/classes/cache.py @@ -80,7 +80,7 @@ def _remove_old_caches(self): def _get_name_for_cache_file(self): # check if there already is an older version of the cache - # if there is, return the name of this file, such that, + # if there is, return the name of this file. # it will be overwritten if not os.path.exists(self.cache_dir): os.makedirs(self.cache_dir) diff --git a/classes/output.py b/classes/output.py index ecd6d77..c9a255a 100644 --- a/classes/output.py +++ b/classes/output.py @@ -128,7 +128,7 @@ def add_results(self): site = { 'statistics': { - 'start_time': None, + 'start_time': self.data['timer'], 'run_time': self.data['runtime'], 'urls': self.data['url_count'], 'fingerprints': self.num_fps diff --git a/wig.py b/wig.py index e1bd443..8289d0b 100755 --- a/wig.py +++ b/wig.py @@ -28,6 +28,7 @@ def __init__(self, args): if args.input_file is not None: interactive = False + with open(args.input_file,'r') as input_file: urls = [] for url in input_file.readlines(): @@ -108,7 +109,6 @@ def scan_site(self): msg = 'Scanning %s...' % (self.options['url']) print(self.data['colorizer'].format(msg, 'green', True)) - # load cache if this is not disabled self.data['cache'].set_host(self.options['url']) @@ -228,12 +228,18 @@ def scan_site(self): """ ------------------------------------ """ + def reset(self): + self.data['results'] = Results(self.options) + self.data['cache'] = Cache() + def run(self): if self.options['urls'] is not None: for url in self.options['urls']: + self.reset() self.options['url'] = url.strip() self.scan_site() + else: self.scan_site()