# Mod 26

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

<pre class="language-python"><code class="lang-python"><strong>data = ""
</strong>
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 &#x3C;= ord('z')):
            b += shift 
            if(b &#x3C; ord('a')):
                b += 26
            elif(b > ord('z')):
                b -= 26
        elif(b >= ord('A') and b &#x3C;= ord('Z')):
            b += shift
            if(b &#x3C; ord('A')):
                b += 26
            elif(b > ord('Z')):
                b -= 26
        flag += chr(b)
        print(flag)
</code></pre>

<figure><img src="https://2781327171-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMuMceEGBvWN37BjlZKgv%2Fuploads%2FPhL0hcZ44qJNkthamkdS%2Fimage.png?alt=media&#x26;token=86e164c2-0088-4106-957c-53f61005ef96" alt=""><figcaption></figcaption></figure>
