Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Memri
plugins
whatsapp-backup
Commits
d618746a
Commit
d618746a
authored
4 years ago
by
chukwuka chime
Browse files
Options
Download
Email Patches
Plain Diff
updates to settings
parent
8768a053
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
plugin.py
+32
-21
plugin.py
settings.cfg
+1
-1
settings.cfg
with
33 additions
and
22 deletions
+33
-22
plugin.py
+
32
-
21
View file @
d618746a
#!/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
(
'
\n
Cancelled!'
)
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!'
)
...
...
This diff is collapsed.
Click to expand it.
settings.cfg
+
1
-
1
View file @
d618746a
[auth]
gmail = chuksleo.mark@gmail.com
password =
DaddyElena4real@money
password =
******************
# The result of "adb shell settings get secure android_id".
android_id = 28de077ce0bc2e88
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets