mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Version 2.3.4
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com> Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
@ -114,14 +114,11 @@ if __name__ == '__main__':
|
|||||||
parser.add_argument('--debug', dest="debug", action="store_true", default=False,
|
parser.add_argument('--debug', dest="debug", action="store_true", default=False,
|
||||||
help="Enable debug logs.")
|
help="Enable debug logs.")
|
||||||
|
|
||||||
parser.add_argument('--version', dest="version", action="store_true", default=False,
|
|
||||||
help="Print the version.")
|
|
||||||
|
|
||||||
parser.add_argument('--print-config', dest="print_config", action="store_true", default=False,
|
parser.add_argument('--print-config', dest="print_config", action="store_true", default=False,
|
||||||
help="Print the configuration.")
|
help="Print the configuration.")
|
||||||
|
|
||||||
parser.add_argument('--check-update', dest="check_update", action="store_true", default=False,
|
parser.add_argument('--check-update', dest="check_update", action="store_true", default=False,
|
||||||
help="Check for updates on Pwnagotchi.")
|
help="Check for updates on Pwnagotchi. And tells current version.")
|
||||||
parser.add_argument('--donate', dest="donate", action="store_true", default=False,
|
parser.add_argument('--donate', dest="donate", action="store_true", default=False,
|
||||||
help="How to donate to this project.")
|
help="How to donate to this project.")
|
||||||
|
|
||||||
@ -145,7 +142,7 @@ if __name__ == '__main__':
|
|||||||
local = version_to_tuple(pwnagotchi.__version__)
|
local = version_to_tuple(pwnagotchi.__version__)
|
||||||
remote = version_to_tuple(latest_ver)
|
remote = version_to_tuple(latest_ver)
|
||||||
if remote > local:
|
if remote > local:
|
||||||
user_input = input("There is a new version available! Update to %s? [y(es)/n(o)]" % latest_ver)
|
user_input = input("There is a new version available! Update from v%s to v%s?\n[y(es)/n(o)]" % (pwnagotchi.__version__, latest_ver))
|
||||||
# input validation
|
# input validation
|
||||||
if user_input.lower() in ('y', 'yes'):
|
if user_input.lower() in ('y', 'yes'):
|
||||||
os.system("rm /root/.auto-update && systemctl restart pwnagotchi")
|
os.system("rm /root/.auto-update && systemctl restart pwnagotchi")
|
||||||
@ -155,11 +152,7 @@ if __name__ == '__main__':
|
|||||||
elif user_input.lower() in ('n', 'no'): # using this elif for readability
|
elif user_input.lower() in ('n', 'no'): # using this elif for readability
|
||||||
print("Okay, guess not!")
|
print("Okay, guess not!")
|
||||||
else:
|
else:
|
||||||
print("You are currently on the latest release, %s." % pwnagotchi.__version__)
|
print("You are currently on the latest release, v%s." % pwnagotchi.__version__)
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
if args.version:
|
|
||||||
print(pwnagotchi.__version__)
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
config = utils.load_config(args)
|
config = utils.load_config(args)
|
||||||
|
@ -1 +1 @@
|
|||||||
__version__ = '2.3.3'
|
__version__ = '2.3.4'
|
||||||
|
@ -51,13 +51,13 @@ class Client(object):
|
|||||||
logging.debug("Error while parsing event (%s)", ex)
|
logging.debug("Error while parsing event (%s)", ex)
|
||||||
except websockets.exceptions.ConnectionClosedError:
|
except websockets.exceptions.ConnectionClosedError:
|
||||||
logging.debug("Lost websocket connection. Reconnecting...")
|
logging.debug("Lost websocket connection. Reconnecting...")
|
||||||
await asyncio.sleep(1) # Sleep for 5 seconds before reconnecting
|
await asyncio.sleep(1) # Sleep for x seconds before reconnecting
|
||||||
except websockets.exceptions.WebSocketException as wex:
|
except websockets.exceptions.WebSocketException as wex:
|
||||||
logging.debug("Websocket exception (%s)", wex)
|
logging.debug("Websocket exception (%s)", wex)
|
||||||
await asyncio.sleep(1) # Sleep for 5 seconds before reconnecting
|
await asyncio.sleep(1) # Sleep for x seconds before reconnecting
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.exception("Other error while opening websocket (%s) with parameter %s", e, s)
|
logging.exception("Other error while opening websocket (%s) with parameter %s", e, s)
|
||||||
await asyncio.sleep(1) # Sleep for 5 seconds before reconnecting
|
await asyncio.sleep(1) # Sleep for x seconds before reconnecting
|
||||||
|
|
||||||
def run(self, command, verbose_errors=True):
|
def run(self, command, verbose_errors=True):
|
||||||
for _ in range(0, 2):
|
for _ in range(0, 2):
|
||||||
|
Reference in New Issue
Block a user