# 資訊 :::info - Question: Caesar - From: picoCTF Crypto - Difficulty: 100 points ::: --- # 目錄 :::info [TOC] ::: --- # 題目 Decrypt `picoCTF{dspttjohuifsvcjdpoabrkttds}`. # 解法 Caesar 沒意外就暴力解就好,因此我寫了一個程式跑出所有凱薩的可能性 ```c= #include <stdio.h> #include <string.h> #include <stdlib.h> int main() { char str[100] = "picoCTF{dspttjohuifsvcjdpoabrkttds}"; for(int i = 0; i < 26; i++ ) { printf("%2d. picoCTF{", i); for( int j = 8; j < strlen(str) - 1; j++ ) { printf("%c", ( ( ( str[j] - 'a' ) + i ) % 26 ) + 'a' ); } printf("}\n"); } return 0; } ``` 很明顯最後一個看起來有點意思,丟進去繳交 flag 就過了。 ![CaesarSolution](https://hackmd.io/_uploads/rJJ-yXTW0.png =80%x) Flag 就是 `picoCTF{crossingtherubiconzaqjsscr}`