Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Takes a URL encoded file (such as a TCP stream) and decodes it.
#!/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()
@BeanBagKing
Copy link
Author

BeanBagKing commented Oct 20, 2016

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.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment