Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@

If you want to hijack open calls for .mp3 files you can just use

sudo apt-get install systemtap
sudo stap -g -e 'probe kernel.function("do_filp_open") { p = kernel_string($pathname); l = strlen(p); if (substr(p, l - 4, l) == ".mp3") { $pathname = %{ (long)"/some/path/rickroll.mp3" %}; } }'

sudo stap -g -e 'probe kernel.function("do_filp_open") { p = kernel_string($pathname); l = strlen(p); if (substr(p, l - 4, l) == ".mp3") { $pathname = %{ (long)"/some/path/rickroll.mp3" %}; } }'

Note: requires the systemtap program. Debian users can use apt-get: `sudo apt-get install systemtap`.