From 5600028d115f55f2b827f2127f85300ce92aba7a Mon Sep 17 00:00:00 2001 From: ThePirateWhoSmellsOfSunflowers Date: Tue, 16 Apr 2024 15:39:04 +0200 Subject: [PATCH] graceful exit --- donpapi/lib/google_refresh_token.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/donpapi/lib/google_refresh_token.py b/donpapi/lib/google_refresh_token.py index 9a57b30..6b51ae9 100644 --- a/donpapi/lib/google_refresh_token.py +++ b/donpapi/lib/google_refresh_token.py @@ -100,6 +100,9 @@ def main(): client_secret = 'OTJgUOQcT7lO7GsGZq2G4IlT' refresh_token = options.token access_token = refreshToken2(client_id, client_secret, refresh_token) + if not access_token: + print("[x] Error, the refresh token seems not valid") + sys.exit(1) print(f'[+] Access_token: {access_token}\n') ubertoken = get_ubertoken(access_token) print(f'[+] Click on this link to get a websession for this user: {ubertoken}\n')