Skip to content

Instantly share code, notes, and snippets.

@miguelff
Last active August 29, 2015 14:12
Show Gist options
  • Save miguelff/ec10594afcfa8bd94358 to your computer and use it in GitHub Desktop.
Save miguelff/ec10594afcfa8bd94358 to your computer and use it in GitHub Desktop.
def obfuscated():
d=[0x20]*0x0D;o=0x61;
for x in [[7,11],2,[10,12],[1],[0],2,[3,9],2,[2],1,[6],7,[8],3,[4]]:
if hasattr(x, '__len__'):
for c in x:
d[c]=o
o=o+1
else:
o=o+x
return "".join(map(chr, d))
if __name__ == '__main__':
import unittest
class ObfuscatedTest(unittest.TestCase):
def test_obfuscated(self):
self.assertEqual('feliz navidad', obfuscated())
unittest.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment