Added data for week1 chals
This commit is contained in:
parent
e3a5d4f9cb
commit
1c978c70c3
11921
templab/data/.gef-2025.01.py
Normal file
11921
templab/data/.gef-2025.01.py
Normal file
File diff suppressed because it is too large
Load Diff
11921
templab/data/week1/.gef-2025.01.py
Normal file
11921
templab/data/week1/.gef-2025.01.py
Normal file
File diff suppressed because it is too large
Load Diff
BIN
templab/data/week1/prog
Executable file
BIN
templab/data/week1/prog
Executable file
Binary file not shown.
39
templab/data/week1/prog.c
Normal file
39
templab/data/week1/prog.c
Normal file
@ -0,0 +1,39 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
void greet(const char *name) {
|
||||
printf("Hello, %s!\n", name);
|
||||
}
|
||||
|
||||
int stack_frame() {
|
||||
int arr[30];
|
||||
size_t index;
|
||||
|
||||
arr[0] = 0xbeef;
|
||||
for(index = 1; index < 30; index++) {
|
||||
arr[index] = rand() % 0x1337 + arr[index - 1];
|
||||
}
|
||||
|
||||
return arr[29];
|
||||
}
|
||||
|
||||
void vuln() {
|
||||
|
||||
char letter[100];
|
||||
|
||||
read(0, letter, 350 * sizeof(char));
|
||||
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
||||
greet("World");
|
||||
|
||||
int ret_val = stack_frame();
|
||||
|
||||
vuln();
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user