Mod 26

Cryptography can be easy, do you know what ROT13 is? cvpbPGS{arkg_gvzr_V'yy_gel_2_ebhaqf_bs_ebg13_Ncualgvd}

reading the desc we already know that this chall is about rot13 so we just need to know the shift and after checking the ord(c) and ord(p) we know that the text was shifted by 13 so it was really just a plain rot13 using my interencdec and improving the script a little i made this solver

data = ""

with open('chall.txt', 'r') as a:
    data += a.read()
    flag = ""
    shift = 13
    for i in data:
        b = ord(i)
        if(b >= ord('a') and b <= ord('z')):
            b += shift 
            if(b < ord('a')):
                b += 26
            elif(b > ord('z')):
                b -= 26
        elif(b >= ord('A') and b <= ord('Z')):
            b += shift
            if(b < ord('A')):
                b += 26
            elif(b > ord('Z')):
                b -= 26
        flag += chr(b)
        print(flag)

Last updated