Skip to content

Instantly share code, notes, and snippets.

@jacquerie
Last active October 28, 2023 16:09
Show Gist options
  • Star 20 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save jacquerie/cfb8a56636e2b9e12f51 to your computer and use it in GitHub Desktop.
Save jacquerie/cfb8a56636e2b9e12f51 to your computer and use it in GitHub Desktop.
How to decode the message at the end of Google Foobar
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import base64
MESSAGE = '''
EUYQGhMMSx0cU0FIU1MCFAQPG01NQ0gTAEICChUGBxZTRVxBSQoZFQYKHQpKSUNURhcVEgoUFR1I
SltDSBkBTRwKEAgQHxFCSkFJDgkJCgoGCkMLAQBGUklUQhMPAgAJCgYLV0MOSR0VAxAaABZBQVRP
TRICCRVIAk5IEg4dVFRfRkYZBgRARBI=
'''
KEY = 'jacopo.notarstefano'
result = []
for i, c in enumerate(base64.b64decode(MESSAGE)):
result.append(chr(ord(c) ^ ord(KEY[i % len(KEY)])))
print ''.join(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment