diff --git a/bin/pwnagotchi b/bin/pwnagotchi index 536b5d48..302b9131 100755 --- a/bin/pwnagotchi +++ b/bin/pwnagotchi @@ -172,12 +172,12 @@ def pwnagotchi_cli(): % (pwnagotchi.__version__, latest_ver)) # input validation if user_input.lower() in ('y', 'yes'): - os.system("rm /root/.auto-update && systemctl restart pwnagotchi") + if os.path.exists('/root/.auto-update'): + os.system("rm /root/.auto-update && systemctl restart pwnagotchi") + os.system("systemctl restart pwnagotchi") print("Okay, give me a couple minutes. Just watch pwnlog while you wait.") - elif user_input.lower() in ('n', 'no'): # using this elif for readability - print("Okay, guess not!") - else: - print("You are currently on the latest release, v%s." % pwnagotchi.__version__) + print("Okay, guess not!") + print("You are currently on the latest release, v%s." % pwnagotchi.__version__) sys.exit(0) config = utils.load_config(args) diff --git a/pwnagotchi/_version.py b/pwnagotchi/_version.py index 34d7a14c..2836b6ea 100644 --- a/pwnagotchi/_version.py +++ b/pwnagotchi/_version.py @@ -1 +1 @@ -__version__ = '2.6.8' +__version__ = '2.6.9' diff --git a/pwnagotchi/plugins/default/fix_services.py b/pwnagotchi/plugins/default/fix_services.py index 05a068de..d2bd0760 100644 --- a/pwnagotchi/plugins/default/fix_services.py +++ b/pwnagotchi/plugins/default/fix_services.py @@ -105,7 +105,7 @@ class FixServices(plugins.Plugin): other_last_lines = ''.join(list(TextIOWrapper(subprocess.Popen(['journalctl', '-n10'], stdout=subprocess.PIPE).stdout))[-10:]) other_other_last_lines = ''.join( - list(TextIOWrapper(subprocess.Popen(['tail', '-n10', '/var/log/pwnagotchi.log'], + list(TextIOWrapper(subprocess.Popen(['tail', '-n10', '/home/pi/logs/pwnagotchi.log'], stdout=subprocess.PIPE).stdout))[-10:]) # don't check if we ran a reset recently logging.debug("[Fix_Services]**** epoch") diff --git a/pwnagotchi/plugins/default/memtemp.py b/pwnagotchi/plugins/default/memtemp.py index aab7210f..b9003be1 100644 --- a/pwnagotchi/plugins/default/memtemp.py +++ b/pwnagotchi/plugins/default/memtemp.py @@ -141,7 +141,7 @@ class MemTemp(plugins.Plugin): elif ui.is_inky(): h_pos = (140, 68) v_pos = (160, 54) - elif ui.is_waveshare27inch(): + elif ui.is_waveshare2in7(): h_pos = (192, 138) v_pos = (211, 122) else: diff --git a/pwnagotchi/utils.py b/pwnagotchi/utils.py index 717a84bd..83ee24f1 100644 --- a/pwnagotchi/utils.py +++ b/pwnagotchi/utils.py @@ -444,7 +444,10 @@ def iface_channels(ifname): output = subprocess.getoutput("/sbin/iw phy%s channels | grep ' MHz' | grep -v disabled | sed 's/^.*\[//g' | sed s/\].*\$//g" % phy) for line in output.split("\n"): line = line.strip() - channels.append(int(line)) + try: + channels.append(int(line)) + except Exception as e: + pass return channels