13

Cryptography can be easy, do you know what ROT13 is? cvpbPGS{abg_gbb_onq_bs_n_ceboyrz}

this is just a reuse of the mod26 challenge we can just use the mod26 solver and change it a little to solve it easily

data = "cvpbPGS{abg_gbb_onq_bs_n_ceboyrz}"


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