Help us shape the future of Go! Take the 2026 Go Developer Survey

checkhost

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

README

Check-Host API Go Library

A lightweight, lightning-fast, and feature-complete Go wrapper for the Check-Host.cc API. Full API reference: check-host.cc/docs. A bundled OpenAPI 3.0.3 / Swagger spec ships at swagger.yaml for codegen / offline browsing.

Seamlessly integrate global network diagnostics into your backend. Perform remote Ping, MTR, DNS, HTTP, TCP and UDP checks from multiple worldwide locations—straight from your Go application. Checks from 60+ locations worldwide.

Features

  • Zero Dependencies: Built purely on the native Go net/http standard library. Zero package bloat.
  • Bulletproof Payloads: Strictly utilizes POST requests for all active monitoring endpoints. This completely eliminates nasty URL-encoding issues with complex hostnames or custom UDP payloads.
  • Modern & Clean: Written idiomatically with clear configuration structures and typed responses.
  • Header-Based Authentication: Configure your token once during client initialization; the SDK attaches it as an Authorization: Bearer header to every request. The token never lands in a URL or a request body.
  • Network Intelligence & Fullscan: Passive IP / ASN / prefix / domain / certificate / port / software lookups, plus deep on-demand scans with a built-in polling helper.

Requirements

  • Go: 1.18+

Installation

Install the package directly using go get:

go get github.com/Check-Host/go-lib

Quickstart

package main

import (
	"fmt"
	"log"
	
	checkhost "github.com/Check-Host/go-lib"
)

func main() {
	// Initialize the client. The API token is optional.
	// Without a token, standard public rate limits apply.
	// client := checkhost.NewClient("YOUR_API_TOKEN_UUID")
	client := checkhost.NewClient("")

	// Example: Retrieve all current nodes
	locations, err := client.Locations()
	if err != nil {
		log.Fatalf("Error: %v", err)
	}
	
	fmt.Printf("Successfully retrieved %d global nodes.\n", len(locations))
}

Authentication

The token is sent as an Authorization: Bearer <token> header on every request — GET, POST and binary alike. It is never placed in the query string or the request body, so it does not leak into access logs, referrer headers or browser history.

client := checkhost.NewClient("YOUR_API_TOKEN_UUID")

// Or set it on an existing client
client.Token = "YOUR_API_TOKEN_UUID"

Migrating from v1.0: the token used to travel in the JSON body as an apikey field. That field is deprecated server-side. NewClient is positional and unchanged, so checkhost.NewClient(yourToken) keeps working as-is. The CheckHost.APIKey struct field still authenticates but is deprecated in favour of CheckHost.Token, which takes precedence when both are set.


Complete API Reference & Examples

This library supports both minimal invocations and detailed, options-rich requests for every endpoint. All failures (network issues, API errors, rate limits) return standard error types encapsulating the actual check-host API response message.

Common Options Used in Examples

Many endpoints accept a specific Request struct containing optional configuration fields:

  • Region: Array of Nodes or ISO Country Codes (e.g. []string{"DE", "NL"}) or Continents (e.g. []string{"EU"}).
  • RepeatChecks: Number of repeated probes to perform per node for higher accuracy (Live Check).
  • Timeout: Connection timeout threshold in seconds. Supported by methods where a timeout is applicable (e.g., HTTP, TCP).

Note: In Go, passing nil as the configuration object will automatically invoke the minimum configuration defaults required by the Check-Host API.


Information & Utilities
Get My IP

Returns the requesting client's public IPv4 or IPv6 address.

ip, err := client.MyIP()
Get Locations

Fetches a dynamic list of all currently active monitoring nodes across the globe.

nodes, err := client.Locations()
Host Info (GeoIP/ASN)

Retrieves detailed geolocation data, ISP information, and ASN details.

// Minimal Example
info, err := client.Info("check-host.cc")
WHOIS Lookup

Performs a WHOIS registry lookup.

// Minimal Example
whois, err := client.Whois("check-host.cc")

Active Monitoring (POST Tasks)

Monitoring endpoints initiate tasks asynchronously and return a CheckCreated object containing an UUID. Use the Report() method (documented below) to fetch the actual results.

Ping

Dispatches ICMP echo requests to the target from global nodes.

// Minimal Example
pingMin, err := client.Ping("8.8.8.8", nil)

