Skip to content

Commit

Permalink
make fields visible in JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
jreisinger committed Apr 19, 2022
1 parent efb00fa commit 33f702b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions check/phishstats.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
)

type phishstats struct {
score float64 // 0-2 likely, 2-4 suspicious, 4-6 phishing, 6-10 omg phishing!
url string
Score float64 // 0-2 likely, 2-4 suspicious, 4-6 phishing, 6-10 omg phishing!
Url string
}

func (ps phishstats) Summary() string {
return ps.url
return ps.Url
}

func (ps phishstats) Json() ([]byte, error) {
Expand Down Expand Up @@ -45,7 +45,7 @@ func PhishStats(ipaddr net.IP) (checkip.Result, error) {
return result, err
}
result.Info = ps
if ps.score > 2 {
if ps.Score > 2 {
result.Malicious = true
}

Expand Down Expand Up @@ -73,8 +73,8 @@ func getPhishStats(csvFile string, ipaddr net.IP) (phishstats, error) {
if err != nil {
return ps, err
}
ps.score = score
ps.url = fields[2]
ps.Score = score
ps.Url = fields[2]
break
}
}
Expand Down

0 comments on commit 33f702b

Please sign in to comment.