Last active
October 30, 2017 08:33
-
-
Save zh4n7wm/590fad5264204787ff81a0cafbcace41 to your computer and use it in GitHub Desktop.
URI encode and decode in command line
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
alias urldecode='python3 -c "import sys; from urllib.parse import unquote_plus as up; print(up(sys.argv[1],encoding=\"utf-8\" if len(sys.argv)<=2 else sys.argv[2]))"' | |
alias urlencode='python3 -c "import sys; from urllib.parse import quote_plus as qp; print(qp(sys.argv[1],encoding=\"utf-8\" if len(sys.argv)<=2 else sys.argv[2]))"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment