Last active
March 29, 2019 22:15
-
-
Save lulalachen/be74c3e67dc622b8c07735d644f8922a to your computer and use it in GitHub Desktop.
Copy the curl from the network and run this command in terminal
This file contains 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
# Or you can replace the `pbpaste` with the curl you copied | |
# and remember to add a `\` and the end of line | |
curl 'https://url.com/auth/v1/login?type=admin' -X POST -H 'Accept: application/json' -H 'Referer: https://url.com/login?next=/profile/personal' -H 'Origin: https://urlcom' -H 'User-Agent: Chrome/73.0.3683.86 Safari/537.36' -H 'Authorization: Basic xxxxxxxxxxx' -H 'Content-Type: application/json' --compressed \ | |
| bash \ | |
| tr -d '[:space:]' \ | |
| sed -e 's/roles/role/g' \ | |
| sed -e 's/\["/"/g' \ | |
| sed -e 's/\"]/"/g' \ | |
| ( \ | |
echo "Object.entries(" \ | |
&& cat \ | |
&& echo ").map(([k,v]) => localStorage.setItem(k, v))" \ | |
&& echo "localStorage" \ | |
) \ | |
| pbcopy |
This file contains 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
# Steps | |
# 1. Copy the `curl` of the network request | |
# 2. Run this command in terminal | |
# 3. Go into the browser and paste in browser console | |
pbpaste \ | |
| bash \ | |
| tr -d '[:space:]' \ | |
| sed -e 's/roles/role/g' \ | |
| sed -e 's/\["/"/g' \ | |
| sed -e 's/\"]/"/g' \ | |
| ( \ | |
echo "Object.entries(" \ | |
&& cat \ | |
&& echo ").map(([k,v]) => localStorage.setItem(k, v))" \ | |
&& echo "localStorage" \ | |
) \ | |
| pbcopy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment