level03: done

This commit is contained in:
0x35c
2025-05-06 13:56:20 +02:00
parent d8ce593b67
commit 132e604f3b
3 changed files with 16 additions and 1 deletions

View File

@ -10,10 +10,11 @@ int decrypt(char key)
// Stack canary protection (or SSP)
// *(_DWORD *)((char *)&str[4] + 1) = __readgsdword(0x14u);
//
strcpy((char *)str, "Q}|u`sfg~sf{}|a3");
len = strlen((const char *)str);
for (int i = 0; i < len; ++i)
*((char *)str + i) ^= key;
str[i] ^= key;
// Key needs to equal 12
if (!strcmp((const char *)str, "Congratulations!"))
return system("/bin/sh");