Diablo, your quest begin

NDH 2018 - RE (350 pts).

NDH 2018 - Diablo, your quest begin

Event Challenge Category Points Solves
Nuit du hack 16 Diablo, your quest begin Reverse 350 1 (Not us)

Description

This is the first part of the Diablo CrackMe series. It’s an encrypted python program embedded in an ELF executable. We did not manage to validate it during the CTF because we lacked time but I decided to finish it afterwards and publish a write-up anyways.

TL;DR

Extract the python bytecode using binwalk, pycdas doesn’t work so use marshal to introspect the object and find the AES key. Decrypt the file with the key and ECB mode. Deobfuscate the python source file to understand it’s some kind of xor encryption. Recover the right attack to pass.

Choosing the right path

@TomTomBinary spent several hours trying to understand the inner mechanics of the binary but with no big luck.

By using LD_PRELOAD to trace the PyEval calls, he managed to understand that the binary would decompress some ZIP files contained inside the binary itself. Those ZIP files contained python libraries and other stuff. The binary would also write encrypted data to a file called attacks.py, surely the python code that is executed, but it never opens it for reading.

This is what misled us, we didn’t know where to look at.

Hours passed and motivation faded. That’s when we heard that some people had tried to extract bytecode with binwalk.

Extracting the python bytecode

We decided to do the dirty binwalk extract to recover all the files that were packed inside the binary.

$ binwalk -e diablo1

Because we’ve played a bit with the binary, we can now search for strings in those files :

$ grep "you're so weak," *
Binary file B261 matches

Nice ! Only one matches, we can confirm that it’s the right one by running strings on it. We knew it had to be python bytecode so we decided to disassemble it with pycdas.

Quest for the AES key

Because the magic number and the timestamp was missing, we had to search for the right values on the Internet, and after that pycdas would be able to decompile it (at least we hopped):

$ pycdas B261_python27
B261_python27 (Python 2.7)
[Code]
    File Name: diablo.py
    Object Name: <module>
    Arg Count: 0
    Locals: 0
    Stack Size: 0
    Flags: 0x00000040 (CO_NOFREE)
    [Names]
        'sys'
        'time'
        'os'
        'imp'
        'base64'
        'Crypto.Cipher'
        'AES'
        'SIGNATURE'
        'object'
        'AESCypher'
        'BaseLoader'
        'Loader'
        'Finder'
        'install_hook'
        'sleep'
        'getattr'
        'False'
        'attacks'
        'striking_deadly_shot'
    [Var Names]
    [Free Vars]
    [Cell Vars]
    [Constants]
        None
        666
        13
        -1
        'rings'
        'scrolls'
        (
            'AES'
        )
        'AESENC:'
        'AESCypher'
        [Code]
            File Name: diablo.py
            Object Name: AESCypher
            Arg Count: 0
            Locals: 0
            Stack Size: 4
            Flags: 0x00000042 (CO_NEWLOCALS | CO_NOFREE)
            [Names]
                '__name__'
                '__module__'
                '__init__'
                'add_padding'
                'encode_aes'
                'decode_aes'
                'encrypt'
                'decrypt'
            [Var Names]
            [Free Vars]
            [Cell Vars]
            [Constants]
                'kikou'
                16
                '$'
                [Code]
                    File Name: diablo.py
                    Object Name: __init__
                    Arg Count: 4
                    Locals: 4
                    Stack Size: 2
                    Flags: 0x00000043 (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)
                    [Names]
                        'block_size'
                        'padding'
                        'os'
                        'urandom'
                        'secret'
                    [Var Names]
                        'self'
                        'secret'
                        'block_size'
                        'padding'
                    [Free Vars]
                    [Cell Vars]
                    [Constants]
                        None
                    [Disassembly]
                        0       COMPARE_OP              2 (==)
                        3       COMPARE_OP              0 (<)
                        6       IMPORT_FROM             0: block_size
                        9       COMPARE_OP              3 (!=)
                        12      COMPARE_OP              0 (<)
                        15      IMPORT_FROM             1: padding
                        18      COMPARE_OP              1 (<=)
Error disassembling B261_python27: vector
                        21      STORE_FAST              

So frustrating ! It fails to decompile completely but at least we get some useful informations.

We have the confirmation that it uses AES, we see some constants, a function name, …

We need to find the AES key to decrypt attacks.py. Therefore we used the module marshal so we could get a python code object and introspect it directly from the interpreter:

import marshal
d = open("B261","r")
code = marshal.load(d)

>>> code.co_consts[9]
<code object AESCypher at 0x104afbcb0, file "diablo.py", line 11>

But nothing interesting there.

>>> code.co_consts[15]
<code object Loader at 0x104b0c0b0, file "diablo.py", line 58>

>>> code.co_consts[15].co_consts[-1]
<code object decrypt at 0x104b0c030, file "diablo.py", line 88>

>>> code.co_consts[15].co_consts[-1].co_consts
(None, 'OneMoreStep_for_flag_dont_GiveUp')

>>> len('OneMoreStep_for_flag_dont_GiveUp')
32

Could it be an AES Key ??

It was the end of the CTF, only 30 minutes left, we were tired but this find boosted our motivation !

We first tried with CBC and a null IV :

from Crypto.Cipher import AES

cipher = open("attacks.py","r").read()
cipher = cipher.split("AESENC:")[1]
cipher = cipher.decode("base64")

def decrypt(s):
    aes = AES.new("OneMoreStep_for_flag_dont_GiveUp", AES.MODE_CBC, "\x00"*16)
    return aes.decrypt(s)
decrypt(cipher)[:100]
'def striking_dea\xe4\xdd\xf7j\xc2g\xd7\x1fe\x0b\x95\xbb\xc0\x02&\xd0=\xd7i*\x94n\x8e\xc5\x18\xec\x91\xe7\x08\x17\xf4\xc7\x12\xb2\xcdc\x16\xa3\x94y\xc6d\xda\x8bh5\xed\x98\xce}\x8c\xd7\x9a\xc7\xa9\x18\xd2\xb7\x94\xe2\xd5\x92>\xaa\xb3\xe9\xba\n\x07\xf4d\xb2\xdf\x90\xc4\x90B\xafYa8W\xdcp'

Only the first block was decrypted, it must be ECB mode then :

def decrypt(s):
    aes = AES.new("OneMoreStep_for_flag_dont_GiveUp", AES.MODE_ECB, "\x00"*16)
    return aes.decrypt(s)

open("decrypted.py","w").write(decrypt(cipher))

Nice ! Now we got the attacks.py decrypted. Only one last step…

And then we saw it. The mighty monstrosity that awaited us, guarding the flag.

