4
print " title = \"Syslog picviz analysis\";\n";
7
print " relative = \"1\";\n";
10
print " timeline time [label=\"Time\"];\n"; # Time
11
print " string auth [label=\"Auth type\"];\n"; # Machine
12
print " ipv4 src [label=\"Source\"];\n"; # Service
13
print " string login [label=\"Login\"];\n"; # PAM Module
20
$line =~ s/\"/\\"/g; # We escape our quotes
21
$line =~ s/&//g; # We escape our quotes
22
$line =~ s/<//g; # We escape our quotes
23
$line =~ s/>//g; # We escape our quotes
25
# Aug 18 (20:45:53) jazz sshd[26424]: (Accepted publickey) for (toady) from (192.168.1.23) port 63379 ssh2
26
# Aug 18 (20:49:47) jazz sshd[26444]: (Accepted keyboard-interactive/pam) for (toady) from (192.168.1.42) port 1115 ssh2
27
# Aug 18 (21:02:38) jazz sshd[26592]: error: PAM: (Authentication failure) for (toady) from (192.168.1.42)
29
if ($line =~ m/\w+ ?\d+ (\d+:\d+:\d+) [\w-.]+ sshd.*: (.*) for (\w+) from (\d+.\d+.\d+.\d+)/) {
35
if ($authtype =~ m/[fF]ail/) {
36
print " time=\"$time\",auth=\"$authtype\",src=\"$src\",login=\"$login\" [color=\"red\"];\n";
38
print " time=\"$time\",auth=\"$authtype\",src=\"$src\",login=\"$login\";\n";