// Max Example (With options)
pingMax, err := client.Ping("8.8.8.8", &checkhost.MonitoringRequest{
	Region:       []string{"DE", "NL"},
	RepeatChecks: 5,
	Timeout:      5,
})
DNS

Queries global nameservers for specific DNS records.

// Minimal Example
dnsMin, err := client.DNS("check-host.cc", nil)

// Max Example (With options - TXT Record)
dnsMax, err := client.DNS("check-host.cc", &checkhost.DNSTargetRequest{
	QueryMethod: "TXT", // A, AAAA, MX, TXT, SRV, etc.
	Region:      []string{"US", "DE"},
})
TCP

Attempts to establish a 3-way TCP handshake on a specific destination port.

// Minimal Example (Target, Port)
tcpMin, err := client.TCP("1.1.1.1", 443, nil)

// Max Example (With options)
tcpMax, err := client.TCP("1.1.1.1", 80, &checkhost.TCPMonitoringRequest{
	MonitoringRequest: checkhost.MonitoringRequest{
		Region:       []string{"DE", "NL"},
		RepeatChecks: 3,
		Timeout:      10,
	},
})
UDP

Sends UDP packets to a specified target and port.

// Minimal Example (Target, Port)
udpMin, err := client.UDP("1.1.1.1", 53, nil)

// Max Example (With custom hex payload and options)
udpMax, err := client.UDP("1.1.1.1", 123, &checkhost.UDPMonitoringRequest{
	Payload: "0b", // NTP Request Hex
	MonitoringRequest: checkhost.MonitoringRequest{
		Region:       []string{"EU"},
		RepeatChecks: 2,
		Timeout:      5,
	},
})
HTTP

Executes an HTTP/HTTPS request to the target to measure TTFB and latency.

// Minimal Example
httpMin, err := client.Http("https://check-host.cc", nil)

// Max Example (With options)
httpMax, err := client.Http("https://check-host.cc", &checkhost.MonitoringRequest{
	Region:       []string{"US", "DE"},
	RepeatChecks: 3,
	Timeout:      10,
})
MTR

Initiates an MTR (My Traceroute) diagnostic.

// Minimal Example
mtrMin, err := client.MTR("1.1.1.1", nil)

// Max Example (With protocols, IP forced, and options)
mtrMax, err := client.MTR("1.1.1.1", &checkhost.MTRMonitoringRequest{
	RepeatChecks:   15,
	ForceIPVersion: 4,     // 4 or 6
	ForceProtocol:  "TCP", // default is ICMP
	Region:         []string{"DE", "US"},
})

Fetching Results
Report

Fetches the compiled report and real-time statuses from a previously initiated monitoring check (Ping, TCP, HTTP, etc.) using its unique UUID. Wait 1-2 seconds after starting a check before polling. Longer checks with multiple repeats take one check per second and can be requested multiple times.

// The check UUID is returned by any monitoring method above
taskUuid := "c0b4b0e3-aed7-4ae2-9f53-7bac879697cb"

// Fetch the result payload
report, err := client.Report(taskUuid)

Network Intelligence

Passive lookups against the dataset behind the entity pages — no check is dispatched to the monitoring nodes, so results come back immediately. Each response has a typed envelope plus a Data map (IntelData), which stays untyped because the key set differs per endpoint and sections we hold no data for come back empty or null.

IP Profile

Reverse DNS, open ports and banners, TLS certificates, BGP/ASN attribution, GeoIP, tech-stack, co-hosted domains, origin-leak candidates, threat-intel matches and honeypot activity.

intel, err := client.IPIntel("1.1.1.1")
if bgp, ok := intel.Data["bgp"].(map[string]interface{}); ok {
	fmt.Println(bgp["as_name"], bgp["rpki_status"])
}

Honeypot passwords are never returned in cleartext — entries expose only password_captured (bool) and password_len.

ASN Profile

Prefix counts, announced IP totals, peers / providers / customers, IXP memberships, RPKI coverage, GeoIP footprint and hosted-domain summaries. Accepts "13335" or "AS13335".

intel, err := client.ASNIntel("AS13335")
fmt.Println(intel.ASN, intel.ASName, intel.Data["prefix_count"])
Prefix, Domain and Certificate
prefix, err := client.PrefixIntel("1.1.1.0", 24)
domain, err := client.DomainIntel("check-host.cc")
cert, err := client.CertIntel("3a1b8f0c…9f90") // 64-char hex fingerprint

