summaryrefslogtreecommitdiffstats
path: root/skripti/discord_token.sh
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-10-15 16:18:50 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2023-10-15 16:18:50 +0200
commit8556f60e28b53ddbf1155b94c25ebba3093ab896 (patch)
tree596887bdce742575ba01b76e95fd9c8c2ec5e1fa /skripti/discord_token.sh
parentoc challs (diff)
downloadr-8556f60e28b53ddbf1155b94c25ebba3093ab896.tar
r-8556f60e28b53ddbf1155b94c25ebba3093ab896.tar.gz
r-8556f60e28b53ddbf1155b94c25ebba3093ab896.tar.bz2
r-8556f60e28b53ddbf1155b94c25ebba3093ab896.tar.lz
r-8556f60e28b53ddbf1155b94c25ebba3093ab896.tar.xz
r-8556f60e28b53ddbf1155b94c25ebba3093ab896.tar.zst
r-8556f60e28b53ddbf1155b94c25ebba3093ab896.zip
Diffstat (limited to 'skripti/discord_token.sh')
-rwxr-xr-xskripti/discord_token.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/skripti/discord_token.sh b/skripti/discord_token.sh
new file mode 100755
index 0000000..73e4ed9
--- /dev/null
+++ b/skripti/discord_token.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+c=null
+[ $2x = x ] || c=$2
+r=`curl -X POST -H "Content-Type: application/json" https://discord.com/api/v9/auth/login --data-raw "{\"login\":\"$1\",\"password\":\"$DC_P\",\"undelete\":\"false\",\"captcha_key\":$c,\"login_source\":null,\"gift_code_sku_id\":null}"`
+jq -r .token <<<$r