sources

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRateLimits = map[string]*ratelimit.Options{
	"shodan":  {Key: "shodan", MaxCount: 1, Duration: time.Second},
	"fofa":    {Key: "fofa", MaxCount: 1, Duration: time.Second},
	"quake":   {Key: "quake", MaxCount: 1, Duration: time.Second},
	"hunter":  {Key: "hunter", MaxCount: 15, Duration: time.Second},
	"zoomeye": {Key: "zoomeye", MaxCount: 1, Duration: time.Second},
}

DefaultRateLimits of all/most of sources are hardcoded by default to improve performance engine is not present in default ratelimits then user given ratelimit from cli options is used

Functions

This section is empty.

Types

type Agent

type Agent interface {
	Query(*Session, string) (chan Result, error)
	Name() string
}

type IpDomain

type IpDomain struct {
	IP     string `excel:"name:IP;"`
	Domain string `excel:"name:域名;"`
}

func IpDomainArray

func IpDomainArray(ip string, hosts []string) []IpDomain

type Req

type Req struct {
	Schema   string
	Endpoint string
	Path     string
	Method   string
	Header   map[string]string
	Query    string
	Body     string
}

func (*Req) Request

func (r *Req) Request() (*http.Request, error)

Request makes an HTTP request

type Result

type Result struct {
	IP          string   `json:"ip" excel:"name:IP;"`
	Port        string   `json:"port" excel:"name:端口;"`
	Protocol    string   `json:"protocol" excel:"name:服务;"`
	Host        []string `json:"host"`
	Url         string   `json:"url" excel:"name:URL;"`
	Title       string   `json:"title" excel:"name:网站标题;"`
	Fingerprint string   `json:"fingerprint" excel:"name:指纹;"`
	Source      string   `json:"source" excel:"name:来源;"`
	Prompt      string   `json:"prompt" excel:"name:查询语句;"`
	LastUpdate  string   `json:"lastupdate" excel:"name:更新时间;"`
	Timestamp   int64    `json:"timestamp"`
	Error       error    `json:"-"`
}

func (*Result) IpPort

func (r *Result) IpPort() string

func (*Result) JSON

func (r *Result) JSON() string

func (*Result) PrettyPrint

func (r *Result) PrettyPrint() string

type ResultSet

type ResultSet []Result

func NewResultSet

func NewResultSet(a ...Result) *ResultSet

func (*ResultSet) Add

func (this *ResultSet) Add(n ...Result)

func (*ResultSet) AsArray

func (this *ResultSet) AsArray() []Result

type Session

type Session struct {
	Client     *http.Client
	RateLimits *ratelimit.MultiLimiter
}

Session handles session agent sessions

func NewSession

func NewSession(opts *options.Options) (*Session, error)

func (*Session) Do

func (s *Session) Do(request *http.Request, source string) (*http.Response, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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