Created
July 4, 2015 16:48
-
-
Save K-atc/d0de0d42f01f95ea2d90 to your computer and use it in GitHub Desktop.
onion Base64 decode
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
| # -*- coding: utf-8 -*- | |
| import sys | |
| import base64 | |
| if not(len(sys.argv) >= 3): | |
| print "onion Base64 decoder: " | |
| print "usage: python onion_base64decode.py <Base64 encoded file> <n>" | |
| exit() | |
| f = open(sys.argv[1], 'r') | |
| sequence = f.read() | |
| f.close() | |
| n = int(sys.argv[2]) | |
| decode = sequence | |
| for i in xrange(0, n): | |
| decode = base64.b64decode(decode) | |
| print decode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment