Created
November 10, 2012 16:58
-
-
Save Javran/4051704 to your computer and use it in GitHub Desktop.
....
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
| f = file( "raw", "r" ) | |
| raw = f.read() | |
| f.close() | |
| secret = ''.join( map( lambda x:chr( int(x,2)) , map( lambda x: x.replace("____", "1111") , raw.split() ) ) ) + "=" | |
| import base64 | |
| g = file("sec", "wb") | |
| g.write( base64.b64decode( secret ) ) | |
| g.close() |
Author
made this mistaken by accident, I thought it was "open" while typing "file" actually ...
p.s.: and surprisingly it did work...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When opening a file, it’s preferable to use open() instead of invoking this constructor directly.
Reference: file - Built-in Functinos