Last active
October 28, 2023 16:09
-
-
Save jacquerie/cfb8a56636e2b9e12f51 to your computer and use it in GitHub Desktop.
How to decode the message at the end of Google Foobar
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
#!/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) |
where can i find the key?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To visualize decode steps, go to following CyberChef recipe:
https://gchq.github.io/CyberChef/#recipe=From_Base64('A-Za-z0-9%2B/%3D',true)XOR(%7B'option':'Latin1','string':'jacopo.notarstefano'%7D,'Standard',false)&input=RVVZUUdoTU1TeDBjVTBGSVUxTUNGQVFQRzAxTlEwZ1RBRUlDQ2hVR0J4WlRSVnhCU1FvWkZRWUtIUXBLU1VOVVJoY1ZFZ29VRlIxSVNsdERTQmtCVFJ3S0VBZ1FIeEZDU2tGSkRna0pDZ29HQ2tNTEFRQkdVa2xVUWhNUEFnQUpDZ1lMVjBNT1NSMFZBeEFhQUJaQlFWUlBUUklDQ1JWSUFrNUlFZzRkVkZSZlJrWVpCZ1JBUkJJPQ