mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 10:15:57 +01:00
20 lines
239 B
Bash
Executable File
20 lines
239 B
Bash
Executable File
#!/bin/sh
|
|
set -ex
|
|
insmod /fops.ko
|
|
mkdir -p /fops
|
|
mount -t debugfs none /fops
|
|
cd /fops/kernel_module_cheat
|
|
|
|
cat fops
|
|
# => open
|
|
# => read
|
|
# => len = [0-9]+
|
|
# => close
|
|
|
|
printf a >fops
|
|
# => open
|
|
# => write
|
|
# => len = a
|
|
# => len = 1
|
|
# => close
|