Commit d618746a authored by chukwuka chime's avatar chukwuka chime
Browse files

updates to settings

parent 8768a053
No related merge requests found
Showing with 33 additions and 22 deletions
+33 -22
#!/usr/bin/env python3
"""
usage: python3 {} help|info|list|sync
help Show this help.
info Show WhatsApp backups.
list Show WhatsApp backup files.
sync Download all WhatsApp backups.
"""
import pymemri
from pymemri.data.schema import *
......@@ -19,16 +28,6 @@ import requests
import sys
"""
usage: python3 {} help|info|list|sync
help Show this help.
info Show WhatsApp backups.
list Show WhatsApp backup files.
sync Download all WhatsApp backups.
"""
DEFAULT_POD_ADDRESS = "http://localhost:3030"
POD_VERSION = "v3"
......@@ -101,18 +100,24 @@ class WaBackup:
"""
Provide access to WhatsApp backups stored in Google drive.
"""
def __init__(self, gmail, password, android_id):
def __init__(self, gmail, password, android_id, package, app_signature, client_signature):
token = gpsoauth.perform_master_login(gmail, password, android_id)
if "Token" not in token:
quit(token)
self.auth = gpsoauth.perform_oauth(
gmail,
token["Token"],
android_id,
"oauth2:https://www.googleapis.com/auth/drive.appdata",
"com.whatsapp",
"38a0f7d505fe18fec64fbf343ecaaaf310dbd799",
)
print("this is app_signature::"+app_signature)
print("this is client_signature::"+client_signature)
print("this is package::"+package)
print("this is android_id::"+android_id)
print("this is::"+token)
print("this is Token::"+token)
# if "Token" not in token:
# quit(token)
# self.auth = gpsoauth.perform_oauth(
# gmail,
# token["Token"],
# android_id,
# "oauth2:https://www.googleapis.com/auth/drive.appdata",
# package,
# app_signature,
# )
def get(self, path, params=None, **kwargs):
response = requests.get(
......@@ -198,10 +203,16 @@ def getConfigs():
except KeyboardInterrupt:
quit('\nCancelled!')
android_id = config.get("auth", "android_id")
package = config.get("app", "pkg")
app_signature = config.get("app", "sig")
client_signature = config.get("client", "sig")
return {
"android_id": android_id,
"gmail": gmail,
"password": password,
"package": package,
"app_signature": app_signature,
"client_signature": client_signature,
}
except (configparser.NoSectionError, configparser.NoOptionError):
quit('The "settings.cfg" file is missing or corrupt!')
......
[auth]
gmail = chuksleo.mark@gmail.com
password = DaddyElena4real@money
password = ******************
# The result of "adb shell settings get secure android_id".
android_id = 28de077ce0bc2e88
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment