# [rev] Guesser - Tamil CTF 2021 ###### tags: `TamilCTF2021` `rev` Executable written using .NET Framework is distributed. It can be reversed using tool like ILSpy. ```csharp= // App.Program using System; internal class Program { private static void function_two(string user, string pass) { if (user[2] + user[0] == 182 && user[2] - user[3] == 10 && user[4] == 'R' && user[4] - user[5] == 34 && user[6] - 16 == 100) { Console.WriteLine("\n [+] Congratulation.Credentials are correct!! [+]\n\n----- The Flag is TamilCTF{username:password} -----\n"); } } private static void function_one(string username, string password) { if ((password[2] ^ 0x17) == 124 && password[4] + password[2] == 192 && password[3] - 14 == 103) { function_two(username, password); } } private static void check(string user, string pass) { if (user.Length != 7) { Console.WriteLine("\nWrong username :( \n"); } else if (pass.Length != 5) { Console.WriteLine("\nWrong password :( \n"); } else if ((user[0] ^ 0x39) == 114 && pass[0] - 17 == 54 && user[0] + user[1] == 127 && (pass[0] ^ pass[1]) == 119) { function_one(user, pass); } } private static void Main(string[] args) { Console.WriteLine("\n---------------------------------------------------"); Console.WriteLine("-------------------- Login --------------------"); Console.WriteLine("---------------------------------------------------\n"); Console.Write(" Enter the Username : "); string user = Console.ReadLine(); Console.Write(" Enter the Password : "); string pass = Console.ReadLine(); check(user, pass); } } ``` Username and password is recoverable from this. ```python= print('Username: ' + chr(114 ^ 0x39) + chr(127 - (114 ^ 0x39)) + chr(182 - (114 ^ 0x39)) + chr((182 - (114 ^ 0x39)) - 10) + 'R' + chr(ord('R') - 34) + chr(116)) # Username: K4kaR0t print('Password: ' + chr(71) + chr(119 ^ 71) + chr(124 ^ 0x17) + chr(117) + chr(192 - (124 ^ 0x17))) # Password: G0kuU ``` From the overall information, flag is `TamilCTF{K4kaR0t:G0kuU}`.