-
August 16th, 2003, 08:57 AM
#1
Script help
I'm attempting to write a script that will search my logfiles for exploit attempts. I know its not a great script... Does anybody have any suggestions on how I should go about it? My server is running linux with apache. Below I do a simple grep command and print the output to a browser. Is there a better command to use? How would you format it and print it out to a browser. Thanks for any suggestions.
<?php
$Exploit[] = " cmd.exe ";
$Exploit[] = " system32 ";
$Exploit[] = " scripts ";
$Exploit[] = " %2f ";
$Exploit[] = " %5c ";
$Exploit[] = " formmail.php ";
print "<pre>";
foreach ( $Exploit as $val )
{
system( "cd ../../../logs ; grep -n $val error_log ", $return );
}
print "</pre>";
?>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|