def striking_deadly_shot():
    (lambda __,_____,____,______,___,_,_______,________:getattr(__import__(().__class__.__eq__.__class__.__name__[_<<______]+().__class__.__eq__.__class__.__name__[__+____]),().__class__.__eq__.__class__.__name__[(lambda:____).func_code.co_nlocals]+().__class__.__eq__.__class__.__name__[(_<<______)+_]+().__class__.__eq__.__class__.__name__[(_<<___)+(_<<__)+_]+().__class__.__eq__.__class__.__name__[(_<<______)-_]+().__class__.__eq__.__class__.__name__[(_<<___)+_])(_,(lambda _____,_,__,___,____:_____(_____,_,__,___,____))(lambda _____,_,__,___,____:chr((_^__)%___)+_____(_____,_//___,__,___,____) if _ else (lambda:_).func_code.co_lnotab,(((((________<<__)-_)<<_______)+___)<<((((_<<______)+_)<<_______)+(_<<_)))+(((________<<_______)-_____)<<((((_<<______)+_)<<_______)-(_<<___)))+(((((___<<___)+_)<<_______)-(_____<<__)+_)<<((((_<<______)+_)<<_______)-(___<<___)+_))+((((((_<<___)+_))<<_____)-(_____<<__)+_)<<((_<<((________<<_)))+(_____<<__)))+(((_<<((________<<_)))+(________<<__)-_)<<((_<<((________<<_)))+(_<<______)))+((((((_<<___)+_))<<_____)-((___<<__)-_))<<((_<<((________<<_)))+(_<<__)))+(((((________<<__)-_)<<_______)-(((_<<___)+_)))<<((_<<((________<<_)))-(((_<<___)+_))))-(((_____<<_____)+(_<<______)-_)<<((_<<((________<<_)))-(________<<__)))+(((((___<<__)+_)<<_____)+(_<<_______)-_)<<((((_<<______)-_)<<_______)+(_<<________)-_))-(((_<<((________<<_)))+(________<<__)+_)<<((((_<<______)-_)<<_______)+(________<<__)-_))+((((((_<<___)+_))<<___)+___)<<((((_<<______)-_)<<_______)+((___<<__)-_)))+(((((________<<__)-_)<<________)+(((_<<___)+_)))<<((((_<<______)-_)<<_______)-________))-(((((___<<__)+_)<<_______)+_____)<<((((_<<______)-_)<<_______)-(_<<______)-_))-(((((___<<__)+_)<<_______)+(_<<________)-_)<<((((_<<______)-_)<<_______)-(_____<<__)))+(((((___<<__)+_)<<______)+_____)<<((_____<<_____)+(((___<<__)+_)<<_)))+(((((___<<__)-_)<<_____)-(_<<______)+_)<<((_____<<_____)+(___<<__)))+(((((___<<__)+_)<<______)+_)<<((_____<<_____)+(_<<_)))+(((___<<_______)-_____)<<((_____<<_____)-(((_<<___)+_))))-(((((________<<__)-_)<<_______)+_____)<<((_____<<_____)-(___<<___)))+(((_____<<_____)+(_<<______)+_)<<((((___<<__)+_)<<_______)+(_____<<__)))+(((___<<_____)+(((_<<___)+_)))<<((((___<<__)+_)<<_______)+(_<<______)+_))+(((_<<((________<<_)))+(________<<__)+_)<<((((___<<__)+_)<<_______)+(_<<__)))+(((((___<<__)+_)<<________)-(((_<<___)+_)))<<((((___<<__)+_)<<_______)-(___<<_)))-(((((___<<__)-_)<<_______)-_)<<((((___<<__)+_)<<_______)-((((_<<___)+_))<<_)))+(((((_<<______)-_)<<_______)-(_____<<__)-_)<<((((___<<__)+_)<<_______)-(_<<________)+_))+(((_____<<_____)+(((_<<___)+_)))<<((___<<____)+(________<<__)+_))-(((((___<<__)+_)<<________)-((___<<__)-_))<<((___<<____)+((___<<__)-_)))-(((((___<<__)+_)<<_______)+(((_<<___)+_)))<<((___<<____)-_))-(((_____<<_____)+(_<<______)-_)<<((___<<____)-(___<<__)))+(((___<<____)+(((_<<___)+_)))<<((((___<<___)-_)<<________)+(_<<___)))+(((________<<______)-___)<<((((___<<___)-_)<<________)-(_<<_)))+(((((________<<__)+_)<<________)+((___<<__)+_))<<((((___<<__)-_)<<_______)+(_<<______)-_))-(((________<<_______)+________)<<((((___<<__)-_)<<_______)+________))-(((((________<<__)+_)<<______)+___)<<((((___<<__)-_)<<_______)-_____))+(((_<<((________<<_)))+(________<<__)+_)<<((((________<<__)+_)<<________)+(___<<__)))+(((_<<((________<<_)))+(________<<__)-_)<<((((________<<__)+_)<<________)))+((((((_<<___)+_))<<_____)-((___<<__)-_))<<((((________<<__)+_)<<________)-(___<<__)))+(((((________<<__)-_)<<______)-________)<<((________<<_____)+(((_<<___)+_))))+(((___<<____)-(_<<______)+_)<<((________<<_____)-___))-(((((___<<__)+_)<<_______)-(________<<__)-_)<<((________<<_____)-(_____<<_)))-(((((_<<______)-_)<<_______)+(___<<___)+_)<<((((________<<__)-_)<<________)+_____))-((((((_<<___)+_))<<______)+___)<<((((________<<__)-_)<<________)-(_<<_)))+(((((_<<______)-_)<<_______)-(________<<__)+_)<<((((________<<__)-_)<<________)-(_<<______)+_))+(((((_<<______)+_)<<________)+_)<<(((((_<<___)+_))<<_______)+________))-(((((___<<__)+_)<<________)-((___<<__)-_))<<(((((_<<___)+_))<<_______)-________))-(((((________<<__)+_)<<________)+_____)<<((((_<<______)+_)<<________)+(_____<<_)))+(((((_<<______)-_)<<___)+_)<<((((_<<______)+_)<<________)+(___<<_)))+(((((___<<__)-_)<<______)-_____)<<((((_<<______)+_)<<________)-_____))+(((((________<<__)-_)<<___)+_)<<((_<<(((_<<___)+_)))+((___<<__)+_)))-(((((___<<___)-_)<<________)-(((_<<___)+_)))<<((_<<(((_<<___)+_)))-(_<<_)))+(((((___<<__)+_)<<________)-((___<<__)-_))<<((_<<(((_<<___)+_)))-(_____<<_)))+(((________<<______)-___)<<((((_<<______)-_)<<________)+(___<<_)))+(((((________<<__)+_)<<________)+((___<<__)+_))<<((((_<<______)-_)<<________)-(((_<<___)+_))))-(((((___<<__)-_)<<_______)-________)<<((_____<<_______)+(___<<__)))+(((((_<<______)+_)<<________)+((___<<__)+_))<<((_____<<_______)+_))+(((________<<_____)+(((_<<___)+_)))<<((_____<<_______)-((___<<__)-_)))-(((((___<<__)+_)<<______)-________)<<((((___<<__)+_)<<________)+(___<<__)))+(((((_<<______)+_)<<________)-((___<<__)+_))<<((((___<<__)+_)<<________)))+(((_<<(((_<<___)+_)))+((___<<__)-_))<<((((___<<__)+_)<<________)-((___<<__)-_)))-(((((________<<__)-_)<<______)+_____)<<((___<<_____)+((___<<__)-_)))-(((________<<_____)+((___<<__)-_))<<((___<<_____)-(_<<_)))+(((((___<<__)+_)<<________)-(((_<<___)+_)))<<((___<<_____)-(_____<<_)))+(((________<<_______)+_)<<((((___<<__)-_)<<________)+(___<<_)))+(((((_<<______)-_)<<________)-((___<<__)-_))<<((((___<<__)-_)<<________)-(_<<__)))+(((___<<_____)+________)<<((((________<<__)+_)<<______)+(_<<_)))-(((___<<_____)-((___<<__)+_))<<((________<<_______)+_____))-((((((_<<___)+_))<<_______)-________)<<((________<<_______)-(_<<__)))-(((___<<_____)-________)<<((((________<<__)-_)<<______)+(_<<_)))-(((_____<<_______)+_)<<(((((_<<___)+_))<<________)+_____))-(((_<<(((_<<___)+_)))-___)<<(((((_<<___)+_))<<________)-___))-(((((___<<__)-_)<<______)-_____)<<((((_<<______)+_)<<______)+(_<<_)))+(((___<<_____)-_____)<<((_<<____)+(___<<_)))+(((((___<<__)-_)<<________)+________)<<((_<<____)-(_<<__)))+(((_____<<______)+_)<<((((_<<______)-_)<<______)+(_<<__)))+(((((___<<__)+_)<<___)+___)<<((((_<<______)-_)<<______)-________))+(((((________<<__)+_)<<______)-_____)<<((_____<<________)-(_<<_)))+(((((___<<__)-_)<<___)+_)<<((((___<<__)+_)<<______)+(___<<_)))+(((_<<____)+________)<<((((___<<__)+_)<<______)-(___<<_)))-(((___<<______)-_)<<((___<<_______)+(_<<_)))+(((((___<<__)-_)<<______)-___)<<((((___<<__)-_)<<______)+_____))-(((((___<<__)-_)<<__)-_)<<((((___<<__)-_)<<______)))+(((((________<<__)-_)<<______)+________)<<((________<<________)+(_<<__)))+(((((_<<______)+_)<<___)-___)<<((((________<<__)-_)<<___)+(_<<_)))-(((((___<<__)-_)<<______)-_____)<<(((((_<<___)+_))<<______)))+(((((___<<__)-_)<<______)-___)<<((((_<<______)+_)<<___)-_))-(((_<<_____)+___)<<((_<<_____)-(_<<_)))+(((_<<_____)-___)<<((((_<<______)-_)<<___)-(_<<_)))+(((((___<<__)+_)<<______)+___)<<((_____<<______)-___))-(((_<<_____)-_)<<((___<<________)+(_<<__)))+(((((___<<__)+_)<<___)+___)<<((((___<<__)-_)<<___)+___))-(((_____<<__)+_)<<((((___<<__)-_)<<___)-___))-(((((___<<__)-_)<<___)-___)<<(((((_<<___)+_))<<___)+___))+((((((_<<___)+_))<<___)+_)<<((((_<<______)+_)<<__)-_))-(((((___<<__)-_)<<__)-_)<<((((_<<______)-_)<<__)))+((((((_<<___)+_))<<___)+___)<<((((___<<__)+_)<<__)-_))+(((___<<______)+_)<<((((___<<__)-_)<<__)))+((((___<<__)+_))<<((________<<___)-(_<<_)))+(((((___<<__)-_)<<__)-_)<<((_____<<__)-_))-(((_____<<___)-_)<<((________<<__)-_))-(((________<<__)+_)<<(((___<<__)-_)))-(________<<_____)-(_____<<_),(_____<<___)-________,______<<_______,_____+___)))(*(lambda __,_,___:__(__,_,___))((lambda __,_,___:[_(___[(lambda:__).func_code.co_nlocals])]+__(__, _, ___[(lambda __:__).func_code.co_nlocals:]) if ___ else []),lambda _____:_____.func_code.co_argcount,(lambda _,__:_,lambda _,__,___,____,_____,______,_______:_,lambda _,__,___,____,_____,______,_______,________:_,lambda _,__,___,____:_,lambda _,__,___:_,lambda _:_,lambda _,__,___,____,_____,______:_,lambda _,__,___,____,_____:_,)))
    (lambda g:((lambda ___,__,_____,_______,_,______,____,________:getattr(__import__(().__iter__().__class__.__name__[(_<<________)+________]+[].__class__.__name__[______]),().__class__.__eq__.__class__.__name__[(lambda:________).func_code.co_nlocals]+().__iter__().__class__.__name__[_____]+[].__class__.__name__[_]+int.__class__.__name__[(lambda:__).func_code.co_nlocals]+().__iter__().__class__.__name__[___])(___-_______,(lambda __,_____,____,_,___:__(__,_____,____,_,___))(lambda __,_____,____,_,___:chr((_____^____)%_)+__(__,_____//_,____,_,___) if _____ else chr(___),(((____<<_____)+____)<<((___<<___)-(_<<________)))+(((____<<______)+_)<<((___<<___)-((((_<<________)+_))<<_)))+(((((____<<______)-_)<<_______)-(___<<______)+_)<<((((________<<______)+_)<<_______)+(___<<______)))-(((((________<<______)+_)<<_______)+_)<<((((________<<______)+_)<<_______)+(_<<__)-_))-(((____<<_____)-_)<<((((________<<______)+_)<<_______)+________))+(((((________<<______)+_)<<____)+____)<<((((________<<______)+_)<<_______)-___))+(((((________<<______)-_)<<____)+((________<<______)-_))<<((((________<<______)+_)<<_______)-(____<<______)-_))+(((((____<<______)-_)<<_______)-(_<<____)+_)<<((________<<_____)+(___<<______)))-(((((____<<______)-_)<<____)-___)<<((________<<_____)+(_<<__)+_))+(((((_<<__)+_)<<_______)-(___<<______)+_)<<((________<<_____)+(_<<______)))-(((((_<<__)-_)<<_______)+(____<<______)-_)<<((________<<_____)-(____<<_)))+(((((_<<__)-_)<<_______)+(((_<<________)+_)))<<((((________<<________)-_)<<____)+((________<<______)-_)))-(((___<<_______)+___)<<((((________<<________)-_)<<____)+_))+(((((________<<______)-_)<<_______)+_)<<((((________<<________)-_)<<____)-(___<<_)))+(((((________<<______)-_)<<_______)-((________<<______)+_))<<((((________<<______)-_)<<_______)+___))-(((________<<_____)+(___<<______)-_)<<((((________<<______)-_)<<_______)-(_<<______)))-(((((________<<________)-_)<<____)+((________<<______)-_))<<((((____<<______)+_)<<____)+(___<<_)))+(((((____<<______)-_)<<____)-___)<<((((____<<______)+_)<<____)))+(((____<<______)-_)<<((((____<<______)+_)<<____)-(________<<_)))+(((((________<<______)-_)<<________)+________)<<((____<<___)+((________<<______)+_)))-(((((________<<________)-_)<<____)-(((_<<________)+_)))<<((____<<___)-(_<<_)))+(((___<<_______)+(((_<<________)+_)))<<((____<<___)-((________<<______)+_)))-(((_<<((____<<_)))-(________<<________)+_)<<((((____<<______)-_)<<____)+___))-(((____<<____)-_)<<((((____<<______)-_)<<____)-(_<<_)))+((((((_<<________)+_))<<_______)+________)<<(((((_<<________)+_))<<_______)+(_<<__)))+(((((________<<________)-_)<<____)-((________<<______)+_))<<(((((_<<________)+_))<<_______)+(_<<_)))+(((____<<__)+_)<<(((((_<<________)+_))<<_______)-(________<<_)))+(((((________<<______)-_)<<____)+((________<<______)-_))<<((((_<<__)+_)<<____)+((________<<______)-_)))+(((((________<<______)-_)<<____)+_)<<((((_<<__)+_)<<____)-(_<<_)))+(((___<<___)+(_<<__)+_)<<((((_<<__)+_)<<____)-(___<<_)))+(((((________<<______)-_)<<_______)-(((_<<________)+_)))<<((_<<(((_<<________)+_)))+___))-(((((____<<______)-_)<<____)+((________<<______)-_))<<((_<<(((_<<________)+_)))-(_<<______)))-(((((________<<______)-_)<<____)+(_<<__)-_)<<((_<<(((_<<________)+_)))-(___<<_)))-(((____<<______)+_)<<((((_<<__)-_)<<____)+((________<<______)-_)))+(((((________<<______)-_)<<__)+____)<<((((_<<__)-_)<<____)-(_<<______)))-(((___<<_______)-________)<<((___<<_______)+(_<<__)))+(((________<<____)-_)<<((___<<_______)+(_<<________)))+(((((________<<______)-_)<<__)+____)<<((___<<_______)-(_<<______)))-(((________<<_____)-(((_<<________)+_)))<<((((________<<______)+_)<<____)+(___<<_)))+(((((_<<__)+_)<<____)+(_<<__)-_)<<((((________<<______)+_)<<____)+_))-(((((________<<______)-_)<<________)+________)<<((((________<<______)+_)<<____)-___))+(((((________<<______)-_)<<________)+________)<<((________<<___)+((________<<______)+_)))-(((________<<___)-(((_<<________)+_)))<<((________<<___)-_))-(((((_<<__)-_)<<______)-_)<<((________<<___)-(_<<________)))+(((((________<<______)-_)<<____)+(((_<<________)+_)))<<((((________<<______)-_)<<____)+((________<<______)-_)))-(((((________<<______)-_)<<____)-____)<<((((________<<______)-_)<<____)+_))+(((((_<<________)+_)))<<((((________<<______)-_)<<____)-____))+(((((________<<______)-_)<<________)+________)<<((((____<<______)+_)<<__)-________))-(((___<<__)-_)<<((____<<_______)+(_<<_)))+(((___<<________)+_)<<((____<<_______)-___))+(((((________<<______)-_)<<____)+_)<<((((____<<______)-_)<<__)-____))-(((((____<<______)+_)<<__)+_)<<(((((_<<________)+_))<<____)+_))+(((((_<<__)+_)<<__)+_)<<((((_<<__)+_)<<__)+(________<<_)))+((((((_<<________)+_))<<____)+_)<<((((_<<__)+_)<<__)-(_<<______)))-(((((____<<______)-_)<<__)-_)<<((_<<_____)+(_<<_)))+(((____<<____)+____)<<((_<<_____)-___))+(((((_<<__)+_)<<__)-________)<<((((_<<__)-_)<<__)-(_<<_)))+(((_<<____)-_)<<((___<<____)+(_<<________)))+(((((________<<______)-_)<<____)+((________<<______)-_))<<((___<<____)-____))+(((____<<____)+___)<<((((________<<______)+_)<<__)+_))+(((________<<_______)-_)<<((________<<_______)+___))-(((____<<____)-_)<<((________<<_______)-(_<<_)))+(((____<<____)+____)<<((((________<<______)-_)<<__)+(_<<______)))-(((________<<_______)-________)<<((((________<<______)-_)<<__)-(________<<_)))-(((_<<_____)-___)<<((____<<____)))+(((________<<_______)-_)<<((((____<<______)-_)<<________)-_))-(((____<<____)-_)<<(((((_<<________)+_))<<__)-(_<<_)))+(((____<<____)+____)<<((_<<___)+(_<<______)))-(((________<<_______)-________)<<((((_<<__)-_)<<________)+(_<<_)))-(((____<<______)+_)<<((___<<__)+________))+(((_<<____)+_)<<((((________<<______)+_)<<________)+_))+(((((________<<______)-_)<<________)+________)<<((________<<____)-________))-(((((________<<______)+_)<<________)+________)<<((____<<__)+(_<<______)))-(((___<<__)-_)<<(((((_<<________)+_))<<________)+(_<<_)))-(((________<<________)-_)<<((((_<<__)+_)<<______)-_))+(((________<<____)-_)<<((___<<________)))+(((________<<__)-_)<<((________<<__)+_))+(((((________<<______)+_)<<______)+_)<<((____<<________)+_))-(((((_<<__)-_)<<______)+_)<<((_<<____)+(_<<_)))-((((________<<______)-_))<<((___<<______)))-(___<<((((________<<______)-_)<<_)))+(___<<((_<<__)-_))-(___<<____)+_,(____<<________)+________,_____<<____,_____+______)))(*(lambda ___,_,__:___(___,_,__))((lambda ___,_,__:[_(__[(lambda:___).func_code.co_nlocals])]+___(___,_,__[(lambda ___:___).func_code.co_nlocals:]) if __ else []),lambda ________:________.func_code.co_argcount,(lambda _,__,___,____,_____,______,_______:_,lambda _,__,___,____:_,lambda _,__,___,____,_____,______,_______,________:_,lambda _,__,___,____,_____,______:_,lambda _:_,lambda _,__:_,lambda _,__,___,____,_____:_,lambda _,__,___:_,)))) if (lambda h: sum(o for o in h))((lambda __________,__,_________,___________,_______,________,___,____________,____,______,_____,_:__________(__________,__,_________,___________,_______,________,___,____________,____,______,_____,_))(lambda __________,__,_________,___________,_______,________,___,____________,____,______,_____,_:(lambda __:[__])((lambda ________:abs(________))((lambda _________,__:_________-__)((lambda _______:int(_______))(__[___________]),(lambda _______:int(_______))(_________[___________])))) + __________(__________,__,_________,___________+______,_______,________,___,____________,____,______,_____,_) if ___________<(_<<_______) else [],(lambda _______,_,__________,_____,__,____________,______,___,_________,____,___________:_______(_______,_,__________,_____,__,____________,______,___,_________,____,___________))(lambda _______,_,__________,_____,__,____________,______,___,_________,____,___________:(lambda ______:str(______))(((lambda ____________,_____,__,______,___,_________,____,___________,_______:____________+((______<<_________)+(_____<<___)+__))((lambda ___,_____,__,____________,______,_________,____,___________,_______:___^(____<<_________))((lambda _________:ord(_________))(_[__________]),*(lambda _,__,___:_(_,__,___))((lambda _,__,___:[__(___[(lambda:_).func_code.co_nlocals])]+_(_,__,___[(lambda _:_).func_code.co_nlocals:]) if ___ else []),lambda _:_.func_code.co_argcount,(lambda _,__,___,____:_,lambda _,__,___,____,_____,______,_______,________:_,lambda _,__,___:_,lambda _,__,___,____,_____,______:_,lambda _,__,___,____,_____:_,lambda _,__:_,lambda _:_,lambda _,__,___,____,_____,______,_______:_,))),*(lambda ___,__,_:___(___,__,_))((lambda ___,__,_:[__(_[(lambda:___).func_code.co_nlocals])]+___(___,__,_[(lambda ___:___).func_code.co_nlocals:]) if _ else []),lambda ________:________.func_code.co_argcount,(lambda _,__,___:_,lambda _,__,___,____:_,lambda _,__,___,____,_____,______,_______,________:_,lambda _:_,lambda _,__:_,lambda _,__,___,____,_____,______:_,lambda _,__,___,____,_____,______,_______:_,lambda _,__,___,____,_____:_,)))))+(_______(_______,_,__________+____________,_____,__,____________,______,___,_________,____,___________)) if (__________<(lambda __:len(__))(_)) else ((lambda _____:str())((lambda:___).func_code.co_nlocals)),g,(lambda:___).func_code.co_nlocals,*(lambda _,___,__:_(_,___,__))((lambda _,___,__:[___(__[(lambda:_).func_code.co_nlocals])]+_(_,___,__[(lambda _:_).func_code.co_nlocals:]) if __ else []),lambda _____:_____.func_code.co_argcount,(lambda _,__,___,____:_,lambda _,__,___,____,_____,______,_______,________:_,lambda _:_,lambda _,__,___,____,_____:_,lambda _,__:_,lambda _,__,___,____,_____,______,_______:_,lambda _,__,___:_,lambda _,__,___,____,_____,______:_,))),(lambda _,________,_____,_________,___,____________,______,_______:(lambda _,________,_____,_________,___:_(_,________,_____,_________,___))(lambda _,________,_____,______,___:________[______[_____]]+_(_,________,_____+_________,______,___) if _____<(____________<<____________) else (lambda x:str())((lambda:__).func_code.co_nlocals),(lambda ______,__________,____________,________,___,_________,_,_____:(lambda ______,__________,____________,________,___:______(______,__________,____________,________,___))(lambda ______, __________, ____________, ________,___: chr((__________^____________) % ________) + ______(______, __________ // ________, ____________, ________,___) if __________ else chr(___),
        1840694142525004552424102578843485965209662670510674253001827722440108224636471868578779394591062727758932524288858766016071395944092828491086158276927524,
        (______<<________)+____________,__________<<___,(lambda:___).func_code.co_nlocals))(*(lambda __,___,_:__(__,___,_))((lambda __,___,_:[___(_[(lambda:__).func_code.co_nlocals])]+__(__,___,_[(lambda __:__).func_code.co_nlocals:]) if _ else []),lambda __:__.func_code.co_argcount,(lambda _,__,___,____:_,lambda _:_,lambda _,__,___,____,_____,______:_,lambda _,__:_,lambda _,__,___,____,_____,______,_______,________:_,lambda _,__,___:_,lambda _,__,___,____,_____,______,_______:_,lambda _,__,___,____,_____:_,))),(lambda:_____).func_code.co_nlocals,(lambda _______,__,____,______,___________,__________,____________,_________:(lambda ___________,__,______,____:___________(___________,__,______,____))(lambda ___________,__,______,____:[((__*____)%______)]+___________(___________,__,______,____+____________) if ((__*____)%______)!=((lambda:___).func_code.co_nlocals) else [],(____________<<_______)+____________,__________<<_________,____________)+[(lambda:___).func_code.co_nlocals])(*(lambda ___,__,_:___(___,__,_))((lambda ___,__,_:[__(_[(lambda:___).func_code.co_nlocals])]+___(___,__,_[(lambda ___:___).func_code.co_nlocals:]) if _ else []),lambda __:__.func_code.co_argcount,(lambda _,__,___,____:_,lambda _,__,___,____,_____,______,_______:_,lambda _,__,___,____,_____,______:_,lambda _,__,___:_,lambda _,__,___,____,_____,______,_______,________:_,lambda _,__:_,lambda _:_,lambda _,__,___,____,_____:_,))),_________<<_____))(*(lambda ___,_,__:___(___,_,__))((lambda ___,_,__:[_(__[(lambda:___).func_code.co_nlocals])]+___(___,_,__[(lambda ___:___).func_code.co_nlocals:]) if __ else []),lambda _____:_____.func_code.co_argcount,(lambda _,__:_,lambda _,__,___,____,_____,______:_,lambda _,__,___,____,_____,______,_______,________:_,lambda _:_,lambda _,__,___:_,lambda _,__,___,____:_,lambda _,__,___,____,_____:_,lambda _,__,___,____,_____,______,_______:_,))),(lambda:___).func_code.co_nlocals,*(lambda ___,_,__:___(___,_,__))((lambda ___,_,__:[_(__[(lambda:___).func_code.co_nlocals])]+___(___,_,__[(lambda ___:___).func_code.co_nlocals:]) if __ else []),lambda ____:____.func_code.co_argcount,(lambda _,__,___:_,lambda _,__,___,____,_____,______,_______:_,lambda _,__,___,____:_,lambda _,__,___,____,_____,______:_,lambda _,__:_,lambda _:_,lambda _,__,___,____,_____:_,lambda _,__,___,____,_____,______,_______,________:_,))))else((lambda ______,_______,_,____,________,_____,__,___:getattr(__import__(True.__class__.__name__[_]+[].__class__.__name__[_______]),().__class__.__eq__.__class__.__name__[(lambda: ___).func_code.co_nlocals]+().__class__.__eq__.__class__.__name__[__]+[].__class__.__name__[_]+().__class__.__eq__.__class__.__name__[(_______<<____)-_]+().__class__.__eq__.__class__.__name__[(______<<_______)-_____])(_,(lambda ___,_,_____,__,____:___(___,_,_____,__,____))(lambda ___,_,_____,__,____:chr((_^_____)%__)+___(___,_//__,_____,__,____) if _ else chr(____),(((((_<<______)-_)<<__)-((____<<_______)-_))<<((((____<<_______)+_)<<__)-(_<<______)+_))-(((((___<<_______)-_)<<______)-_)<<((((____<<_______)+_)<<__)-(____<<____)-_))-(((((___<<_______)-_)<<______)-_)<<((____<<________)+(____<<____)-_))-(((((____<<_______)+_)<<___)+_____)<<((____<<________)+(___<<_)))-(((((___<<_______)-_)<<__)-_)<<((____<<________)-____))+(((((____<<_______)+_)<<___)+((____<<_______)+_))<<((____<<________)-((____<<_______)+_)))-(((((____<<_______)+_)<<__)-(_____<<_______)-_)<<((((____<<____)-_)<<___)+_____))-(((___<<_____)-(_<<______)+_)<<((((____<<____)-_)<<___)-___))+(((____<<________)-((____<<_______)+_))<<((((____<<_______)-_)<<__)+(_<<______)-_))-(((___<<__)-____)<<((((____<<_______)-_)<<__)+(_<<_______)))-(((___<<______)+____)<<((((____<<_______)-_)<<__)-___))+(((((____<<_______)+_)<<______)-___)<<((((___<<_______)+_)<<___)+(_<<______)-_))-(((_____<<_____)-(____<<____)+_)<<((((___<<_______)+_)<<___)+_))-(((((___<<_______)-_)<<______)+___)<<((((___<<_______)+_)<<___)-(((_<<____)+_))))-(((((____<<_______)+_)<<___)+_____)<<((___<<_____)+(___<<_)))+(((((_<<______)-_)<<__)+(_<<______)+_)<<((___<<_____)-____))+(((((____<<_______)+_)<<___)+((____<<_______)+_))<<((___<<_____)-((____<<_______)+_)))+(((((____<<_______)+_)<<__)+(___<<_______)-_)<<((((___<<_______)-_)<<___)+___))+(((_____<<______)-____)<<((((___<<_______)-_)<<___)-___))+(((____<<________)+((____<<_______)-_))<<(((((_<<____)+_))<<__)+((____<<_______)+_)))+(((((____<<____)-_)<<___)-_____)<<(((((_<<____)+_))<<__)-_))-(((((____<<_______)+_)<<___)+(((_<<____)+_)))<<(((((_<<____)+_))<<__)-(____<<_______)))-(((((_<<______)-_)<<__)-(_____<<_______)+_)<<((((_<<______)+_)<<___)+_____))-(((____<<________)-((____<<_______)+_))<<((((_<<______)+_)<<___)-___))-(((___<<_____)+_____)<<((_<<(((_<<____)+_)))+(_<<______)))+(((((____<<____)-_)<<___)-(((_<<____)+_)))<<((_<<(((_<<____)+_)))+(_<<_______)))-(((((_<<______)-_)<<______)+_)<<((_<<(((_<<____)+_)))-___))+(((((____<<____)-_)<<___)-_____)<<((((_<<______)-_)<<___)+(_<<______)-_))-(((((____<<____)-_)<<___)-((____<<_______)+_))<<((((_<<______)-_)<<___)+____))-(((_____<<__)+(_<<______)-_)<<((((_<<______)-_)<<___)-_____))-((((((_<<____)+_))<<___)+_____)<<((_____<<__)+(_<<______)-_))-(((((___<<_______)-_)<<___)+(((_<<____)+_)))<<((_____<<__)+_))-(((((___<<_______)-_)<<______)-_)<<((_____<<__)-(((_<<____)+_))))-(((((____<<_______)+_)<<____)-____)<<((((____<<_______)+_)<<___)+(___<<_)))+(((((____<<_______)+_)<<______)+_)<<((((____<<_______)+_)<<___)-_))-(((((_<<______)-_)<<_______)+_)<<((((____<<_______)+_)<<___)-(((_<<____)+_))))-(((____<<___)-_)<<((____<<_____)+((____<<_______)-_)))-(((_<<________)-_____)<<((____<<_____)))+((((((_<<____)+_))<<___)-_____)<<((____<<_____)-((____<<_______)-_)))+(((((____<<_______)+_)<<______)-_____)<<((((____<<_______)-_)<<___)+(___<<_)))-(((_<<________)+_)<<((((____<<_______)-_)<<___)-_))-(((____<<______)-_)<<((((___<<_______)+_)<<______)+_____))-(((___<<______)+____)<<((((___<<_______)+_)<<______)-___))+(((((____<<_______)+_)<<______)+_)<<((___<<__)-_))-(((((____<<_______)-_)<<___)+((____<<_______)+_))<<((((___<<_______)-_)<<______)+(_<<_______)))-(((((___<<_______)+_)<<______)-_)<<((((___<<_______)-_)<<______)-_____))+(((((____<<_______)+_)<<___)+(((_<<____)+_)))<<(((((_<<____)+_))<<___)-(_<<_)))-((((((_<<____)+_))<<_______)+_)<<((((_<<______)+_)<<______)+_____))-(((((_<<______)-_)<<______)-___)<<((((_<<______)+_)<<______)-_____))+(((((_<<______)-_)<<______)+____)<<((_<<________)-_))-(((____<<___)-_)<<((((_<<______)-_)<<______)+(____<<_)))+(((((___<<_______)-_)<<______)-____)<<((_____<<___)+(_<<____)))+((((((_<<____)+_))<<____)-_)<<((_____<<___)-_))-(((((___<<_______)-_)<<______)-_)<<((((____<<_______)+_)<<______)-_))-(((((____<<_______)+_)<<______)-____)<<((____<<__)+___))+(((_____<<_______)+_)<<((____<<__)-_))-(((((_<<______)-_)<<______)+____)<<((((____<<_______)-_)<<______)+____))+(_____<<((((____<<_______)-_)<<______)-_))-(((___<<_______)-_)<<((___<<___)+____))+(((((____<<_______)+_)<<______)-___)<<((((___<<_______)-_)<<____)-_))-(((((____<<_______)+_)<<_______)+_)<<(((((_<<____)+_))<<______)-____))+(((___<<_______)-_)<<((((_<<______)+_)<<____)-____))+(((((____<<_______)-_)<<____)+____)<<((((_<<______)-_)<<____)-_))-(((((____<<_______)+_)<<____)+_)<<((_____<<______)-(_<<_______)))-(((_____<<______)+____)<<((____<<___)+____))+(((((___<<_______)-_)<<____)-_)<<((((____<<_______)-_)<<____)+_))-(((((___<<_______)-_)<<____)-_)<<((___<<______)))+((((____<<_______)+_))<<(((((_<<____)+_))<<____)+____))+(((____<<___)+_)<<((_<<__)))+(((____<<___)+_)<<((_____<<____)))+(((____<<____)+_)<<((____<<______)+(_<<_)))+(((((____<<_______)+_)<<_______)-_)<<((___<<____)+_))+(((((____<<_______)-_)<<_______)+_)<<((_<<___)))+(((_<<______)-_)<<((_____<<_______)-_))+(((____<<______)+_)<<((_<<______)+_))+(((_____<<_______)+_)<<((___<<_)))+_____,______+_______+_____,______<<__,_______+________)))(*(lambda __,_,___:__(__,_,___))((lambda __,_,___:[_(___[(lambda:__).func_code.co_nlocals])]+__(__,_,___[(lambda __:__).func_code.co_nlocals:]) if ___ else []),lambda _______:_______.func_code.co_argcount,(lambda _,__,___,____:_,lambda _,__:_,lambda _:_,lambda _,__,___:_,lambda _,__,___,____,_____,______,_______,________:_,lambda _,__,___,____,_____,______,_______:_,lambda _,__,___,____,_____,______:_,lambda _,__,___,____,_____:_,)))))((lambda __:__+(lambda ___,____,__,_____:___(___,____,__,_____))(lambda ___,____,__,_____:____+___(___,____,__-((lambda __:__).func_code.co_nlocals),_____) if __-_____>((lambda :___).func_code.co_nlocals) else (lambda __:str(__))((lambda :____).func_code.co_nlocals),(lambda ________,_______,_,______,_____,____,___,__:(lambda ___:chr(___))((lambda _____,____:_____<<____)(___,_____)))(*(lambda ___,__,_:___(___,__,_))((lambda ___,__,_:[__(_[(lambda:___).func_code.co_nlocals])]+___(___,__,_[(lambda ___:___).func_code.co_nlocals:]) if _ else []),lambda ___:___.func_code.co_argcount,(lambda _,__:_,lambda _,__,___,____,_____,______,_______,________:_,lambda _,__,___,____,_____:_,lambda _,__,___,____:_,lambda _,__,___,____,_____,______:_,lambda _,__,___,____,_____,______,_______:_,lambda _:_,lambda _,__,___:_,))),(lambda ________,______,_,_____,__,____,___,_______:_______+________+___+__+(_<<______)+_____)(*(lambda __,___,_:__(__,___,_))((lambda __,___,_:[___(_[(lambda:__).func_code.co_nlocals])]+__(__,___,_[(lambda __:__).func_code.co_nlocals:]) if _ else []),lambda __:__.func_code.co_argcount,(lambda _,__,___,____,_____,______:_,lambda _,__,___:_,lambda _:_,lambda _,__:_,lambda _,__,___,____:_,lambda _,__,___,____,_____,______,_______,________:_,lambda _,__,___,____,_____:_,lambda _,__,___,____,_____,______,_______:_,))),(lambda ___:len(___))(__)))((lambda _______,__,________,____,______,_,___,_____:(lambda s,index:s[:-___])(getattr(__import__(True.__class__.__name__[________]+[].__class__.__name__[________]),().__class__.__eq__.__class__.__name__[_]+().__class__.__eq__.__class__.__name__[_____]+().__class__.__eq__.__class__.__name__[________]+().__class__.__eq__.__class__.__name__[_______])(___,____<<__),-___))(*(lambda __,_,___:__(__,_,___))((lambda __,_,___:[_(___[(lambda:__).func_code.co_nlocals])]+__(__,_,___[(lambda __:__).func_code.co_nlocals:]) if ___ else []),lambda ___:___.func_code.co_argcount,(lambda _,__,___,____,_____,______,_______,________:_,lambda _,__,___:_,lambda _,__:_,lambda _,__,___,____:_,lambda _,__,___,____,_____,______,_______:_,lambda _,__,___,____,_____,______:_,lambda _:_,lambda _,__,___,____,_____:_,)))))
        print '\n[if you validate the challenge, don\'t forget to remove the padding as well as adding "ndh2k18_" to the start of the challenge]'

We were done, there’s nothing we could do with the 10 minutes left before the end. It’s with a bitter taste that we accepted our fate.

The Butcher

I decided to face the beast once again to restore our pride.

I started by putting some order in this big mess of lambda and their poisonous syntax. It felt like fighting the Hydra, once you remove one lambda, 3 more are showing up !

After 6 hours of intense fighting, I finally managed to pierce it’s thick skin. I wasn’t far from the heart, one last assault and the fight would be over.

def striking_deadly_shot():
    (lambda __,p8,p9,p7,p10,_,p6,p5:
        getattr(
            __import__(
                ().__class__.__eq__.__class__.__name__[_<<p7]+
                ().__class__.__eq__.__class__.__name__[__+p9]
            ),
            ().__class__.__eq__.__class__.__name__[(lambda:p9).func_code.co_nlocals]+
            ().__class__.__eq__.__class__.__name__[(_<<p7)+_]+
            ().__class__.__eq__.__class__.__name__[(_<<p10)+(_<<__)+_]+
            ().__class__.__eq__.__class__.__name__[(_<<p7)-_]+
            ().__class__.__eq__.__class__.__name__[(_<<p10)+_]
        )(_,
            (lambda p8,_,__,p10,p9:
                p8(p8,_,__,p10,p9)
            )(lambda p8,_,__,p10,p9:
                chr((_^__)%p10)+
                p8(p8,_//p10,__,p10,p9) if _ else '',
                (((((p5<<__)-_)<<p6)+p10)<<((((_<<p7)+_)<<p6)+(_<<_)))+
                (((p5<<p6)-p8)<<((((_<<p7)+_)<<p6)-(_<<p10)))+
                (((((p10<<p10)+_)<<p6)-(p8<<__)+_)<<((((_<<p7)+_)<<p6)-(p10<<p10)+_))+
                ((((((_<<p10)+_))<<p8)-(p8<<__)+_)<<((_<<((p5<<_)))+(p8<<__)))+
                (((_<<((p5<<_)))+(p5<<__)-_)<<((_<<((p5<<_)))+(_<<p7)))+
                ((((((_<<p10)+_))<<p8)-((p10<<__)-_))<<((_<<((p5<<_)))+(_<<__)))+
                (((((p5<<__)-_)<<p6)-(((_<<p10)+_)))<<((_<<((p5<<_)))-(((_<<p10)+_))))-
                (((p8<<p8)+(_<<p7)-_)<<((_<<((p5<<_)))-(p5<<__)))+
                (((((p10<<__)+_)<<p8)+(_<<p6)-_)<<((((_<<p7)-_)<<p6)+(_<<p5)-_))-
                (((_<<((p5<<_)))+(p5<<__)+_)<<((((_<<p7)-_)<<p6)+(p5<<__)-_))+
                ((((((_<<p10)+_))<<p10)+p10)<<((((_<<p7)-_)<<p6)+((p10<<__)-_)))+
                (((((p5<<__)-_)<<p5)+(((_<<p10)+_)))<<((((_<<p7)-_)<<p6)-p5))-
                (((((p10<<__)+_)<<p6)+p8)<<((((_<<p7)-_)<<p6)-(_<<p7)-_))-
                (((((p10<<__)+_)<<p6)+(_<<p5)-_)<<((((_<<p7)-_)<<p6)-(p8<<__)))+
                (((((p10<<__)+_)<<p7)+p8)<<((p8<<p8)+(((p10<<__)+_)<<_)))+
                (((((p10<<__)-_)<<p8)-(_<<p7)+_)<<((p8<<p8)+(p10<<__)))+
                (((((p10<<__)+_)<<p7)+_)<<((p8<<p8)+(_<<_)))+
                (((p10<<p6)-p8)<<((p8<<p8)-(((_<<p10)+_))))-
                (((((p5<<__)-_)<<p6)+p8)<<((p8<<p8)-(p10<<p10)))+
                (((p8<<p8)+(_<<p7)+_)<<((((p10<<__)+_)<<p6)+(p8<<__)))+
                (((p10<<p8)+(((_<<p10)+_)))<<((((p10<<__)+_)<<p6)+(_<<p7)+_))+
                (((_<<((p5<<_)))+(p5<<__)+_)<<((((p10<<__)+_)<<p6)+(_<<__)))+
                (((((p10<<__)+_)<<p5)-(((_<<p10)+_)))<<((((p10<<__)+_)<<p6)-(p10<<_)))-
                (((((p10<<__)-_)<<p6)-_)<<((((p10<<__)+_)<<p6)-((((_<<p10)+_))<<_)))+
                (((((_<<p7)-_)<<p6)-(p8<<__)-_)<<((((p10<<__)+_)<<p6)-(_<<p5)+_))+
                (((p8<<p8)+(((_<<p10)+_)))<<((p10<<p9)+(p5<<__)+_))-
                (((((p10<<__)+_)<<p5)-((p10<<__)-_))<<((p10<<p9)+((p10<<__)-_)))-
                (((((p10<<__)+_)<<p6)+(((_<<p10)+_)))<<((p10<<p9)-_))-
                (((p8<<p8)+(_<<p7)-_)<<((p10<<p9)-(p10<<__)))+
                (((p10<<p9)+(((_<<p10)+_)))<<((((p10<<p10)-_)<<p5)+(_<<p10)))+
                (((p5<<p7)-p10)<<((((p10<<p10)-_)<<p5)-(_<<_)))+
                (((((p5<<__)+_)<<p5)+((p10<<__)+_))<<((((p10<<__)-_)<<p6)+(_<<p7)-_))-
                (((p5<<p6)+p5)<<((((p10<<__)-_)<<p6)+p5))-
                (((((p5<<__)+_)<<p7)+p10)<<((((p10<<__)-_)<<p6)-p8))+
                (((_<<((p5<<_)))+(p5<<__)+_)<<((((p5<<__)+_)<<p5)+(p10<<__)))+
                (((_<<((p5<<_)))+(p5<<__)-_)<<((((p5<<__)+_)<<p5)))+
                ((((((_<<p10)+_))<<p8)-((p10<<__)-_))<<((((p5<<__)+_)<<p5)-(p10<<__)))+
                (((((p5<<__)-_)<<p7)-p5)<<((p5<<p8)+(((_<<p10)+_))))+
                (((p10<<p9)-(_<<p7)+_)<<((p5<<p8)-p10))-
                (((((p10<<__)+_)<<p6)-(p5<<__)-_)<<((p5<<p8)-(p8<<_)))-
                (((((_<<p7)-_)<<p6)+(p10<<p10)+_)<<((((p5<<__)-_)<<p5)+p8))-
                ((((((_<<p10)+_))<<p7)+p10)<<((((p5<<__)-_)<<p5)-(_<<_)))+
                (((((_<<p7)-_)<<p6)-(p5<<__)+_)<<((((p5<<__)-_)<<p5)-(_<<p7)+_))+
                (((((_<<p7)+_)<<p5)+_)<<(((((_<<p10)+_))<<p6)+p5))-
                (((((p10<<__)+_)<<p5)-((p10<<__)-_))<<(((((_<<p10)+_))<<p6)-p5))-
                (((((p5<<__)+_)<<p5)+p8)<<((((_<<p7)+_)<<p5)+(p8<<_)))+
                (((((_<<p7)-_)<<p10)+_)<<((((_<<p7)+_)<<p5)+(p10<<_)))+
                (((((p10<<__)-_)<<p7)-p8)<<((((_<<p7)+_)<<p5)-p8))+
                (((((p5<<__)-_)<<p10)+_)<<((_<<(((_<<p10)+_)))+((p10<<__)+_)))-
                (((((p10<<p10)-_)<<p5)-(((_<<p10)+_)))<<((_<<(((_<<p10)+_)))-(_<<_)))+
                (((((p10<<__)+_)<<p5)-((p10<<__)-_))<<((_<<(((_<<p10)+_)))-(p8<<_)))+
                (((p5<<p7)-p10)<<((((_<<p7)-_)<<p5)+(p10<<_)))+
                (((((p5<<__)+_)<<p5)+((p10<<__)+_))<<((((_<<p7)-_)<<p5)-(((_<<p10)+_))))-
                (((((p10<<__)-_)<<p6)-p5)<<((p8<<p6)+(p10<<__)))+
                (((((_<<p7)+_)<<p5)+((p10<<__)+_))<<((p8<<p6)+_))+
                (((p5<<p8)+(((_<<p10)+_)))<<((p8<<p6)-((p10<<__)-_)))-
                (((((p10<<__)+_)<<p7)-p5)<<((((p10<<__)+_)<<p5)+(p10<<__)))+
                (((((_<<p7)+_)<<p5)-((p10<<__)+_))<<((((p10<<__)+_)<<p5)))+
                (((_<<(((_<<p10)+_)))+((p10<<__)-_))<<((((p10<<__)+_)<<p5)-((p10<<__)-_)))-
                (((((p5<<__)-_)<<p7)+p8)<<((p10<<p8)+((p10<<__)-_)))-
                (((p5<<p8)+((p10<<__)-_))<<((p10<<p8)-(_<<_)))+
                (((((p10<<__)+_)<<p5)-(((_<<p10)+_)))<<((p10<<p8)-(p8<<_)))+
                (((p5<<p6)+_)<<((((p10<<__)-_)<<p5)+(p10<<_)))+
                (((((_<<p7)-_)<<p5)-((p10<<__)-_))<<((((p10<<__)-_)<<p5)-(_<<__)))+
                (((p10<<p8)+p5)<<((((p5<<__)+_)<<p7)+(_<<_)))-
                (((p10<<p8)-((p10<<__)+_))<<((p5<<p6)+p8))-
                ((((((_<<p10)+_))<<p6)-p5)<<((p5<<p6)-(_<<__)))-
                (((p10<<p8)-p5)<<((((p5<<__)-_)<<p7)+(_<<_)))-
                (((p8<<p6)+_)<<(((((_<<p10)+_))<<p5)+p8))-
                (((_<<(((_<<p10)+_)))-p10)<<(((((_<<p10)+_))<<p5)-p10))-
                (((((p10<<__)-_)<<p7)-p8)<<((((_<<p7)+_)<<p7)+(_<<_)))+
                (((p10<<p8)-p8)<<((_<<p9)+(p10<<_)))+
                (((((p10<<__)-_)<<p5)+p5)<<((_<<p9)-(_<<__)))+
                (((p8<<p7)+_)<<((((_<<p7)-_)<<p7)+(_<<__)))+
                (((((p10<<__)+_)<<p10)+p10)<<((((_<<p7)-_)<<p7)-p5))+
                (((((p5<<__)+_)<<p7)-p8)<<((p8<<p5)-(_<<_)))+
                (((((p10<<__)-_)<<p10)+_)<<((((p10<<__)+_)<<p7)+(p10<<_)))+
                (((_<<p9)+p5)<<((((p10<<__)+_)<<p7)-(p10<<_)))-
                (((p10<<p7)-_)<<((p10<<p6)+(_<<_)))+
                (((((p10<<__)-_)<<p7)-p10)<<((((p10<<__)-_)<<p7)+p8))-
                (((((p10<<__)-_)<<__)-_)<<((((p10<<__)-_)<<p7)))+
                (((((p5<<__)-_)<<p7)+p5)<<((p5<<p5)+(_<<__)))+
                (((((_<<p7)+_)<<p10)-p10)<<((((p5<<__)-_)<<p10)+(_<<_)))-
                (((((p10<<__)-_)<<p7)-p8)<<(((((_<<p10)+_))<<p7)))+
                (((((p10<<__)-_)<<p7)-p10)<<((((_<<p7)+_)<<p10)-_))-
                (((_<<p8)+p10)<<((_<<p8)-(_<<_)))+
                (((_<<p8)-p10)<<((((_<<p7)-_)<<p10)-(_<<_)))+
                (((((p10<<__)+_)<<p7)+p10)<<((p8<<p7)-p10))-
                (((_<<p8)-_)<<((p10<<p5)+(_<<__)))+
                (((((p10<<__)+_)<<p10)+p10)<<((((p10<<__)-_)<<p10)+p10))-
                (((p8<<__)+_)<<((((p10<<__)-_)<<p10)-p10))-
                (((((p10<<__)-_)<<p10)-p10)<<(((((_<<p10)+_))<<p10)+p10))+
                ((((((_<<p10)+_))<<p10)+_)<<((((_<<p7)+_)<<__)-_))-
                (((((p10<<__)-_)<<__)-_)<<((((_<<p7)-_)<<__)))+
                ((((((_<<p10)+_))<<p10)+p10)<<((((p10<<__)+_)<<__)-_))+
                (((p10<<p7)+_)<<((((p10<<__)-_)<<__)))+
                ((((p10<<__)+_))<<((p5<<p10)-(_<<_)))+
                (((((p10<<__)-_)<<__)-_)<<((p8<<__)-_))-
                (((p8<<p10)-_)<<((p5<<__)-_))-
                (((p5<<__)+_)<<(((p10<<__)-_)))-
                (p5<<p8)-(p8<<_),(p8<<p10)-p5,p7<<p6,p8+p10))
    )(
        *(lambda __,_,p10:__(__,_,p10))
        (
            (lambda __,_,p10:[_(p10[0])]+__(__, _, p10[1:]) if p10 else []),
            lambda p8:p8.func_code.co_argcount,
            (
                lambda _,__:_,
                lambda _,__,p10,p9,p8,p7,p6:_,
                lambda _,__,p10,p9,p8,p7,p6,p5:_,
                lambda _,__,p10,p9:_,
                lambda _,__,p10:_,
                lambda _:_,
                lambda _,__,p10,p9,p8,p7:_,
                lambda _,__,p10,p9,p8:_,
            )
        )
    )
    # all the before just prints a string....
    (lambda g:
        (
            # print fail
            (lambda p10,__,p8,p6,_,p7,p9,p5:
                getattr(
                    __import__(
                        ().__iter__().__class__.__name__[(_<<p5)+p5]+
                        [].__class__.__name__[p7]
                    ),
                    ().__class__.__eq__.__class__.__name__[0]+
                    ().__iter__().__class__.__name__[p8]+
                    [].__class__.__name__[_]+
                    int.__class__.__name__[0]+
                    ().__iter__().__class__.__name__[p10]
                )(
                    p10-p6,
                    (lambda __,p8,p9,_,p10:
                        __(__,p8,p9,_,p10)
                    )(lambda __,p8,p9,_,p10:
                        chr((p8^p9)%_)+
                        __(__,p8//_,p9,_,p10) if p8 else
                        chr(p10),(((p9<<p8)+p9)<<((p10<<p10)-(_<<p5)))+
                        (((p9<<p7)+_)<<((p10<<p10)-((((_<<p5)+_))<<_)))+
                        (((((p9<<p7)-_)<<p6)-(p10<<p7)+_)<<((((p5<<p7)+_)<<p6)+(p10<<p7)))-
                        (((((p5<<p7)+_)<<p6)+_)<<((((p5<<p7)+_)<<p6)+(_<<__)-_))-
                        (((p9<<p8)-_)<<((((p5<<p7)+_)<<p6)+p5))+
                        (((((p5<<p7)+_)<<p9)+p9)<<((((p5<<p7)+_)<<p6)-p10))+
                        (((((p5<<p7)-_)<<p9)+((p5<<p7)-_))<<((((p5<<p7)+_)<<p6)-(p9<<p7)-_))+
                        (((((p9<<p7)-_)<<p6)-(_<<p9)+_)<<((p5<<p8)+(p10<<p7)))-
                        (((((p9<<p7)-_)<<p9)-p10)<<((p5<<p8)+(_<<__)+_))+
                        (((((_<<__)+_)<<p6)-(p10<<p7)+_)<<((p5<<p8)+(_<<p7)))-
                        (((((_<<__)-_)<<p6)+(p9<<p7)-_)<<((p5<<p8)-(p9<<_)))+
                        (((((_<<__)-_)<<p6)+(((_<<p5)+_)))<<((((p5<<p5)-_)<<p9)+((p5<<p7)-_)))-
                        (((p10<<p6)+p10)<<((((p5<<p5)-_)<<p9)+_))+
                        (((((p5<<p7)-_)<<p6)+_)<<((((p5<<p5)-_)<<p9)-(p10<<_)))+
                        (((((p5<<p7)-_)<<p6)-((p5<<p7)+_))<<((((p5<<p7)-_)<<p6)+p10))-
                        (((p5<<p8)+(p10<<p7)-_)<<((((p5<<p7)-_)<<p6)-(_<<p7)))-
                        (((((p5<<p5)-_)<<p9)+((p5<<p7)-_))<<((((p9<<p7)+_)<<p9)+(p10<<_)))+
                        (((((p9<<p7)-_)<<p9)-p10)<<((((p9<<p7)+_)<<p9)))+
                        (((p9<<p7)-_)<<((((p9<<p7)+_)<<p9)-(p5<<_)))+
                        (((((p5<<p7)-_)<<p5)+p5)<<((p9<<p10)+((p5<<p7)+_)))-
                        (((((p5<<p5)-_)<<p9)-(((_<<p5)+_)))<<((p9<<p10)-(_<<_)))+
                        (((p10<<p6)+(((_<<p5)+_)))<<((p9<<p10)-((p5<<p7)+_)))-
                        (((_<<((p9<<_)))-(p5<<p5)+_)<<((((p9<<p7)-_)<<p9)+p10))-
                        (((p9<<p9)-_)<<((((p9<<p7)-_)<<p9)-(_<<_)))+
                        ((((((_<<p5)+_))<<p6)+p5)<<(((((_<<p5)+_))<<p6)+(_<<__)))+
                        (((((p5<<p5)-_)<<p9)-((p5<<p7)+_))<<(((((_<<p5)+_))<<p6)+(_<<_)))+
                        (((p9<<__)+_)<<(((((_<<p5)+_))<<p6)-(p5<<_)))+
                        (((((p5<<p7)-_)<<p9)+((p5<<p7)-_))<<((((_<<__)+_)<<p9)+((p5<<p7)-_)))+
                        (((((p5<<p7)-_)<<p9)+_)<<((((_<<__)+_)<<p9)-(_<<_)))+
                        (((p10<<p10)+(_<<__)+_)<<((((_<<__)+_)<<p9)-(p10<<_)))+
                        (((((p5<<p7)-_)<<p6)-(((_<<p5)+_)))<<((_<<(((_<<p5)+_)))+p10))-
                        (((((p9<<p7)-_)<<p9)+((p5<<p7)-_))<<((_<<(((_<<p5)+_)))-(_<<p7)))-
                        (((((p5<<p7)-_)<<p9)+(_<<__)-_)<<((_<<(((_<<p5)+_)))-(p10<<_)))-
                        (((p9<<p7)+_)<<((((_<<__)-_)<<p9)+((p5<<p7)-_)))+
                        (((((p5<<p7)-_)<<__)+p9)<<((((_<<__)-_)<<p9)-(_<<p7)))-
                        (((p10<<p6)-p5)<<((p10<<p6)+(_<<__)))+
                        (((p5<<p9)-_)<<((p10<<p6)+(_<<p5)))+
                        (((((p5<<p7)-_)<<__)+p9)<<((p10<<p6)-(_<<p7)))-
                        (((p5<<p8)-(((_<<p5)+_)))<<((((p5<<p7)+_)<<p9)+(p10<<_)))+
                        (((((_<<__)+_)<<p9)+(_<<__)-_)<<((((p5<<p7)+_)<<p9)+_))-
                        (((((p5<<p7)-_)<<p5)+p5)<<((((p5<<p7)+_)<<p9)-p10))+
                        (((((p5<<p7)-_)<<p5)+p5)<<((p5<<p10)+((p5<<p7)+_)))-
                        (((p5<<p10)-(((_<<p5)+_)))<<((p5<<p10)-_))-
                        (((((_<<__)-_)<<p7)-_)<<((p5<<p10)-(_<<p5)))+
                        (((((p5<<p7)-_)<<p9)+(((_<<p5)+_)))<<((((p5<<p7)-_)<<p9)+((p5<<p7)-_)))-
                        (((((p5<<p7)-_)<<p9)-p9)<<((((p5<<p7)-_)<<p9)+_))+
                        (((((_<<p5)+_)))<<((((p5<<p7)-_)<<p9)-p9))+
                        (((((p5<<p7)-_)<<p5)+p5)<<((((p9<<p7)+_)<<__)-p5))-
                        (((p10<<__)-_)<<((p9<<p6)+(_<<_)))+
                        (((p10<<p5)+_)<<((p9<<p6)-p10))+
                        (((((p5<<p7)-_)<<p9)+_)<<((((p9<<p7)-_)<<__)-p9))-
                        (((((p9<<p7)+_)<<__)+_)<<(((((_<<p5)+_))<<p9)+_))+
                        (((((_<<__)+_)<<__)+_)<<((((_<<__)+_)<<__)+(p5<<_)))+
                        ((((((_<<p5)+_))<<p9)+_)<<((((_<<__)+_)<<__)-(_<<p7)))-
                        (((((p9<<p7)-_)<<__)-_)<<((_<<p8)+(_<<_)))+
                        (((p9<<p9)+p9)<<((_<<p8)-p10))+
                        (((((_<<__)+_)<<__)-p5)<<((((_<<__)-_)<<__)-(_<<_)))+
                        (((_<<p9)-_)<<((p10<<p9)+(_<<p5)))+
                        (((((p5<<p7)-_)<<p9)+((p5<<p7)-_))<<((p10<<p9)-p9))+
                        (((p9<<p9)+p10)<<((((p5<<p7)+_)<<__)+_))+
                        (((p5<<p6)-_)<<((p5<<p6)+p10))-
                        (((p9<<p9)-_)<<((p5<<p6)-(_<<_)))+
                        (((p9<<p9)+p9)<<((((p5<<p7)-_)<<__)+(_<<p7)))-
                        (((p5<<p6)-p5)<<((((p5<<p7)-_)<<__)-(p5<<_)))-
                        (((_<<p8)-p10)<<((p9<<p9)))+
                        (((p5<<p6)-_)<<((((p9<<p7)-_)<<p5)-_))-
                        (((p9<<p9)-_)<<(((((_<<p5)+_))<<__)-(_<<_)))+
                        (((p9<<p9)+p9)<<((_<<p10)+(_<<p7)))-
                        (((p5<<p6)-p5)<<((((_<<__)-_)<<p5)+(_<<_)))-
                        (((p9<<p7)+_)<<((p10<<__)+p5))+
                        (((_<<p9)+_)<<((((p5<<p7)+_)<<p5)+_))+
                        (((((p5<<p7)-_)<<p5)+p5)<<((p5<<p9)-p5))-
                        (((((p5<<p7)+_)<<p5)+p5)<<((p9<<__)+(_<<p7)))-
                        (((p10<<__)-_)<<(((((_<<p5)+_))<<p5)+(_<<_)))-
                        (((p5<<p5)-_)<<((((_<<__)+_)<<p7)-_))+
                        (((p5<<p9)-_)<<((p10<<p5)))+
                        (((p5<<__)-_)<<((p5<<__)+_))+
                        (((((p5<<p7)+_)<<p7)+_)<<((p9<<p5)+_))-
                        (((((_<<__)-_)<<p7)+_)<<((_<<p9)+(_<<_)))-
                        ((((p5<<p7)-_))<<((p10<<p7)))-
                        (p10<<((((p5<<p7)-_)<<_)))+
                        (p10<<((_<<__)-_))-
                        (p10<<p9)+
                        _,
                        (p9<<p5)+p5,
                        p8<<p9,
                        p8+p7
                    )
                )
            )(*[7, 4, 8, 6, 1, 2, 5, 3]
            )
        # main logic block
        # sum must be 0
        ) if (lambda h: sum(o for o in h))
            (
                (lambda p3,__,p4,p2,p6,p5,p10,p1,p9,p7,p8,_:
                    p3(p3,__,p4,p2,p6,p5,p10,p1,p9,p7,p8,_)
                )(lambda p3,__,p4,p2,p6,p5,p10,p1,p9,p7,p8,_:
                    # Subtract the expected value with what we got (cmp)
                    [abs(int(__[p2])-int(p4[p2]))]
                    +
                    # continue until the end of the string
                    p3(p3,__,p4,p2+p7,p6,p5,p10,p1,p9,p7,p8,_) if p2<(_<<p6) else [],
                    (lambda p6,_,p3,p8,__,p1,p7,p10,p4,p9,p2:p6(p6,_,p3,p8,__,p1,p7,p10,p4,p9,p2)
                    )(lambda p6,_,p3,p8,__,p1,p7,p10,p4,p9,p2:
                    # apply this transformation to the attack
                    str((ord(_[p3])^(2<<5))+42)+
                        # continue until the end of the string, terminate with a "0"
                        (p6(p6,_,p3+p1,p8,__,p1,p7,p10,p4,p9,p2)) if (p3<len(_)) else ("0"),
                        g, #g is the attack entered
                        0,
                        *[4, 8, 1, 5, 2, 7, 3, 6]
                    ),
                    '58158901579273536356497348956395736243518495629363424242424242420', #expected result
                    0,
                    *[3, 7, 4, 6, 2, 1, 5, 8]
                    )
        )
        else
            (
                # WIN message !
                (lambda p7,p6,_,p9,p5,p8,__,p10:
                    getattr(
                        __import__(
                            True.__class__.__name__[_]+
                            [].__class__.__name__[p6]
                        ),
                        ().__class__.__eq__.__class__.__name__[0]+
                        ().__class__.__eq__.__class__.__name__[__]+
                        [].__class__.__name__[_]+
                        ().__class__.__eq__.__class__.__name__[(p6<<p9)-_]+
                        ().__class__.__eq__.__class__.__name__[(p7<<p6)-p8]
                    )
                (_,(
                    lambda p10,_,p8,__,p9:p10(p10,_,p8,__,p9)
                    )
                    (lambda p10,_,p8,__,p9:chr((_^p8)%__)+p10(p10,_//__,p8,__,p9) if _ else
                    chr(p9),
                    (((((_<<p7)-_)<<__)-((p9<<p6)-_))<<((((p9<<p6)+_)<<__)-(_<<p7)+_))-
                    (((((p10<<p6)-_)<<p7)-_)<<((((p9<<p6)+_)<<__)-(p9<<p9)-_))-
                    (((((p10<<p6)-_)<<p7)-_)<<((p9<<p5)+(p9<<p9)-_))-
                    (((((p9<<p6)+_)<<p10)+p8)<<((p9<<p5)+(p10<<_)))-
                    (((((p10<<p6)-_)<<__)-_)<<((p9<<p5)-p9))+
                    (((((p9<<p6)+_)<<p10)+((p9<<p6)+_))<<((p9<<p5)-((p9<<p6)+_)))-
                    (((((p9<<p6)+_)<<__)-(p8<<p6)-_)<<((((p9<<p9)-_)<<p10)+p8))-
                    (((p10<<p8)-(_<<p7)+_)<<((((p9<<p9)-_)<<p10)-p10))+
                    (((p9<<p5)-((p9<<p6)+_))<<((((p9<<p6)-_)<<__)+(_<<p7)-_))-
                    (((p10<<__)-p9)<<((((p9<<p6)-_)<<__)+(_<<p6)))-
                    (((p10<<p7)+p9)<<((((p9<<p6)-_)<<__)-p10))+
                    (((((p9<<p6)+_)<<p7)-p10)<<((((p10<<p6)+_)<<p10)+(_<<p7)-_))-
                    (((p8<<p8)-(p9<<p9)+_)<<((((p10<<p6)+_)<<p10)+_))-
                    (((((p10<<p6)-_)<<p7)+p10)<<((((p10<<p6)+_)<<p10)-(((_<<p9)+_))))-
                    (((((p9<<p6)+_)<<p10)+p8)<<((p10<<p8)+(p10<<_)))+
                    (((((_<<p7)-_)<<__)+(_<<p7)+_)<<((p10<<p8)-p9))+
                    (((((p9<<p6)+_)<<p10)+((p9<<p6)+_))<<((p10<<p8)-((p9<<p6)+_)))+
                    (((((p9<<p6)+_)<<__)+(p10<<p6)-_)<<((((p10<<p6)-_)<<p10)+p10))+
                    (((p8<<p7)-p9)<<((((p10<<p6)-_)<<p10)-p10))+
                    (((p9<<p5)+((p9<<p6)-_))<<(((((_<<p9)+_))<<__)+((p9<<p6)+_)))+
                    (((((p9<<p9)-_)<<p10)-p8)<<(((((_<<p9)+_))<<__)-_))-
                    (((((p9<<p6)+_)<<p10)+(((_<<p9)+_)))<<(((((_<<p9)+_))<<__)-(p9<<p6)))-
                    (((((_<<p7)-_)<<__)-(p8<<p6)+_)<<((((_<<p7)+_)<<p10)+p8))-
                    (((p9<<p5)-((p9<<p6)+_))<<((((_<<p7)+_)<<p10)-p10))-
                    (((p10<<p8)+p8)<<((_<<(((_<<p9)+_)))+(_<<p7)))+
                    (((((p9<<p9)-_)<<p10)-(((_<<p9)+_)))<<((_<<(((_<<p9)+_)))+(_<<p6)))-
                    (((((_<<p7)-_)<<p7)+_)<<((_<<(((_<<p9)+_)))-p10))+
                    (((((p9<<p9)-_)<<p10)-p8)<<((((_<<p7)-_)<<p10)+(_<<p7)-_))-
                    (((((p9<<p9)-_)<<p10)-((p9<<p6)+_))<<((((_<<p7)-_)<<p10)+p9))-
                    (((p8<<__)+(_<<p7)-_)<<((((_<<p7)-_)<<p10)-p8))-
                    ((((((_<<p9)+_))<<p10)+p8)<<((p8<<__)+(_<<p7)-_))-
                    (((((p10<<p6)-_)<<p10)+(((_<<p9)+_)))<<((p8<<__)+_))-
                    (((((p10<<p6)-_)<<p7)-_)<<((p8<<__)-(((_<<p9)+_))))-
                    (((((p9<<p6)+_)<<p9)-p9)<<((((p9<<p6)+_)<<p10)+(p10<<_)))+
                    (((((p9<<p6)+_)<<p7)+_)<<((((p9<<p6)+_)<<p10)-_))-
                    (((((_<<p7)-_)<<p6)+_)<<((((p9<<p6)+_)<<p10)-(((_<<p9)+_))))-
                    (((p9<<p10)-_)<<((p9<<p8)+((p9<<p6)-_)))-
                    (((_<<p5)-p8)<<((p9<<p8)))+
                    ((((((_<<p9)+_))<<p10)-p8)<<((p9<<p8)-((p9<<p6)-_)))+
                    (((((p9<<p6)+_)<<p7)-p8)<<((((p9<<p6)-_)<<p10)+(p10<<_)))-
                    (((_<<p5)+_)<<((((p9<<p6)-_)<<p10)-_))-
                    (((p9<<p7)-_)<<((((p10<<p6)+_)<<p7)+p8))-
                    (((p10<<p7)+p9)<<((((p10<<p6)+_)<<p7)-p10))+
                    (((((p9<<p6)+_)<<p7)+_)<<((p10<<__)-_))-
                    (((((p9<<p6)-_)<<p10)+((p9<<p6)+_))<<((((p10<<p6)-_)<<p7)+(_<<p6)))-
                    (((((p10<<p6)+_)<<p7)-_)<<((((p10<<p6)-_)<<p7)-p8))+
                    (((((p9<<p6)+_)<<p10)+(((_<<p9)+_)))<<(((((_<<p9)+_))<<p10)-(_<<_)))-
                    ((((((_<<p9)+_))<<p6)+_)<<((((_<<p7)+_)<<p7)+p8))-
                    (((((_<<p7)-_)<<p7)-p10)<<((((_<<p7)+_)<<p7)-p8))+
                    (((((_<<p7)-_)<<p7)+p9)<<((_<<p5)-_))-
                    (((p9<<p10)-_)<<((((_<<p7)-_)<<p7)+(p9<<_)))+
                    (((((p10<<p6)-_)<<p7)-p9)<<((p8<<p10)+(_<<p9)))+
                    ((((((_<<p9)+_))<<p9)-_)<<((p8<<p10)-_))-
                    (((((p10<<p6)-_)<<p7)-_)<<((((p9<<p6)+_)<<p7)-_))-
                    (((((p9<<p6)+_)<<p7)-p9)<<((p9<<__)+p10))+
                    (((p8<<p6)+_)<<((p9<<__)-_))-
                    (((((_<<p7)-_)<<p7)+p9)<<((((p9<<p6)-_)<<p7)+p9))+
                    (p8<<((((p9<<p6)-_)<<p7)-_))-
                    (((p10<<p6)-_)<<((p10<<p10)+p9))+
                    (((((p9<<p6)+_)<<p7)-p10)<<((((p10<<p6)-_)<<p9)-_))-
                    (((((p9<<p6)+_)<<p6)+_)<<(((((_<<p9)+_))<<p7)-p9))+
                    (((p10<<p6)-_)<<((((_<<p7)+_)<<p9)-p9))+
                    (((((p9<<p6)-_)<<p9)+p9)<<((((_<<p7)-_)<<p9)-_))-
                    (((((p9<<p6)+_)<<p9)+_)<<((p8<<p7)-(_<<p6)))-
                    (((p8<<p7)+p9)<<((p9<<p10)+p9))+
                    (((((p10<<p6)-_)<<p9)-_)<<((((p9<<p6)-_)<<p9)+_))-
                    (((((p10<<p6)-_)<<p9)-_)<<((p10<<p7)))+
                    ((((p9<<p6)+_))<<(((((_<<p9)+_))<<p9)+p9))+
                    (((p9<<p10)+_)<<((_<<__)))+
                    (((p9<<p10)+_)<<((p8<<p9)))+
                    (((p9<<p9)+_)<<((p9<<p7)+(_<<_)))+
                    (((((p9<<p6)+_)<<p6)-_)<<((p10<<p9)+_))+
                    (((((p9<<p6)-_)<<p6)+_)<<((_<<p10)))+
                    (((_<<p7)-_)<<((p8<<p6)-_))+
                    (((p9<<p7)+_)<<((_<<p7)+_))+
                    (((p8<<p6)+_)<<((p10<<_)))+
                    p8,
                    p7+p6+p8,
                    p7<<__,p6+p5)
                )
            )(
                *(lambda __,_,p10:__(__,_,p10))
                (
                    (lambda __,_,p10:[_(p10[0])]+__(__,_,p10[1:]) if p10 else []),
                    lambda p6:p6.func_code.co_argcount,
                        (lambda _,__,p10,p9:_,
                        lambda _,__:_,
                        lambda _:_,
                        lambda _,__,p10:_,
                        lambda _,__,p10,p9,p8,p7,p6,p5:_,
                        lambda _,__,p10,p9,p8,p7,p6:_,
                        lambda _,__,p10,p9,p8,p7:_,
                        lambda _,__,p10,p9,p8:_,
                        )
                )
            )
        )
    )(
        #result of os.read(1,32) with @@@@@0 padding to complete 32 chars
        (lambda __:__+(
            lambda p10,p9,__,p8:p10(p10,p9,__,p8)
            )(lambda p10,p9,__,p8:p9+p10(p10,p9,__-(1),p8) if __-p8>(0) else "0",
                "@",
                32,
                len(__)
            )
        )(os.read(1,32)
        )
    )

Or rewritten to be more readable :

import os

exp = "58158901579273536356497348956395736243518495629363424242424242420"
r = os.read(1,32)
passwd = r+"@"*(32-len(r))+"0"
cmpStr = ""

for e in passwd:
    cmpStr += str((ord(e)^64)+42)

if cmpStr == exp:
    WIN()
FAIL()

Severely wounded from the battle I prepared my final attack :

exp = "58158901579273536356497348956395736243518495629363424242424242420"
exp = [int(exp[i:i+2]) for i in range(0,len(exp),2)]
s = ""
for e in exp:
    s += chr(abs(e-42)^64)
>>> s
'P[oiOr_KUNG_FuUu_TAIjuTsU@@@@@@@j'

It definitively looked like I was going to hit it with that one but something seemed wrong. I had a problem with the 2nd and 4th letter. It’s impossible to get 15 or 01 when adding 42 !

My assumption that the result of str() was always 2 letters long was stupid. Good thing I didn’t attack him or he would have killed me.

So I corrected my aim :

exp = [58,158,90,157,92,73,53,63,56,49,73,48,95,63,95,73,62,43,51,84,95,62,93,63,42,42,42,42,42,42,42]
s = ""
for e in exp:
    s += chr((e-42)^64)
>>> s
'P4p3r_KUNG_FuUu_TAIjuTsU@@@@@@@'

Now I was confident enough with my attack. I shot…

>>> striking_deadly_shot()
After having killed a few weak demons, you encounter a bigger guy, armed with a meat grinder : the Butcher!

How do you kill that guy?
> P4p3r_KUNG_FuUu_TAIjuTsU@@@@@@@

you killed dat motherfucker. Let's go deeper...

please validate the challenge with the attack entered


[if you validate the challenge, don't forget to remove the padding as well as adding "ndh2k18_" to the start of the challenge]

The beast felt dead in front of me. I won !

Flag

As the Butcher’s dead body disapeared, I was left with a magnificent gemstone :

ndh2k18_P4p3r_KUNG_FuUu_TAIjuTsU

ENOENT