fmt.Println(prefix.CIDR, prefix.AnycastLabel)
fmt.Println(domain.Data["subdomains"])
fmt.Println(cert.Data["served_by"])
Port and Software Exposure
port, err := client.PortIntel(443)
fmt.Println(port.WellKnown, port.Data["open_ips"])

nginx, err := client.SoftwareIntel("nginx", "")         // all versions
pinned, err := client.SoftwareIntel("nginx", "1.24.0")  // one version

Fullscan

A deep, on-demand multi-stage scan (ports + banners + TLS + DNS + threat-intel) of an IP, CIDR, domain or ASN. Asynchronous: submit, poll, then read the results. Budget minutes, not seconds.

job, err := client.Fullscan("check-host.cc", checkhost.ScopeDeep)
if err != nil {
	log.Fatal(err)
}
fmt.Println(job.UUID, job.Status) // ... pending

// Block until the job reaches a terminal status (complete/partial/failed).
// On timeout you get the last observed job alongside the error.
finished, err := client.WaitForFullscan(job.UUID, 5*time.Second, 5*time.Minute)
fmt.Printf("%s %.0f%%\n", finished.Status, finished.Progress()*100)

results, err := client.FullscanResults(job.UUID)
for _, entry := range results.Data.OpenPorts {
	fmt.Println(entry["port"], entry["service"])
}

Scopes: checkhost.ScopeBasic (top-100 ports + banner), checkhost.ScopeDeep (default — full port range, TLS, body and threat-intel), checkhost.ScopeFull (deep plus subdomain enumeration; domains only). Passing "" selects ScopeDeep.

Anonymous CIDR submissions are capped at /24 (v4) and /120 (v6); an API token raises that to /20 and /112.

Before dispatching a scan, check whether a recent one already exists:

scans, err := client.RecentScans("check-host.cc")
for _, prior := range scans.RecentScans {
	if prior.IsFinished() {
		results, err := client.FullscanResults(prior.UUID)
		break
	}
}

FullscanJob exposes IsFinished() (terminal status) and Progress() (SubjobsDone / SubjobsTotal, clamped to [0, 1]).


API surface

Method Endpoint
MyIP() GET /myip
MyInfo() GET /myinfo
Locations() GET /locations
Info(target) POST /info
Whois(target) POST /whois
Ping(target, opts) POST /ping
DNS(target, opts) POST /dns
TCP(target, port, opts) POST /tcp
UDP(target, port, opts) POST /udp
Http(target, opts) POST /http
MTR(target, opts) POST /mtr
Report(uuid) GET /report/{uuid}
OgImage(uuid) GET /report/{uuid}/og-image
CountryMap(uuid, format, res) GET /report/{uuid}/country-map
IPIntel(ip) GET /ip/{ip}
ASNIntel(asn) GET /as/{asn}
PrefixIntel(net, mask) GET /prefix/{net}/{mask}
DomainIntel(domain) GET /domain/{domain}
CertIntel(sha256) GET /cert/{sha256}
PortIntel(port) GET /port/{port}
SoftwareIntel(name, version) GET /software/{name}[/{version}]
RecentScans(target) GET /scan/{target}
Fullscan(target, scope) POST /fullscan
FullscanStatus(uuid) GET /fullscan/{uuid}
FullscanResults(uuid) GET /fullscan/{uuid}/results
WaitForFullscan(uuid, interval, maxWait) polls GET /fullscan/{uuid}

Development

go test -short ./...   # offline unit tests (httptest server, no network)
go test ./...          # adds the live smoke tests against the production API

License

ISC License

Documentation

Index

Constants

View Source
const (
	// ScopeBasic scans the top-100 ports and grabs a banner.
	ScopeBasic = "basic"
	// ScopeDeep scans the full port range with TLS, body fetch and
	// threat-intel. This is the default.
	ScopeDeep = "deep"
	// ScopeFull is ScopeDeep plus subdomain enumeration (domains only).
	ScopeFull = "full"
)

FullscanScope values accepted by Fullscan.

View Source
const (
	DefaultBaseURL = "https://api.check-host.cc"
)

Variables

View Source
var (
	ErrRateLimit   = errors.New("rate limit reached, please provide an API key or slow down your requests")
	ErrBadRequest  = errors.New("problem with your input parameters, please check your payload")
	ErrServerError = errors.New("internal server error, please try again later")
)

CheckHostException mapped as a generic Go error.

