It's one of very easy cryptographic tasks. We have to decrypt message:
Lw!
Gyzvecy ke WvyVKT!
W'zz by reso dsbdkwksky tzjq teo kly ujr. Teo keujr, gy joy dksurwmq bjdwv vorakeqojalr jmu wkd jaazwvjkwemd. Vorakeqojalr ljd j zemq lwdkeor, jzklesql gwkl kly juxymk et vecaskyod wk ljd qekkym oyjzzr vecazwvjkyu. Decy dwcazy ezu vwalyod joy kly Vjydjo vwalyo, kly Xwqymyoy vwalyo, kly dsbdkwkskwem vwalyo, glwvl wd klwd emy, jmu de em. Jzcedk jzz et klydy vwalyod joy yjdwzr boeiym keujr gwkl kly lyza et vecaskyod. Decy myg ymvorakwem cykleud joy JYD, kly vsooymk dkjmujou teo ymvorakwem, jzemq gwkl ODJ. Vorakeqojalr wd j xjdk twyzu jmu wd xyor wmkyoydkwmq klesql. De iwvi bjvi, oyju sa em decy veez vwalyod jmu ljxy tsm!
El jmu teo reso oyveoud cr mjcy wd WvyVKT{jzgjrd_zwdkym_ke_reso_dsbdkwksky_tzjqd}.
We already know that every flag in this CTF, starts witch "IceCTF{" phrase, so there's no problem with first six substitutions. Then it's even easier. Here's the code to decode the message anyway:
#include#include #include using namespace std; char sub(char input) { if (input == 'C') return 'M'; if (input == 'c') return 'm'; if (input == 'E') return 'O'; if (input == 'e') return 'o'; if (input == 'G') return 'W'; if (input == 'g') return 'w'; if (input == 'L') return 'H'; if (input == 'l') return 'h'; if (input == 'T') return 'F'; if (input == 't') return 'f'; if (input == 'V') return 'C'; if (input == 'v') return 'c'; if (input == 'W') return 'I'; if (input == 'w') return 'i'; if (input == 'Y') return 'E'; if (input == 'y') return 'e'; if (input == 'Z') return 'L'; if (input == 'z') return 'l'; if (input == 'K') return 'T'; if (input == 'k') return 't'; if (input == 'J') return 'A'; if (input == 'j') return 'a'; if (input == 'D') return 'S'; if (input == 'd') return 's'; if (input == 'Q') return 'G'; if (input == 'q') return 'g'; if (input == 'R') return 'Y'; if (input == 'r') return 'y'; if (input == 'S') return 'U'; if (input == 's') return 'u'; if (input == 'X') return 'V'; if (input == 'x') return 'v'; if (input == 'O') return 'R'; if (input == 'o') return 'r'; if (input == 'M') return 'N'; if (input == 'm') return 'n'; if (input == 'U') return 'D'; if (input == 'u') return 'd'; if (input == 'A') return 'P'; if (input == 'a') return 'p'; if (input == 'I') return 'K'; if (input == 'i') return 'k'; } char x = 0; int main(void) { ifstream plik; plik.open("message.txt"); while ( (x = plik.get()) != EOF) { x = sub(x); printf("%c", x); } plik.close(); cout << endl; return 0; }
Comments
Post a Comment