From 2ca6677667af23ecb1e17479c5b5cc08efa53309 Mon Sep 17 00:00:00 2001 From: kartofen Date: Mon, 24 Apr 2023 01:00:36 +0300 Subject: init --- src/init | 8 ++++++++ src/module.c | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/init create mode 100644 src/module.c (limited to 'src') diff --git a/src/init b/src/init new file mode 100644 index 0000000..f080d6c --- /dev/null +++ b/src/init @@ -0,0 +1,8 @@ +#!/bin/sh + +echo "Hello, whats your name?" +read -r name +hostname $name + +export PS1="\[\033[32m\]\h:\[\033[36m\]\w\[\033[37m\]# " # set the prompt +exec /bin/sh diff --git a/src/module.c b/src/module.c new file mode 100644 index 0000000..9c56d8b --- /dev/null +++ b/src/module.c @@ -0,0 +1,21 @@ +#include +#include +#include + +static int __init init(void) +{ + pr_info("Hello, world 4\n"); + return 0; +} + +static void __exit exit(void) +{ + pr_info("Goodbye, world 4\n"); +} + +module_init(init_hello_4); +module_exit(cleanup_hello_4); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Kartofen"); +MODULE_DESCRIPTION("A simple keylogger kernel module"); -- cgit v1.2.3