Functions

This section is empty.

Types

type ASNInfo

type ASNInfo struct {
	ASN         string `json:"asn"`
	Route       string `json:"route"`
	Netname     string `json:"netname"`
	Name        string `json:"name"`
	CountryCode string `json:"countryCode"`
	Domain      string `json:"domain"`
	Type        string `json:"type"`
	RIR         string `json:"rir"`
}

ASNInfo is the BGP/RIR attribution block of an InfoResponse.

type ASNIntel

type ASNIntel struct {
	Success bool      `json:"success"`
	ASN     int       `json:"asn"`
	ASName  string    `json:"as_name"`
	Data    IntelData `json:"data"`
}

ASNIntel is the response of GET /as/{asn}.

type Abuse

type Abuse struct {
	Address     string `json:"address"`
	CountryCode string `json:"countryCode"`
	Email       string `json:"email"`
	Name        string `json:"name"`
	Network     string `json:"network"`
	Phone       string `json:"phone"`
}

Abuse is the network's abuse contact.

type CertIntel

type CertIntel struct {
	Success bool      `json:"success"`
	SHA256  string    `json:"sha256"`
	Data    IntelData `json:"data"`
}

CertIntel is the response of GET /cert/{sha256}.

type CheckCreated

type CheckCreated struct {
	Status       int      `json:"status"`
	Target       string   `json:"target"`
	Method       string   `json:"method"`
	RepeatChecks int      `json:"repeatchecks"`
	Region       []string `json:"region"`
	UUID         string   `json:"uuid"`
	ReportURL    string   `json:"reportURL"`
	APIURL       string   `json:"apiURL"`
	OgImageURL   string   `json:"og-imageURL"`
	Autodelete   string   `json:"autodelete"`
	Message      string   `json:"message"`
	Port         *int     `json:"port"`
	Query        *string  `json:"query"`
	Payload      *string  `json:"payload"`
	Success      bool     `json:"success"`
}

type CheckHost

type CheckHost struct {
	// Token is the API token (UUID). It is sent as an
	// "Authorization: Bearer <token>" header on every request and never
	// appears in a URL or a request body. Optional - leave it empty for
	// anonymous access under tighter per-IP rate limits.
	Token string

	// APIKey is a deprecated alias for Token, kept so code written against
	// v1.0 keeps compiling. When Token is empty, APIKey is used instead.
	//
	// Deprecated: set Token instead.
	APIKey string

	BaseURL    string
	HTTPClient *http.Client
}

func NewClient

func NewClient(token string) *CheckHost

NewClient creates a new CheckHost client. The token is optional; pass an empty string for anonymous access.

The token is sent as an "Authorization: Bearer <token>" header, so it never lands in a URL, an access log or a request body.

func (*CheckHost) ASNIntel

func (c *CheckHost) ASNIntel(asn string) (*ASNIntel, error)

ASNIntel returns the autonomous-system profile: prefix counts, announced IP totals, peers / providers / customers, IXP memberships, RPKI coverage, GeoIP footprint, top ports and hosted-domain summaries.

Accepts "13335" or "AS13335".

func (*CheckHost) CertIntel

func (c *CheckHost) CertIntel(sha256 string) (*CertIntel, error)

CertIntel returns TLS certificate intelligence by SHA-256 fingerprint: subject, issuer, SANs and validity window, every (ip, port) observed serving it, and the matching CT-log entries.

func (*CheckHost) CountryMap

func (c *CheckHost) CountryMap(uuid, format, resolution string) ([]byte, error)

CountryMap fetches the per-country world map for a check UUID.

  • format: "svg" (default) or "png".
  • resolution: "low" (800px), "med" (1200px), or "high" (2000px). Ignored when format is "svg".

Returns raw image bytes (UTF-8 text for SVG, binary for PNG).

func (*CheckHost) DNS

func (c *CheckHost) DNS(target string, options *DNSTargetRequest) (*CheckCreated, error)

DNS queries global nameservers for specific DNS records.

func (*CheckHost) DomainIntel

func (c *CheckHost) DomainIntel(domain string) (*DomainIntel, error)

DomainIntel returns domain intelligence: current DNS records plus passive-DNS history, TLS certificates, CT-log evidence, discovered subdomains, tech-stack and origin-leak (Cloudflare-bypass) candidates.

func (*CheckHost) Fullscan

func (c *CheckHost) Fullscan(target, scope string) (*FullscanJob, error)

