Skip to content

Instantly share code, notes, and snippets.

[color]
branch = auto
diff = auto
grep = auto
interactive = auto
status = auto
[alias]
br = branch
ca = commit -a
cm = commit -m
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/kprobes.h>
#include <linux/kallsyms.h>
struct kprobe kp;
static int hander_pre(struct kprobe *p, struct pt_regs *regs)
{
printk("Hit it\n");
obj-m := kprobe.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
#!/bin/bash
# clear rule
iptables -F
iptables -X
iptables -Z
# default policy
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT