sources

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_PAGE_SIZE     = 30
	DEFAULT_PAGE_SIZE_MAX = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}
var (
	DefaultClient *Client
)

func NewClient

func NewClient() *Client

func (*Client) Get

func (c *Client) Get(url string, headers map[string]string) (*req.Response, error)

func (*Client) Post

func (c *Client) Post(url string, headers map[string]string, body interface{}) (*req.Response, error)

func (*Client) SetDevMode

func (c *Client) SetDevMode(devMode bool)

type Provider

type Provider interface {
	// Name returns the name of the provider
	Name() string

	// Auth checks if the provider is valid to use
	Auth(*Session) bool

	// Search the result with provider
	Search(*Query) (chan *Result, error)
}

Provider is the interface for all providers

type Query

type Query struct {
	Query         string `json:"query"`           // input query
	QuakeQuery    string `json:"quake_query"`     // input query to quake query grammar
	FofaQuery     string `json:"fofa_query"`      // input query to fofa query grammar
	HunterQuery   string `json:"hunter_query"`    // input query to hunter query grammar
	NumberOfQuery int    `json:"number_of_query"` // number of query, when use deep search mode, unlimited query number
}

Query is the struct for storing the query You can set corresponding query for different providers

type Result

type Result struct {
	IP         string
	URL        string
	Host       string
	Domain     string
	Port       int
	ICPUnit    string // ICP unit,like 北京百度网讯科技有限公
	ICPLicence string // ICP licence, like 京ICP证030173号
}

Result is a struct for storing results from providers

type Session

type Session struct {
	QuakeToken string
	FofaKey    string
	HunterKey  string
}

Session is the struct for storing the session of the providers Todo currently each provider only support one session, a list of session will support for each provider in the future

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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