Fullscan dispatches a scan job and returns immediately with status "pending". Poll FullscanStatus for progress, or use WaitForFullscan.

scope may be ScopeBasic, ScopeDeep or ScopeFull; an empty string means ScopeDeep.

Anonymous CIDR submissions are capped at /24 (v4) and /120 (v6); an API token raises that to /20 and /112.

func (*CheckHost) FullscanResults

func (c *CheckHost) FullscanResults(uuid string) (*FullscanResults, error)

FullscanResults fetches the findings a fullscan produced - open ports, banners, DNS records, BGP context and TLS certificates. Partial results are available while the job is still running.

func (*CheckHost) FullscanStatus

func (c *CheckHost) FullscanStatus(uuid string) (*FullscanJob, error)

FullscanStatus polls a job's progress counters. Workers bump SubjobsDone; the job moves to "complete" (all sub-jobs done) or "partial" (some failed). For the findings themselves, use FullscanResults.

func (*CheckHost) Http

func (c *CheckHost) Http(target string, options *MonitoringRequest) (*CheckCreated, error)

Http executes an HTTP/HTTPS request to the target to measure latency and statuses.

func (*CheckHost) IPIntel

func (c *CheckHost) IPIntel(ip string) (*IPIntel, error)

IPIntel returns the full intelligence profile for a single IPv4/IPv6 address: reverse DNS, open ports and banners, TLS certificates, BGP/ASN attribution, GeoIP, tech-stack, co-hosted domains, origin-leak candidates, threat-intel matches and honeypot activity.

func (*CheckHost) Info

func (c *CheckHost) Info(target string) (*MinResponseINFO, error)

Info retrieves detailed geolocation data, ISP information, and ASN details.

func (*CheckHost) Locations

func (c *CheckHost) Locations() (map[string]interface{}, error)

Locations fetches a dynamic list of all currently active monitoring nodes across the globe.

func (*CheckHost) MTR

func (c *CheckHost) MTR(target string, options *MTRMonitoringRequest) (*CheckCreated, error)

MTR initiates an MTR (My Traceroute) diagnostic.

func (*CheckHost) MyIP

func (c *CheckHost) MyIP() (string, error)

MyIP returns the requesting client's public IPv4 or IPv6 address.

func (*CheckHost) MyInfo

func (c *CheckHost) MyInfo() (*MinResponseINFO, error)

MyInfo returns geolocation + ASN data for the caller's own IP.

Same response shape as Info, resolved against the requesting client's IP. Subject to bot detection - repeated cache misses can return a 429 carrying a captcha verification URL.

func (*CheckHost) OgImage

func (c *CheckHost) OgImage(uuid string) ([]byte, error)

OgImage fetches the dynamic 1200x630 PNG status map for a previously dispatched check. Returns the raw PNG bytes.

func (*CheckHost) Ping

func (c *CheckHost) Ping(target string, options *MonitoringRequest) (*CheckCreated, error)

Ping dispatches ICMP echo requests to the target from global nodes.

func (*CheckHost) PortIntel

func (c *CheckHost) PortIntel(port int) (*PortIntel, error)

PortIntel reports how widespread a port is across the scanned Internet: open-IP count, most common banners, top countries and ASNs, tech-stack and a sample of recent hosts.

func (*CheckHost) PrefixIntel

func (c *CheckHost) PrefixIntel(net string, mask int) (*PrefixIntel, error)

PrefixIntel returns CIDR prefix intelligence: BGP origin, RPKI validity, GeoIP distribution, open-IP count, top ports and sample scanned hosts.

mask must be in the range [0, 128].

func (*CheckHost) RecentScans

func (c *CheckHost) RecentScans(target string) (*ScanRecent, error)

RecentScans lists the most-recent fullscan jobs submitted for a target (IP, CIDR, domain or ASN), so you can deep-link to a fresh report instead of triggering a redundant scan.

func (*CheckHost) Report

func (c *CheckHost) Report(uuid string) (map[string]interface{}, error)

Report fetches the compiled report and real-time statuses from a previously initiated monitoring check via UUID.

func (*CheckHost) SoftwareIntel

func (c *CheckHost) SoftwareIntel(name, version string) (*SoftwareIntel, error)

SoftwareIntel returns tech-stack intelligence for a detected technology: host counts, version breakdown, categories and a sample of hosts.

Pass a non-empty version to pin the stats to a single release.

