I am looking to secure my server, and I need to know how many scripts are using shell_exec before I block that command. Is there a way I can log the scripts that use this command?
I am looking to secure my server, and I need to know how many scripts are using shell_exec before I block that command. Is there a way I can log the scripts that use this command?
A grep on .php files for shell_exec may do the trick.
If you're unfamiliar with how to do this, there's been quite a few quick shell scripts posted to these forums that make use of grep that could possibly be modified to suit your needs.
I am looking to secure my server, and I need to know how many scripts are using shell_exec before I block that command. Is there a way I can log the scripts that use this command?
Thanks, I didn't know how to use grep with searching directories while at the same time only .php files. What command in addition to this (find -type f | xargs grep -l shell_exec) would search only .php files?