[0] % checksec silver_bullet
[!] Couldn't find relocations against PLT to get symbols
[*] '/home/dylan/ctfs/pwnable_tw/Silver_Bullet/silver_bullet'
Arch: i386-32-little
RELRO: Full RELRO
Stack: No canary found
NX: NX enabled
PIE: No PIE
int __cdecl main(int argc, const char **argv, const char **envp)
{
int choice; // eax
Werewolf wolf; // [esp+0h] [ebp-3Ch]
bullet silver_bullet; // [esp+8h] [ebp-34h]
init_proc();
silver_bullet.length = 0;
memset(&silver_bullet, 0, 0x30u);
wolf.HP = 0x7FFFFFFF;
wolf.name = "Gin";
while ( 1 )
{
while ( 1 )
{
while ( 1 )
{
while ( 1 )
{
menu();
choice = read_int();
if ( choice != 2 )
break;
power_up(&silver_bullet);
}
if ( choice > 2 )
break;
if ( choice != 1 )
goto LABEL_16;
create_bullet(&silver_bullet);
}
if ( choice == 3 )
break;
if ( choice == 4 )
{
puts("Don't give up !");
exit(0);
}
LABEL_16:
puts("Invalid choice");
}
if ( beat(&silver_bullet, &wolf) )
return 0;
puts("Give me more power !!");
}
}