You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
re:=regexp.MustCompile(`^(?P<date>[[:alpha:]]{3}\s\d{2}\s\d{2}:\d{2}:\d{2}) (?P<host>[^ ]+) sshd\[[[:alnum:]]+\]: Invalid user (?P<username>[^ ]+) from (?P<src>.*$)`)
40
+
n1:=re.SubexpNames()
41
+
r2:=re.FindAllStringSubmatch(logline, -1)[0]
42
+
43
+
// Build the group map for the line
44
+
md:=map[string]string{}
45
+
fori, n:=ranger2 {
46
+
// fmt.Printf("%d. match='%s'\tname='%s'\n", i, n, n1[i])
47
+
md[n1[i]] =n
48
+
}
49
+
50
+
// Assumes the system parses logs recorded during the current year
0 commit comments