PicoCTF Challenge: Mod26ΒΆ


Cryptography can be easy, do you know what ROT13 is?


from string import ascii_lowercase as alphabet
def rot(given: str, n: int) -> str:
    Passes anything that is not lowercase ascii
    return "".join(
            alphabet[(alphabet.index(letter.lower()) + n) % 26]
            if letter.lower() in alphabet
            else letter
            for letter in given
given = "cvpbPGS{arkg_gvzr_V'yy_gel_2_ebhaqf_bs_ebg13_uJdSftmh}"
rot(given, 13)