Skip to content

Instantly share code, notes, and snippets.

@ruimaranhao
Created September 25, 2018 09:29
Show Gist options
  • Save ruimaranhao/fc43b82e1232b525e4e9e0182d11e1a7 to your computer and use it in GitHub Desktop.
Save ruimaranhao/fc43b82e1232b525e4e9e0182d11e1a7 to your computer and use it in GitHub Desktop.
Google's Foobar: Decrypt last message, once all puzzles are solved.
#!/usr/bin/python
import base64
MESSAGE = '''
CVIaWw4CFxIdT0FVUlIOXAgABkZCSEYMHRkFSwwGBwRJSFtPVRAaWggEHwQKT01PVRAPSAITBhJJ SFtPVRwHTR8EFggMBARIXlVOTw4JGwQYDQwKHAFODldBVRQABA4MGRANCUFBVRMPCgMGBgZODldB VRIPDgRIXlVOSAIOVUFUSEYYGxtICRA=
'''
KEY = 'rui.maranhao'
print(''.join(map(lambda x: chr(x[1] ^ ord(KEY[x[0] % len(KEY)])), enumerate(base64.b64decode(MESSAGE)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment