/ Published in: Perl
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/usrb/bin/perl # _ __ __ _ __ __ _____ # / \ / _|/ _(_)_ __ | \/ | ____| # / _ \ | |_| |_| \ \/ / | |\/| | _| # / ___ \| _| _| |> < _| | | | |___ # /_/ \_\_| |_| |_/_/\_(_)_| |_|_____| # # Title : Apache Log File Analyzer # Author : Affix <[email protected]> # Website : http://Affix.ME # License : GNU/GPL V3 # Description : Analyzes Apache Log files # to determine possible vulnerabilities and # output a HTML log file highlighting the most # serious attempts. ################################################# #### DO NOT EDIT BELOW THIS LINE #### ################################################# my @lines = <FILE>; my $i = 0; my $errors = 0; my $fileError = 0; my $phpError = 0; my $forbidError = 0; my $rlfi = 0; my $sqli = 0; my $xss = 0; my @vuln; my @php; my @file; { { { $fileError++ } { $phpError++ } { $forbidError++ } $errors++ } else { { $rlfi++ } { $sqli++ } { $sqli++ } { $sqli++ } { $rlfi++ } { $xss++ } } $i++; } # Begin Writing Log File $i = 0; print(VLOG "<!--Force IE6 into quirks mode with this comment tag--><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\"><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" /><title>Affix.ME Apache Log File Analysis</title><style type=\"text/css\">body{margin: 0;padding: 0;border:0;overflow: hidden;height: 100%; max-height: 100%; }#framecontentLeft, #framecontentRight{position: absolute; top: 0; left: 0; width: 200px; /*Width of left frame div*/height: 100%;overflow: hidden; /*Disable scrollbars. Set to \"scroll\" to enable*/background-color: #515151;color: white; }#framecontentRight{left: auto;right: 0; width: 150px; /*Width of right frame div*/overflow: hidden; /*Disable scrollbars. Set to \"scroll\" to enable*/background-color: #515151;color: white;}#framecontentBottom{position: absolute;bottom: 0; left: 0px; /*Set left value to WidthOfLeftFrameDiv*/right: 0px; /*Set right value to WidthOfRightFrameDiv*/width: auto;height: 120px; /*Height of bottom frame div*/overflow: hidden; /*Disable scrollbars. Set to \"scroll\" to enable*/background-color: #515151;color: white;}#maincontent{position: fixed; top: 0;bottom: 120px; /*Set bottom value to HeightOfBottomFrameDiv*/left: 0px; /*Set left value to WidthOfLeftFrameDiv*/right: 0px; /*Set right value to WidthOfRightFrameDiv*/overflow: auto;background: #fff; width=\"100%\"}.innertube{margin: 15px; /*Margins for inner DIV inside each DIV (to provide padding)*/}* html body{ /*IE6 hack*/padding: 0 150px 120px 200px; /*Set value to (0 WidthOfRightFrameDiv HeightOfTopFrameDiv WidthOfLeftFrameDiv)*/}* html #maincontent{ /*IE6 hack*/height: 100%; width: 100%; }/* html #framecontentBottom{ /*IE6 hack*/width: 100%;}</style>"); print(VLOG "</head><body><div id=\"framecontentBottom\"><div class=\"innertube\"><div align=\"center\"><h3>Log File Analysis on : " . $ARGV[0] . "</h3></div></div></div><div id=\"maincontent\"><div class=\"innertube\">"); while($i <= @vuln) { $i++ } $i = 0; while($i <= @php) { $i++ } $i = 0; while($i <= @php) { $i++ } $i = 0;