Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # Instructions: I use this to figure out who is calling someone
- # I move the script/executable that I want to discovery
- # the caller and put this on its place, the I edit last
- # line of this to call the same (moved) binary with all
- # arguments. Every thing should work (with a little overhead)
- # and you should got the command calling your misterious
- # on whowakesmeup.log, just edit the path if you wish
- LOG=~/whowakesmeup.log
- PPID=$(ps -o 'ppid=' --pid $$ | tr -d ' ')
- echo "I'm being executed by" >> $LOG
- ps www --pid $PPID >> $LOG
- echo '--' >> $LOG
- # Change here
- # /path/for/your_command $*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement