Multi string and multi program support

This commit is contained in:
2025-09-07 20:41:41 +05:30
parent d52b9ceb69
commit 7e47f8dcef
4 changed files with 13 additions and 13 deletions

View File

@ -11,7 +11,7 @@ case "$1" in
;;
run)
echo "[*] Loading and running $FILE"
sudo bpftool prog load "$FILE" "$PIN_PATH" autoattach
sudo bpftool prog loadall "$FILE" "$PIN_PATH" autoattach
echo "[+] Program loaded. Press Ctrl+C to stop"
sudo cat /sys/kernel/debug/tracing/trace_pipe
sudo rm -f "$PIN_PATH"

View File

@ -6,12 +6,13 @@ from ctypes import c_void_p, c_int64, c_int32
@section("tracepoint/syscalls/sys_enter_execve")
def hello(ctx: c_void_p) -> c_int32:
print("entered")
print("multi constant support")
return c_int32(0)
@bpf
@section("tracepoint/syscalls/sys_exit_execve")
def hello_again(ctx: c_void_p) -> c_int64:
def hello_again(ctx: c_void_p) -> c_int32:
print("exited")
return c_int64(0)
return c_int32(0)
LICENSE = "GPL"