HEX
Server: Apache
System: Linux dinesh8149 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: usesambura1 (1212012)
PHP: 7.0.33
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //usr/share/source-highlight/log.lang
vardef basic_time = '[[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}'
vardef time = '\<' + $basic_time + '\>'
vardef ip = '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\>'
vardef non_empty = '[^[:blank:]]+'

state date start '^[[:alpha:]]{3}[[:blank:]]{1,2}[[:digit:]]{1,2}(?=[[:blank:]]' + $basic_time + ')' begin
  state time start $time begin
    state symbol start $non_empty begin
      normal = ":" exitall
      function = '[^:\(\[]+'
      number delim "[" "]"
      number delim "(" ")"
    end
  end
end

state ip start '^' + $ip begin
  string = '[[:alnum:]]+(?=[[:blank:]]\[[[:digit:]]{2}/[[:alpha:]]{3}/[[:digit:]]{4})'
  date = '[[:digit:]]{2}/[[:alpha:]]{3}/[[:digit:]]{4}(?=:' + $basic_time + ')'
  time = $basic_time + '[[:blank:]][+-][[:digit:]]{4}'
  twonumbers = '[1-5][[:digit:]]{2}[[:blank:]][-0-9]+'
  state webmethod = "OPTIONS|GET|HEAD|POST|PUT|DELETE|TRACE|CONNECT|PROPFIND|MKCOL|COPY|MOVE|LOCK|UNLOCK" begin
    string = $non_empty exit
  end
end

vardef weekday_date = '\[[[:alpha:]]{3}[[:blank:]][[:alpha:]]{3}[[:blank:]]{1,2}[[:digit:]]{1,2}[[:blank:]](?=' + $basic_time + ')'

state date start '^' + $weekday_date begin
  time = $time
  date = '[[:digit:]]{4}\]'
  date = $weekday_date
  string = "[error]"
  comment = "[notice]"
  ip = $ip
end

ip = $ip

string = "root","failure"

(normal,port) = `((?:port|pid)[[:blank:]])([[:digit:]]+)`

state normal start '[[:blank:]](?=(IN|OUT)=)' begin
  state normal = '(IN|OUT|PROTO)=(?=[^[:blank:]]+)' begin
    string = $non_empty exit
  end
  state normal = '(SPT|DPT|TYPE|SEQ)=(?=[^[:blank:]]+)' begin
    cbracket = $non_empty exit
  end
  number = "CWR|ECE|URG|ACK|PSH|RST|SYN|FIN"
  ip = $ip
end