# asisctf 2013: PPPCry

## PPPCry

Challenge description:

Tears and Smiles = Decode and Flag


An ip address and port was given and if you connected to it, it gave you a long string of the form (note that the challenge was changed during the competition):

Those were 32 equations in reverse polish notation, each followed by either a single letter or digit and seperated by a comma. The goal was to find the value for x that results in the following letter/digit. For a letter, you had to use the index of the letter in the alphabet and take the result modulo 26. For digits, you had to take the result modulo 10 instead.

The final python script: