I learnt Python in school but I have no clue what this is!
The contents of
C2cipher appear to be Python disassembly. Manually converting this to Python code, we would have something like:
The first cipher replaces each character
i in the input text with
chr(2*ord(i) - len(text)), while the second cipher XORs every character in the input text with
'S'. To reverse the first cipher, I wrote the following function:
To reverse the second cipher,
xor(inpString, 'S') is sufficient (
xor function from the
pwn library is used). However, only
C1rev was enough to get the flag; seems like
C2cipher wasn't used at all.