logix has asked for the wisdom of the Perl Monks concerning the following question:
Would there be anyway to make a module or something, that would be run before the real script/perl code is run?
Im admin at an ISP and i often see user-websites with bad PHP code getting hacked, and often this results in an upload of some perl-written bot to /tmp/ or /dev/shm, which is then executed.
What i would really like to do, is simply check if script-location is /tmp/, dont run the script. (sorta like a "trusted path execution" for perl)
But if there was a way to hook in some perl code to be run before the actual script, one could do a lot of cool stuff, like grepping the file for specific patterns, checking owner of file etc. etc. Could be fun to play with.
Is there any such pre-execution hook?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl pre-execution hook
by ikegami (Patriarch) on Jan 04, 2011 at 19:26 UTC | |
by logix (Initiate) on Jan 04, 2011 at 20:01 UTC | |
by ikegami (Patriarch) on Jan 04, 2011 at 20:16 UTC | |
by logix (Initiate) on Jan 04, 2011 at 20:35 UTC | |
by ikegami (Patriarch) on Jan 04, 2011 at 21:39 UTC | |
by Anonyrnous Monk (Hermit) on Jan 04, 2011 at 20:24 UTC | |
by ikegami (Patriarch) on Jan 04, 2011 at 20:27 UTC | |
| |
|
Re: perl pre-execution hook
by Old_Gray_Bear (Bishop) on Jan 04, 2011 at 19:34 UTC | |
|
Re: perl pre-execution hook
by sharyanto (Initiate) on Jan 05, 2011 at 02:21 UTC |