Documentation ¶
Overview ¶
Package check contains functions that can check an IP address.
Index ¶
- Variables
- func AbuseIPDB(ipaddr net.IP) (checkip.Result, error)
- func BlockList(ipddr net.IP) (checkip.Result, error)
- func CinsScore(ipaddr net.IP) (checkip.Result, error)
- func DBip(ip net.IP) (checkip.Result, error)
- func DnsMX(ipaddr net.IP) (checkip.Result, error)
- func DnsName(ipaddr net.IP) (checkip.Result, error)
- func Firehol(ipaddr net.IP) (checkip.Result, error)
- func IPSum(ipaddr net.IP) (checkip.Result, error)
- func IPtoASN(ipaddr net.IP) (checkip.Result, error)
- func MaxMind(ip net.IP) (checkip.Result, error)
- func OTX(ipaddr net.IP) (checkip.Result, error)
- func PhishStats(ipaddr net.IP) (checkip.Result, error)
- func Ping(ipaddr net.IP) (checkip.Result, error)
- func Shodan(ipaddr net.IP) (checkip.Result, error)
- func TcpPorts(ipaddr net.IP) (checkip.Result, error)
- func ThreadCrowd(ipaddr net.IP) (checkip.Result, error)
- func UrlScan(ipaddr net.IP) (checkip.Result, error)
- func VirusTotal(ipaddr net.IP) (checkip.Result, error)
- type AutonomousSystem
- type MX
- type Names
- type OpenTcpPorts
- type TcpPort
Constants ¶
This section is empty.
Variables ¶
var Active = []checkip.Check{ Ping, TcpPorts, }
Active checks interact with the target IP address.
var Passive = []checkip.Check{ AbuseIPDB, BlockList, CinsScore, DBip, DnsMX, DnsName, Firehol, IPSum, IPtoASN, MaxMind, OTX, PhishStats, Shodan, ThreadCrowd, UrlScan, VirusTotal, }
Passive checks don't interact directly with the target IP address.
Functions ¶
func AbuseIPDB ¶ added in v0.24.0
AbuseIPDB uses https://api.abuseipdb.com/ to get generic information about ipaddr and see if the ipaddr has been reported as malicious.
func BlockList ¶ added in v0.24.0
BlockList searches the ipaddr in http://api.blocklist.de.
func CinsScore ¶ added in v0.24.0
CinsScore searches ipaddr in https://cinsscore.com/list/ci-badguys.txt.
func DBip ¶ added in v0.24.0
DBip gets geolocation data from https://db-ip.com/db/download/ip-to-city-lite
func DnsMX ¶ added in v0.24.0
DnsMX performs reverse lookup and consults AbuseIPDB to get domain names fo the ipaddr. Then it looks up MX records (mail servers) for the given domain names.
func DnsName ¶ added in v0.24.0
DnsName does a reverse lookup for a given IP address to get its names.
func Firehol ¶ added in v0.28.0
Firehol checks whether the ipaddr is found on a blacklist from https://iplists.firehol.org/?ipset=firehol_level1.
func IPtoASN ¶ added in v0.24.0
IPtoASN gets info about autonomous system (IPtoASN) of the ipaddr. The data is taken from a TSV file ip2asn-combined downloaded from iptoasn.com.
func MaxMind ¶ added in v0.24.0
MaxMind gets geolocation data from maxmind.com's GeoLite2-City.mmdb.
func OTX ¶ added in v0.24.0
OTX counts pulses on otx.alienvault.com to find out whether the ipaddr is malicious.
func PhishStats ¶ added in v0.29.0
PhishStats checks whether the ipaddr is involved in phishing according to https://phishstats.info/phish_score.csv.
func Ping ¶ added in v0.24.0
Ping sends five pings (ICMP echo request packets) to the ippaddr and returns the statistics.
func Shodan ¶ added in v0.24.0
Shodan gets generic information from https://api.shodan.io.
func TcpPorts ¶ added in v0.24.0
TcpPorts tries to connect to the 1000 TCP ports that are most often found open on Internet hosts. Then it reports which of those ports are open on the given IP address.
func ThreadCrowd ¶ added in v0.24.0
ThreadCrowd threatcrowd.org to find out whether the ipaddr was voted malicious.
func UrlScan ¶ added in v0.24.0
UrlScan gets data from urlscan.io. When a URL is submitted to urlscan.io, an automated process will browse to the URL like a regular user and record the activity that this page navigation creates.
func VirusTotal ¶ added in v0.24.0
VirusTotal gets generic information and security reputation about the ippaddr from https://www.virustotal.com/api.
Types ¶
type AutonomousSystem ¶ added in v0.24.0
type AutonomousSystem struct { Number int `json:"-"` FirstIP net.IP `json:"-"` LastIP net.IP `json:"-"` Description string `json:"description"` CountryCode string `json:"-"` }
func (AutonomousSystem) Json ¶ added in v0.25.0
func (a AutonomousSystem) Json() ([]byte, error)
func (AutonomousSystem) Summary ¶ added in v0.24.0
func (a AutonomousSystem) Summary() string
type OpenTcpPorts ¶ added in v0.24.0
type OpenTcpPorts []TcpPort
OpenTcpPorts are the TCP ports that were found open on the given IP address.
func (OpenTcpPorts) Json ¶ added in v0.25.0
func (t OpenTcpPorts) Json() ([]byte, error)
func (OpenTcpPorts) Summary ¶ added in v0.24.0
func (t OpenTcpPorts) Summary() string