diff --git a/ips.go b/ips.go index 4986f51..23d9538 100644 --- a/ips.go +++ b/ips.go @@ -10,6 +10,9 @@ var p = regexp.MustCompile(`Failed password for .* from (.*) port`) // ParseIP finds the ip address from an sshd log line that contains a failed // password attempt. +// +// A found IP address will be returned; an empty string returned indicates +// nothing was found. func ParseIP(line string) string { if m := p.FindStringSubmatch(line); m != nil { if len(m) != 2 {