shodan

package
v1.2.0-beta Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Token   string
	BaseURL string
	Path    string
	Client  *http.Client
	IPv4    string
}

Client represents Shodan HTTP client

func NewClient

func NewClient(client *http.Client, ipv4, token string) *Client

NewClient creates new Shodan client

func (*Client) Head

func (c *Client) Head(website string) (map[string]interface{}, error)

func (*Client) HostInfo

func (c *Client) HostInfo(app *config.AppConfig) (Response, error)

type ErrorHandler

type ErrorHandler func(*http.Response) error

type Response

type Response struct {
	RegionCode  string   `json:"region_code"`
	City        string   `json:"city"`
	Org         string   `json:"org"`
	CountryName string   `json:"country_name"`
	Asn         string   `json:"asn"`
	Isp         string   `json:"isp"`
	Ports       []int    `json:"ports"`
	Domains     []string `json:"domains"`
}

Jump to

Keyboard shortcuts

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