Created
August 10, 2023 16:03
-
-
Save dumbmoron/020300e30de3a0b29c28c3bb4af061cd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo -en "Enter username: " | |
read W_USERNAME | |
echo -en "Enter password: " | |
read W_PASSWORD | |
TS=$(date +%s) | |
AUTH_HASH=$(echo -en "952b4412f002315aa50751032fcaab03$TS" | md5sum | cut -d' ' -f1) | |
LOGIN_DATA=$(curl -X POST 'https://api.windscribe.com/Session?platform=chrome' \ | |
-H "Content-Type: application/x-www-form-urlencoded" \ | |
-d "username=$W_USERNAME&password=$W_PASSWORD&time=$TS&client_auth_hash=$AUTH_HASH&session_type_id=2" \ | |
) | |
echo "$LOGIN_DATA" | |
SESSION_AUTH=$(echo "$LOGIN_DATA" | jq -r .data.session_auth_hash) | |
CREDS_DATA=$(curl -X GET \ | |
--data-urlencode "client_auth_hash=$AUTH_HASH" \ | |
--data-urlencode "platform=chrome" \ | |
--data-urlencode "session_auth_hash=$SESSION_AUTH" \ | |
--data-urlencode "time=$TS" \ | |
'https://api.windscribe.com/ServerCredentials' \ | |
) | |
echo "$CREDS_DATA" | |
echo "username: $(echo "$CREDS_DATA" | jq .data.username | base64 -d)" | |
echo "password: $(echo "$CREDS_DATA" | jq .data.password | base64 -d)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment