]> git.parisson.com Git - deefuzzer.git/commitdiff
Additional logging when a station was found stopped and will never be restarted
authorachbed <github@achbed.org>
Mon, 19 Jan 2015 22:58:29 +0000 (16:58 -0600)
committerachbed <github@achbed.org>
Mon, 19 Jan 2015 22:58:29 +0000 (16:58 -0600)
Better description in logging station initialization errors
Internal station name and status filenames will no longer be regenerated on restart

Signed-off-by: achbed <github@achbed.org>
deefuzzer/core.py

index 0e0fcab5f0cce5708844f240e003ce28f6090748..817bde4ff050417350a46e95c58d440ae8c6b674 100644 (file)
@@ -285,6 +285,9 @@ class DeeFuzzer(Thread):
                             
                             if self.maxretry >= 0 and self.station_settings[i]['retries'] <= self.maxretry:
                                 # Station passed the max retries count is will not be reloaded
+                                if not 'station_stop_logged' in self.station_settings[i].keys():
+                                    self._err('Station ' + name + ' is stopped and will not be restarted.')
+                                    self.station_settings[i]['station_stop_logged'] = True
                                 continue
                                 
                             self.station_settings[i]['retries'] = self.station_settings[i]['retries'] + 1
@@ -302,18 +305,17 @@ class DeeFuzzer(Thread):
 
                     if name == '':
                         name = 'Station ' + str(i)
-                    
-                    if 'info' in self.station_settings[i].keys():
-                        if 'short_name' in self.station_settings[i]['infos']:
-                            name = self.station_settings[i]['infos']['short_name']
-                            y = 1
-                            while name in self.station_instances.keys():
-                                y = y + 1
-                                name = self.station_settings[i]['infos']['short_name'] + " " + str(y)
-
-                    self.station_settings[i]['station_name'] = name
-                    namehash = hashlib.md5(name).hexdigest()
-                    self.station_settings[i]['station_statusfile'] = os.sep.join([self.log_dir, namehash])
+                        if 'info' in self.station_settings[i].keys():
+                            if 'short_name' in self.station_settings[i]['infos']:
+                                name = self.station_settings[i]['infos']['short_name']
+                                y = 1
+                                while name in self.station_instances.keys():
+                                    y = y + 1
+                                    name = self.station_settings[i]['infos']['short_name'] + " " + str(y)
+
+                        self.station_settings[i]['station_name'] = name
+                        namehash = hashlib.md5(name).hexdigest()
+                        self.station_settings[i]['station_statusfile'] = os.sep.join([self.log_dir, namehash])
 
                     new_station = Station(self.station_settings[i], q, self.logqueue, self.m3u)
                     if new_station.valid:
@@ -323,7 +325,7 @@ class DeeFuzzer(Thread):
                     else:
                         self._err('Error validating station ' + name)
                 except Exception:
-                    self._err('Error creating station ' + name)
+                    self._err('Error initializing station ' + name)
                     if not ignoreErrors:
                         raise
                     continue