mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Version 2.3.7
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com> Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
@ -95,6 +95,7 @@ def verify(name, path, source_path, display, update):
|
||||
|
||||
|
||||
def install(display, update):
|
||||
|
||||
name = update['repo'].split('/')[1]
|
||||
|
||||
path = make_path_for(name)
|
||||
@ -125,7 +126,6 @@ def install(display, update):
|
||||
|
||||
# setup.py is going to install data files for us
|
||||
os.system("cd %s && pip3 install ." % source_path)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
@ -189,9 +189,15 @@ class AutoUpdate(plugins.Plugin):
|
||||
for repo, local_version, is_native, svc_name in to_check:
|
||||
info = check(local_version, repo, is_native)
|
||||
if info['url'] is not None:
|
||||
# Turn of bettercap wifi recon while updating
|
||||
from pwnagotchi.bettercap import Client
|
||||
agent = Client('localhost', port=8081, username="pwnagotchi", password="pwnagotchi")
|
||||
agent.run("wifi.recon off")
|
||||
|
||||
logging.warning(
|
||||
"update for %s available (local version is '%s'): %s" % (
|
||||
repo, info['current'], info['url']))
|
||||
logging.info("[update] turned off wifi recon ...")
|
||||
info['service'] = svc_name
|
||||
to_install.append(info)
|
||||
|
||||
|
@ -286,7 +286,7 @@ class FixServices(plugins.Plugin):
|
||||
# unload the module
|
||||
cmd_output = subprocess.check_output("sudo modprobe -r brcmfmac", shell=True)
|
||||
self.logPrintView("info", "[Fix_Services] unloaded brcmfmac", display,
|
||||
{"status": "Turning it off #%d" % tries, "face": faces.SMART})
|
||||
{"status": "Turning it off #%s" % tries, "face": faces.SMART})
|
||||
self._status = "ul"
|
||||
time.sleep(1 + tries)
|
||||
|
||||
@ -301,12 +301,9 @@ class FixServices(plugins.Plugin):
|
||||
|
||||
# success! now make the mon0
|
||||
try:
|
||||
cmd_output = subprocess.check_output(
|
||||
"monstart",
|
||||
shell=True)
|
||||
self.logPrintView("info",
|
||||
"[Fix_Services interface add wlan0mon] worked #%d: %s" % (
|
||||
tries, cmd_output))
|
||||
cmd_output = subprocess.check_output("monstart", shell=True)
|
||||
self.logPrintView("info", "[Fix_Services interface add wlan0mon] worked #%s: %s"
|
||||
% (tries, cmd_output))
|
||||
self._status = "up"
|
||||
time.sleep(tries + 5)
|
||||
try:
|
||||
@ -326,15 +323,15 @@ class FixServices(plugins.Plugin):
|
||||
logging.info(
|
||||
"[Fix_Services set wifi.interface wlan0mon] except: %s" % repr(err))
|
||||
except Exception as cerr: #
|
||||
if not display: print("failed loading wlan0mon attempt #%d: %s" % (tries, repr(cerr)))
|
||||
if not display: print("failed loading wlan0mon attempt #%s: %s" % (tries, repr(cerr)))
|
||||
except Exception as err: # from modprobe
|
||||
if not display: print("Failed reloading brcmfmac")
|
||||
logging.error("[Fix_Services] Failed reloading brcmfmac %s" % repr(err))
|
||||
|
||||
except Exception as nope: # from modprobe -r
|
||||
# fails if already unloaded, so probably fine
|
||||
logging.error("[Fix_Services #%d modprobe -r] %s" % (tries, repr(nope)))
|
||||
if not display: print("[Fix_Services #%d modprobe -r] %s" % (tries, repr(nope)))
|
||||
logging.error("[Fix_Services #%s modprobe -r] %s" % (tries, repr(nope)))
|
||||
if not display: print("[Fix_Services #%s modprobe -r] %s" % (tries, repr(nope)))
|
||||
pass
|
||||
|
||||
tries = tries + 1
|
||||
|
Reference in New Issue
Block a user