---
# System prepended metadata

title: rotation-100pt
tags: [picoCTF, picoCTF2023, 從零開始的 picoCTF, Cryptography]

---

# rotation-100pt
[題目在這](https://play.picoctf.org/practice/challenge/373?originalEvent=72&page=2)
## 題意
![](https://i.imgur.com/9AdsLhQ.png)

## 解題思路
給的檔案內容長這樣

![](https://i.imgur.com/e7jNRkf.png)

括號前面很明顯是 picoCTF 字母往前推九位，用 Ceaser 長這樣，但是不對

![](https://i.imgur.com/RSwIWgg.png)

將 {} 跟數字單獨出來不動，感覺就是這個了 OWO

![](https://i.imgur.com/sRhF9Qj.png)

下面是 code : 
```python=
text = ""
result = ""
s = 18

def ceaser(text):
    result = ""
    for i in range(len(text)):
        char = text[i]

        if (char.isupper()):  
            result += chr((ord(char) + s - 65) % 26 + 65)  
             
        elif (char.islower()):
            result += chr((ord(char) + s - 97) % 26 + 97)  
        else:  
            result += char

    print(result)

text = input("What is your encode: ")
ceaser(text)
```


## 困難之處
nope


Date : 2023/04/10 
###### tags: `picoCTF2023` [`從零開始的 picoCTF`](https://hackmd.io/-KQeDuzrQMOcFNhwU_5eKA?both=) `picoCTF` `Cryptography` 