Skip to content
Snippets Groups Projects
Commit 72077fc6 authored by Jose Carlos Luna Duran's avatar Jose Carlos Luna Duran
Browse files

Merge branch 'cindy' into 'master'

Update alert.go

See merge request ComputerSecurity/gocanary!3
parents 2d6fc35a 6fa0d0f0
No related branches found
No related tags found
No related merge requests found
......@@ -141,7 +141,7 @@ func formatSlackMessage(canary interface{}, remoteIP string) (string, []Attachme
var message strings.Builder
message.WriteString("**Canary Alert**")
message.WriteString(fmt.Sprintf("**Canary Alert: %s**", v.FieldByName("Tag")))
var fields []Field
for i := 0; i < v.NumField(); i++ {
......@@ -159,7 +159,10 @@ func formatSlackMessage(canary interface{}, remoteIP string) (string, []Attachme
}
// Append the ipinfo URL
fields = append(fields, Field{Title: "CheckRemoteIPInfo", Value: fmt.Sprintf("http://ipinfo.io/%s", remoteIP)})
fields = append(fields, Field{Title: "CheckRemoteIPInfo", Value: fmt.Sprintf("http://ipinfo.io/%s", remoteIP), Short: true})
// Append abuse URL
fields = append(fields, Field{Title: "CheckAbuseInfo", Value: fmt.Sprintf("https://www.abuseipdb.com/check/%s", remoteIP), Short: true})
attachments := []Attachment{
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment