diff options
author | kartofen <mladenovnasko0@gmail.com> | 2023-04-24 23:52:41 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2023-04-24 23:52:41 +0300 |
commit | 9bf5719d4c59993c07113c089ebd5a92d692f785 (patch) | |
tree | 7310918ccac5bb3cfffc18861c286a6872554c01 /src/module | |
parent | 2ca6677667af23ecb1e17479c5b5cc08efa53309 (diff) |
skeleton done
Diffstat (limited to 'src/module')
-rw-r--r-- | src/module/Makefile | 8 | ||||
-rw-r--r-- | src/module/module.c | 21 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/module/Makefile b/src/module/Makefile new file mode 100644 index 0000000..c9db2e0 --- /dev/null +++ b/src/module/Makefile @@ -0,0 +1,8 @@ +obj-m += $(name).o +$(name)-y := module.o + +all: + make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) modules + +clean: + make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) clean diff --git a/src/module/module.c b/src/module/module.c new file mode 100644 index 0000000..43edb8c --- /dev/null +++ b/src/module/module.c @@ -0,0 +1,21 @@ +#include <linux/init.h> +#include <linux/module.h> +#include <linux/printk.h> + +static int __init init(void) +{ + pr_info("Hello World!\n"); + return 0; +} + +static void __exit exit(void) +{ + pr_info("Goodbye World!\n"); +} + +module_init(init); +module_exit(exit); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Kartofen"); +MODULE_DESCRIPTION("A simple keylogger kernel module"); |