From 7179ca6652514771b47bc46b2a8f1017b010d261 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Fri, 13 Oct 2023 09:32:10 +0200 Subject: [PATCH] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/google/cmd.py | 4 ++-- pwnagotchi/plugins/default/gdrivesync.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pwnagotchi/google/cmd.py b/pwnagotchi/google/cmd.py index 323b1628..a5c7f012 100644 --- a/pwnagotchi/google/cmd.py +++ b/pwnagotchi/google/cmd.py @@ -59,7 +59,7 @@ def auth(): "complete the verification and then copy/paste the code from addressbar.\n\n" "Code: ") gauth.Auth(user_input) - gauth.SaveCredentialsFile("credentials.json") + gauth.SaveCredentialsFile("/root/credentials.json") except Exception as e: logging.error(f"Error: {e}") return 0 @@ -94,7 +94,7 @@ def refresh(): "complete the verification and then copy/paste the code from addressbar.\n\n" "Code: ") gauth.Auth(user_input) - + gauth.SaveCredentialsFile("/root/credentials.json") gauth.Authorize() print("Succesfully refresh access token ..") return 0 diff --git a/pwnagotchi/plugins/default/gdrivesync.py b/pwnagotchi/plugins/default/gdrivesync.py index 91bf33be..45b36a5c 100644 --- a/pwnagotchi/plugins/default/gdrivesync.py +++ b/pwnagotchi/plugins/default/gdrivesync.py @@ -59,6 +59,7 @@ class GdriveSync(plugins.Plugin): elif gauth.access_token_expired: # Refresh them if expired gauth.Refresh() + gauth.SaveCredentialsFile("/root/credentials.json") gauth.Authorize() # Create GoogleDrive instance