Sponsored Content
Full Discussion: SQL Injection Detection
Top Forums Shell Programming and Scripting SQL Injection Detection Post 302906218 by Akshay Hegde on Wednesday 18th of June 2014 06:25:32 AM
Old 06-18-2014
add this BEGIN{IGNORECASE=1} to RudiC's code, if you have gawk it should work
Code:
awk 'BEGIN{IGNORECASE=1}NR==FNR {SRCSTR=SRCSTR DELIM $0; DELIM="|"; next} gsub (SRCSTR,"&")==2' patternfile mysite-access_log.log

---------- Post updated at 04:55 PM ---------- Previous update was at 04:52 PM ----------

OR

Code:
awk 'NR==FNR {SRCSTR=SRCSTR DELIM tolower($0); DELIM="|"; next}{p=tolower($0)} gsub(SRCSTR,"&",p)==2' patternfile mysite-access_log.log


Last edited by Akshay Hegde; 06-18-2014 at 07:44 AM..
 
oldlog2new(8)						      System Manager's Manual						     oldlog2new(8)

NAME
oldlog2new - Convert an NCSA httpd 1.1 access_log file to CLF access_log SYNOPSIS
oldlog2new [ -hez ] [ -f logfile ] [ -s srmfile ] DESCRIPTION
Convert an NCSA httpd 1.1 access_log file to CLF access_log OPTIONS
Display Options: -h Help -- just display this message and quit. -e Display all invalid log entries on STDERR. (default is to ignore them) Input Options: -f Read from the following access_log file instead of the default. -z Use zcat to uncompress the log file while reading [requires -f]. -s Get the server directives from the following srm.conf file. SEE ALSO
crontab(1), httpd(1m), perl(1), wwwstat(1), splitlog(1), monthly(8), oldlog2new(8) More info and the latest version of oldlog2new can be obtained from http://www.ics.uci.edu/pub/websoft/wwwstat/ ftp://www.ics.uci.edu/pub/websoft/wwwstat/ If you have any suggestions, bug reports, fixes, or enhancements, please join the <wwwstat-users@ics.uci.edu> mailing list by sending e- mail with "subscribe" in the subject of the message to the request address <wwwstat-users-request@ics.uci.edu>. The list is archived at the above address. 18 November 2004 oldlog2new(8)
All times are GMT -4. The time now is 01:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy