From 7574ad66a41b5cbe126a49cf191bd04936cf2c28 Mon Sep 17 00:00:00 2001 From: Ave Ozkal Date: Sun, 26 May 2019 20:08:03 +0300 Subject: [PATCH] Add tokenlogin patch --- patches/tokenlogin/903.patch | 33 +++++++++++++++++++++++++++++++++ patches/tokenlogin/README.md | 10 ++++++++++ 2 files changed, 43 insertions(+) create mode 100644 patches/tokenlogin/903.patch create mode 100644 patches/tokenlogin/README.md diff --git a/patches/tokenlogin/903.patch b/patches/tokenlogin/903.patch new file mode 100644 index 00000000..cf9e5728 --- /dev/null +++ b/patches/tokenlogin/903.patch @@ -0,0 +1,33 @@ +diff -crB com.discord-903-base/smali/com/discord/widgets/auth/WidgetAuthLogin.smali com.discord-903/smali/com/discord/widgets/auth/WidgetAuthLogin.smali +*** com.discord-903-base/smali/com/discord/widgets/auth/WidgetAuthLogin.smali 2019-05-24 23:40:49.834137133 +0300 +--- com.discord-903/smali/com/discord/widgets/auth/WidgetAuthLogin.smali 2019-05-26 20:05:10.994568709 +0300 +*************** +*** 943,948 **** +--- 943,969 ---- + + move-result-object v3 + ++ # tokenlogin code ++ ++ const-string v6, "tokenlogin" ++ ++ invoke-virtual {v2, v6}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z ++ ++ move-result v6 ++ ++ if-eqz v6, :cond_2 ++ ++ invoke-static {}, Lcom/discord/stores/StoreStream;->getUserSettings()Lcom/discord/stores/StoreUserSettings; ++ ++ move-result-object v6 ++ ++ invoke-virtual {v6, v3}, Lcom/discord/stores/StoreUserSettings;->setStoredToken(Ljava/lang/String;)V ++ ++ return-void ++ ++ # end of new code (except conf below, that's also new) ++ ++ :cond_2 + invoke-virtual {v0, v2, v3, p1, p2}, Lcom/discord/stores/StoreAuthentication;->login(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)Lrx/Observable; + + move-result-object p1 diff --git a/patches/tokenlogin/README.md b/patches/tokenlogin/README.md new file mode 100644 index 00000000..39a2d7ff --- /dev/null +++ b/patches/tokenlogin/README.md @@ -0,0 +1,10 @@ +## DisTok CutTheCord: Token Login Patch + +This patch allows you to login with just a token. + +On login screen, set email to anything that starts with `tokenlogin`, such as `tokenlogin@example.com`. Set password to token, press login. Close app, restart it, and you'll automatically get logged in with that token. + +This patch relies on some stuff I added with slashcommands, so please use that patch in too. + +#### Available and tested on: +- 9.0.3