I used a decompiler to decompile a C program and this is the result :
Code:
// address: 0x8048504
int main(int argc, char **argv, char **envp) {
char local0[1024]; // m[r28 - 29]
int local6; // r24
printf("What's the password? ");
__isoc99_scanf();
local6 = strcmp(local0, "gr8qw");
if (local6 != 0) {
local6 = puts("Sorry! Wrong password");
} else {
local6 = puts("Yes, you got the right password!");
}
return local6;
}
How does the scanf() even work in this piece of code ?
I recalled that scanf needs to have a format string like %d etc..