func (*CheckHost) TCP

func (c *CheckHost) TCP(target string, port int, options *TCPMonitoringRequest) (*CheckCreated, error)

TCP attempts to establish a 3-way TCP handshake on a specific destination port.

func (*CheckHost) UDP

func (c *CheckHost) UDP(target string, port int, options *UDPMonitoringRequest) (*CheckCreated, error)

UDP sends UDP packets to a specified target and port.

func (*CheckHost) WaitForFullscan

func (c *CheckHost) WaitForFullscan(
	uuid string,
	interval, maxWait time.Duration,
) (*FullscanJob, error)

WaitForFullscan polls FullscanStatus until the job reaches a terminal status or maxWait elapses.

interval is clamped to at least one second. Passing zero for interval or maxWait selects the defaults (3s and 5min) - fullscans are far slower than node checks, so be patient.

When the deadline passes with the job still pending or running, the last observed job is returned alongside a non-nil error, so callers can inspect the partial state either way.

func (*CheckHost) Whois

func (c *CheckHost) Whois(target string) (string, error)

Whois performs a WHOIS registry lookup.

type Company

type Company struct {
	Name        string `json:"name"`
	Domain      string `json:"domain"`
	CountryCode string `json:"countryCode"`
	Type        string `json:"type"`
}

Company is the organisation the IP is registered to.

type DNSTargetRequest

type DNSTargetRequest struct {
	Target      string   `json:"target"`
	QueryMethod string   `json:"querymethod,omitempty"`
	Region      []string `json:"region,omitempty"`
}

type DomainIntel

type DomainIntel struct {
	Success bool      `json:"success"`
	Domain  string    `json:"domain"`
	Data    IntelData `json:"data"`
}

DomainIntel is the response of GET /domain/{domain}.

type FullscanJob

type FullscanJob struct {
	Success       bool   `json:"success"`
	UUID          string `json:"uuid"`
	Target        string `json:"target"`
	TargetType    string `json:"target_type"`
	Scope         string `json:"scope"`
	Status        string `json:"status"`
	SubjobsTotal  int    `json:"subjobs_total"`
	SubjobsDone   int    `json:"subjobs_done"`
	SubjobsFailed int    `json:"subjobs_failed"`
	Error         string `json:"error"`
	CreatedAt     string `json:"created_at"`
	CompletedAt   string `json:"completed_at"`
	ReportURL     string `json:"report_url"`
	APIURL        string `json:"api_url"`
}

FullscanJob is the master job row: the shape returned by Fullscan, FullscanStatus, and every entry in RecentScans.

func (FullscanJob) IsFinished

func (j FullscanJob) IsFinished() bool

IsFinished reports whether the job reached a terminal status and will not progress further.

func (FullscanJob) Progress

func (j FullscanJob) Progress() float64

Progress is the completion ratio in [0, 1]. It is 0 while the manager is still fanning out sub-jobs.

type FullscanRequest

type FullscanRequest struct {
	Target string `json:"target"`
	Scope  string `json:"scope,omitempty"`
}

FullscanRequest is the payload for POST /fullscan.

type FullscanResults

type FullscanResults struct {
	Success bool `json:"success"`
	Data    struct {
		FullscanJob
		OpenPorts  []map[string]interface{} `json:"open_ports"`
		Banners    []map[string]interface{} `json:"banners"`
		DNSRecords []map[string]interface{} `json:"dns_records"`
		BGP        map[string]interface{}   `json:"bgp"`
		TLSCerts   []map[string]interface{} `json:"tls_certs"`
	} `json:"data"`
}

FullscanResults is the response of GET /fullscan/{uuid}/results: the job row plus the findings aggregated from every sub-job.

type FullscanStatusResponse

type FullscanStatusResponse struct {
	Success bool        `json:"success"`
	Job     FullscanJob `json:"job"`
}

FullscanStatusResponse wraps the job row returned by GET /fullscan/{uuid}.

type IPIntel

type IPIntel struct {
	Success bool      `json:"success"`
	IP      string    `json:"ip"`
	Family  string    `json:"family"`
	Data    IntelData `json:"data"`
}

IPIntel is the response of GET /ip/{ip}.

Data sections: ptr, open_ports, banners, tls_certs, co_hosted_domains, external_refs, leak_candidates, titles, techs, bgp, geo, probe_findings, threat_matches, threat_count, honeypot, honeypot_recent, honeypot_actor, honeypot_ja, honeypot_classes.

