# Rotation

starting off the challenge we were given a file and printing the file

<figure><img src="https://2781327171-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMuMceEGBvWN37BjlZKgv%2Fuploads%2Fz1wPo4y4d841Mm6PuvJ5%2Fimage.png?alt=media&#x26;token=ed7c49e1-b74d-4d1d-91b4-03de7740c0e0" alt=""><figcaption></figcaption></figure>

seems like it was doing a rotation cipher thing so we can just suspect it like caesar cause rotation get it? so using my old caesar chall code and improving it a little to bruteforce the flag&#x20;

```python
flag = ''

with open('encrypted.txt', 'r') as a:
    flag += a.readline().strip()

num = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]
for i in num:
    temp = ''
    for j in flag:
        if j.islower():
            num = ord(j) + i
            if(num > ord('z')):
                num -= 26
            temp += chr(num)
        elif j.isupper():
            num = ord(j) + i
            if(num > ord('Z')):
                num -= 26
            temp += chr(num)
        else:
            temp += j
    if "pico" in temp:
        print(temp)
        break
```

<figure><img src="https://2781327171-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMuMceEGBvWN37BjlZKgv%2Fuploads%2Fxjin3060wdlyq09GFPTN%2Fimage.png?alt=media&#x26;token=35742781-bdfe-4d2c-9816-3e76f3eec093" alt=""><figcaption></figcaption></figure>
