-
-
Save DoubleYouEl/e3de97293ce3d5452b3be7a336a06ad7 to your computer and use it in GitHub Desktop.
X-OVH-SPAMCAUSE decoder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def decode(msg): | |
text = "" | |
for i in range(0, len(msg), 2): | |
text += unrot(msg[i: i + 2], i // 2) # add position as extra parameter | |
return text | |
def unrot(pair, pos, key=ord('x')): | |
if pos % 2 == 0: # "even" position => 2nd char is offset | |
pair = pair[1] + pair[0] # swap letters in pair | |
offset = (ord('g') - ord(pair[0])) * 16 # treat 1st char as offset | |
return chr(sum(ord(c) for c in pair) - key - offset) # map to original character | |
if __name__ == '__main__': | |
import sys | |
print(decode(sys.argv[1])) |
Hello,
Can your share code at github ?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i just came to know your online version i was using python script. But i'm afraid that it is not working anymore it had been some update. if you can try with this source:
dmFkZTFe/e7/NBcbdIzTiTd9iacMG74sllyWk8AUVYUN6FnPcWkWUvzuZYciE1WOqPM1IEphrIPmIRc+FzW1CIZ0dEsLixCUfXZjhSQFGV4g3SdxBEt2s0XD0+cb5zDgrffQLdLtkAd2v46gQBK2Nnt5M8ch//tKN5r+kHSaSh8p1lwcwTZi111GuKnpyvH1IblBkvty3LTt+zTq+NrbC1iwQOs7a7uclX2p7tKhfXfXKQvZm8FG/mkEWz2jx6AM6rw0XldvaK+zhGwlKjjU8hi5/aa9AgO8QpIsnrU/BGgTuD/DOpDDgA/K3hFha1PcRD1Mn0gP40HSOYH/PxB122wRmrXmlS4n933nbB5IV+uSWESSiS4Gt4BzsfV/3eL1Z17W9LbCXkMpe/08haZyLw9Bn2DHVvaI1uf/Eu8XORuTvFOg4wnsWBImD3LU0S9La5F53zAgNU6GFdXqnvhtPhxRibn5Fczeuzj2O/+580lUO/yGEw2CyLi1Vo/SoVE6+WFpj7DICwKiO+o/rfyb4ulp01Y4FYs1yOsk9AmVs2IOr+/eVyLVGRlkfIWbIB/d62KLog6ooC/TBFyfgdyku36VOnlg/MfjC4G+RxvhA2TNgO0Vbpw9vvADYNqMGG+tqVoFHkBRpgSLkTuLAx3PI2KoG/BW8NFq3QWJg40wI2k6UeHCHw