fix(fix_services): update LASTTRY in all on_epoch pattern handlers

Signed-off-by: PwnPacker <4704376+CoderFX@users.noreply.github.com>
This commit is contained in:
CoderFX
2026-03-11 03:15:28 +02:00
parent 8b1297d836
commit c2e61a1517

View File

@@ -174,6 +174,7 @@ class FixServices(plugins.Plugin):
logging.debug("[Fix_Services]**** checking")
if len(self.pattern.findall(last_lines)) >= 1:
self.LASTTRY = time.time()
subprocess.check_output("monstop", shell=True)
subprocess.check_output("monstart", shell=True)
display.set('status', 'Wifi channel stuck. Restarting recon.')
@@ -182,6 +183,7 @@ class FixServices(plugins.Plugin):
# Look for pattern 2
elif len(self.pattern2.findall(other_last_lines)) >= 5:
self.LASTTRY = time.time()
logging.debug("[Fix_Services]**** Should trigger a reload of the wlan0mon device:\n%s" % last_lines)
if hasattr(agent, 'view'):
display.set('status', 'Wifi channel stuck. Restarting recon.')
@@ -205,6 +207,7 @@ class FixServices(plugins.Plugin):
# Look for pattern 3
elif len(self.pattern3.findall(other_last_lines)) >= 1:
self.LASTTRY = time.time()
logging.debug("[Fix_Services] Firmware has halted or crashed. Restarting wlan0mon.")
if hasattr(agent, 'view'):
display.set('status', 'Firmware has halted or crashed. Restarting wlan0mon.')
@@ -218,6 +221,7 @@ class FixServices(plugins.Plugin):
# Look for pattern 4
elif len(self.pattern4.findall(other_other_last_lines)) >= 3:
self.LASTTRY = time.time()
logging.debug("[Fix_Services] wlan0 is down!")
if hasattr(agent, 'view'):
display.set('status', 'Restarting wlan0 now!')
@@ -249,6 +253,7 @@ class FixServices(plugins.Plugin):
# Look for pattern 7
elif len(self.pattern7.findall(other_other_last_lines)) >= 1:
self.LASTTRY = time.time()
logging.debug("[Fix_Services] Monitor mode failed!")
try:
result = agent.run("wifi.recon off; wifi.recon on")