Honeypot passwords are never returned in cleartext - each entry exposes only password_captured (bool) and password_len.

type IntelData

type IntelData map[string]interface{}

IntelData is the free-form section map every Intelligence endpoint returns under "data". Sections we hold no data for come back as empty arrays or null, and the exact key set differs per endpoint, so it stays untyped.

type MTRMonitoringRequest

type MTRMonitoringRequest struct {
	Target         string   `json:"target"`
	RepeatChecks   int      `json:"repeatchecks,omitempty"`
	ForceIPVersion int      `json:"forceIPversion,omitempty"`
	ForceProtocol  string   `json:"forceProtocol,omitempty"`
	Region         []string `json:"region,omitempty"`
}

type MinResponseINFO

type MinResponseINFO struct {
	IP           string  `json:"ip"`
	Reverse      string  `json:"reverse"`
	Country      string  `json:"country"`
	CountryCode  string  `json:"countryCode"`
	IsEu         bool    `json:"isEu"`
	City         string  `json:"city"`
	Continent    string  `json:"continent"`
	Latitude     float64 `json:"latitude"`
	Longitude    float64 `json:"longitude"`
	TimeZone     string  `json:"timeZone"`
	PostalCode   string  `json:"postalCode"`
	Subdivision  string  `json:"subdivision"`
	CurrencyCode string  `json:"currencyCode"`
	CallingCode  string  `json:"callingCode"`
	Privacy      Privacy `json:"privacy"`
	ASN          ASNInfo `json:"asn"`
	Company      Company `json:"company"`
	Abuse        Abuse   `json:"abuse"`
	Success      bool    `json:"success"`
}

MinResponseINFO is the geolocation / ASN / privacy / abuse record returned by Info, MyInfo and the /info endpoints.

type MonitoringRequest

type MonitoringRequest struct {
	Target       string   `json:"target"`
	RepeatChecks int      `json:"repeatchecks,omitempty"`
	Region       []string `json:"region,omitempty"`
	Timeout      int      `json:"timeout,omitempty"`
}

type PortIntel

type PortIntel struct {
	Success   bool      `json:"success"`
	Port      int       `json:"port"`
	WellKnown string    `json:"well_known"`
	Data      IntelData `json:"data"`
}

PortIntel is the response of GET /port/{port}.

type PrefixIntel

type PrefixIntel struct {
	Success      bool      `json:"success"`
	CIDR         string    `json:"cidr"`
	Net          string    `json:"net"`
	Mask         int       `json:"mask"`
	Family       string    `json:"family"`
	AnycastLabel string    `json:"anycast_label"`
	Data         IntelData `json:"data"`
}

PrefixIntel is the response of GET /prefix/{net}/{mask}.

type Privacy

type Privacy struct {
	IsAbuser      bool `json:"isAbuser"`
	IsAnonymous   bool `json:"isAnonymous"`
	IsBogon       bool `json:"isBogon"`
	IsHosting     bool `json:"isHosting"`
	IsIcloudRelay bool `json:"isIcloudRelay"`
	IsProxy       bool `json:"isProxy"`
	IsTor         bool `json:"isTor"`
	IsVpn         bool `json:"isVpn"`
}

Privacy flags an IP as belonging to a VPN, proxy, Tor exit, hosting provider and so on.

type Report

type Report struct {
	Nodes map[string]interface{}
}

Result mapping generic report data. Real world results return dicts mapped by Node name.

type ScanRecent

type ScanRecent struct {
	Success     bool          `json:"success"`
	Target      string        `json:"target"`
	RecentScans []FullscanJob `json:"recent_scans"`
}

ScanRecent is the response of GET /scan/{target}.

type SoftwareIntel

type SoftwareIntel struct {
	Success bool      `json:"success"`
	Name    string    `json:"name"`
	Version string    `json:"version"`
	Data    IntelData `json:"data"`
}

SoftwareIntel is the response of GET /software/{name}[/{version}].

type TCPMonitoringRequest

type TCPMonitoringRequest struct {
	MonitoringRequest
	Port int `json:"port"`
}

type TargetRequest

type TargetRequest struct {
	Target string `json:"target"`
}

type UDPMonitoringRequest

type UDPMonitoringRequest struct {
	MonitoringRequest
	Port    int    `json:"port"`
	Payload string `json:"payload,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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