We have to debug/reverse engineer a program written in c called "bomb"
It asks for a password and if you don't get it right, then it blows up. There are 4 levels you have to get through (4 passwords).
I have run GDB on the program and this is all I have been able to come up with.... any help would be great!
* Oh and found out c = 1 and v = 0xFFBFFBEC from within GDB
int main (int c, char **v)
{
char buffer4[8];
char buffer3[8];
char buffer2[8];
char buffer1[8];
sleepfor = !getenv("accel") * sleepfor;
prompt();
gets(buffer1);
if (strcmp(buffer1, P1) == 0)
click();
else
kaboom();
prompt();
gets(buffer2);
if ((buffer2[0] == P2[0]) &&
(buffer2[1] == P2[1]) &&
(buffer2[2] == P2[2]) &&
(strlen(buffer2) == 1<<2))
click();
else
kaboom();
prompt();
gets(buffer2);
if (strcmp(buffer3, P3) == 0)
click();
else
kaboom();
prompt();
gets(buffer4);
if (fopen(buffer4,"r"))
fizzle();
else
kaboom();
return 0;
}