check

package
v0.26.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2022 License: MIT Imports: 29 Imported by: 2

Documentation

Overview

Package check contains functions that can Check an IP address.

Index

Constants

This section is empty.

Variables

View Source
var Active = []checkip.Check{
	Ping,
	TcpPorts,
}

Active checks interact with the target IP address.

Passive checks don't interact directly with the target IP address.

Functions

func AbuseIPDB added in v0.24.0

func AbuseIPDB(ipaddr net.IP) (checkip.Result, error)

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

func BlockList(ipddr net.IP) (checkip.Result, error)

BlockList searches the ipaddr in http://api.blocklist.de.

func CinsScore added in v0.24.0

func CinsScore(ipaddr net.IP) (checkip.Result, error)

CinsScore searches ipaddr in https://cinsscore.com/list/ci-badguys.txt.

func DBip added in v0.24.0

func DBip(ip net.IP) (checkip.Result, error)

DBip gets geolocation data from https://db-ip.com/db/download/ip-to-city-lite

func DnsMX added in v0.24.0

func DnsMX(ipaddr net.IP) (checkip.Result, error)

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

func DnsName(ipaddr net.IP) (checkip.Result, error)

DnsName does a reverse lookup for a given IP address to get its names.

func IPSum added in v0.24.0

func IPSum(ipaddr net.IP) (checkip.Result, error)

IPSum checks how many blacklists the ipaddr is found on.

func IPtoASN added in v0.24.0

func IPtoASN(ipaddr net.IP) (checkip.Result, error)

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

func MaxMind(ip net.IP) (checkip.Result, error)

MaxMind gets geolocation data from maxmind.com's GeoLite2-City.mmdb.

func OTX added in v0.24.0

func OTX(ipaddr net.IP) (checkip.Result, error)

OTX counts pulses on otx.alienvault.com to find out whether the ipaddr is malicious.

func Ping added in v0.24.0

func Ping(ipaddr net.IP) (checkip.Result, error)

Ping sends five pings (ICMP echo request packets) to the ippaddr and returns the statistics.

func Shodan added in v0.24.0

func Shodan(ipaddr net.IP) (checkip.Result, error)

Shodan gets generic information from https://api.shodan.io.

func TcpPorts added in v0.24.0

func TcpPorts(ipaddr net.IP) (checkip.Result, error)

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

func ThreadCrowd(ipaddr net.IP) (checkip.Result, error)

ThreadCrowd threatcrowd.org to find out whether the ipaddr was voted malicious.

func UrlScan added in v0.24.0

func UrlScan(ipaddr net.IP) (checkip.Result, error)

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

func VirusTotal(ipaddr net.IP) (checkip.Result, error)

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 MX added in v0.24.0

type MX struct {
	Records map[string][]string `json:"records"` // domain => MX records
}

MX maps MX records to domain names.

func (MX) Json added in v0.25.0

func (mx MX) Json() ([]byte, error)

func (MX) Summary added in v0.24.0

func (mx MX) Summary() string

type Names added in v0.24.0

type Names []string

Names are the DNS names of the given IP address.

func (Names) Json added in v0.25.0

func (n Names) Json() ([]byte, error)

func (Names) Summary added in v0.24.0

func (n Names) 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

type TcpPort added in v0.24.0

type TcpPort struct {
	Name   string // service name like ssh
	Number int16
}

TcpPorts represents a TCP ports.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL