Created
October 20, 2016 15:26
-
-
Save BeanBagKing/d6804c8b0fbb855a95c9c60d7f43e438 to your computer and use it in GitHub Desktop.
Takes a URL encoded file (such as a TCP stream) and decodes it.
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
#!/usr/bin/python | |
import urllib | |
fin = open("urlencoded.txt") | |
fout = open("urldecoded.txt", "wt") | |
for line in fin: | |
fout.write(urllib.unquote(line)) | |
fin.close() | |
fout.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lots of examples on how to do this with strings. I couldn't find a single one that performed the action on an entire file though.