From fb138855438c6ade8fbb15ea55081dbafe913dbd Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Fri, 13 Oct 2023 00:15:18 +0200 Subject: [PATCH] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/google/cmd.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pwnagotchi/google/cmd.py b/pwnagotchi/google/cmd.py index 7e6986db..2122badc 100644 --- a/pwnagotchi/google/cmd.py +++ b/pwnagotchi/google/cmd.py @@ -3,6 +3,7 @@ import pydrive2 from pydrive2.auth import GoogleAuth import logging +import os def add_parsers(subparsers): @@ -49,6 +50,9 @@ def auth(): if user_input.lower() in ('y', 'yes'): try: gauth = GoogleAuth(settings_file="settings.yaml") + if not os.path.exists("/root/client_secrets.json"): + logging.error("client_secrets.json not found in /root. Please RTFM!") + return 0 print(gauth.GetAuthUrl()) user_input = input("Please copy this URL into a browser, " "complete the verification and then copy/paste the code from addressbar.")