Skip to content
Permalink
Browse files

add easter egg

  • Loading branch information...
Mego committed Jul 19, 2016
1 parent c2b0823 commit ae71a1bb9a3663713ae479421f1595f246ba02b6
Showing with 15 additions and 11 deletions.
  1. +2 −1 requirements.txt
  2. +12 −9 seriously/seriously.py
  3. +1 −1 setup.py
@@ -1 +1,2 @@
stats
stats
pycrypto
@@ -14,6 +14,7 @@
from . import SeriouslyCommands
from lib.cp437 import CP437
from lib.iterable import deque, as_list
from Crypto.Cipher import AES

anytype = SeriouslyCommands.anytype

@@ -169,15 +170,17 @@ def eval(self, code):
return as_list(self.stack)[::-1]


def srs_exec(debug_mode=False, file_obj=None, code=None):
def srs_exec(debug_mode=False, file_obj=None, code=None, ide_mode=False):
code = code or file_obj.read()
if (not ide_mode) and hashlib.sha256(code.encode()).hexdigest() == 'e8809dfaff977e1b36210203b7b44e83102263444695c1123799bc43358ae1c2':
hidden = binascii.unhexlify(b'f2ac048e406d7244ca202e34841611e115a9c97d554d0681a9ad1bb8f3d7f30b083ae2bae60721228fa5caaa39d205e4e8c61421b9e8fdcbd4b03cafa0e6d726540de6e8bbddf42796a63eb3112c0890bc2f32a435ae304c1bc8d9a463402c9ef1b3fcdbf53743cb737a147bb1aa16e4a71a22adac29d1b310358c40699edf897942e83ff7e1949777eebc02e9ecf24e')
cipher = AES.new(code.encode(), AES.MODE_ECB)
secret = cipher.decrypt(hidden).decode()
exec(secret)
exit()
srs = Seriously(debug_mode=debug_mode)
if file_obj:
for x in srs.eval(file_obj.read()):
print(x)
file_obj.close()
else:
for x in srs.eval(code):
print(x)
for x in srs.eval(code):
print(x)


def ide_mode():
@@ -197,7 +200,7 @@ def main():
args = parser.parse_args()
if args.ide:
ide_mode()
srs_exec(args.debug, args.file, args.code)
srs_exec(args.debug, args.file, args.code, args.ide)

if __name__ == '__main__':
main()
@@ -6,7 +6,7 @@
setup(
name='seriously',

version='2.0.25',
version='2.0.26',

description='A Python-based golfing language',
long_description='Seriously is a Python-based golfing language. See the GitHub page for more details.',

0 comments on commit ae71a1b

Please sign in to comment.
You can’t perform that action at this time.