Add linux_intro presentation

This commit is contained in:
Valentin Brandl
2022-10-05 17:58:22 +02:00
parent 8dfc841a59
commit 1e0227831b
33 changed files with 297 additions and 8 deletions

1
assets/bof/logic/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
logic

16
assets/bof/logic/Makefile Normal file
View File

@ -0,0 +1,16 @@
# use bash so process substutution is available
CC = gcc
CFLAGS = -fno-stack-protector -g
SHELL = bash
SRC = logic.c
TARGET = $(SRC:%.c=%)
.PHONY: build
build: $(TARGET)
%: %.c
$(CC) ${CFLAGS} $< -o $@
.PHONY: clean
clean:
rm -f logic

21
assets/bof/logic/logic.c Normal file
View File

@ -0,0 +1,21 @@
#include<stdio.h>
#include<string.h>
void foo(char *input) {
int is_logged_in = 0;
char buf[64];
strcpy(buf, input);
if (is_logged_in) {
puts("logged in!!1!");
} else {
puts("not logged in");
}
}
int main(int argc, char **argv) {
if (argc != 2) {
return 1;
}
foo(argv[1]);
return 0;
}

View File

@ -0,0 +1,8 @@
# Beispiel 1
* Debugger `gdb`
* `list` für Code
* `break <n>` für Breakpoint
* `run $(python -c 'print("A"*77)')`
* `show is_logged_in`
* `continue`