plugins

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: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FofaFields = "ip,port,base_protocol,protocol,domain,host,title,product,lastupdatetime"
	FofaSize   = 10000
)
View Source
const (
	HunterSize = 100
)
View Source
const (
	QuakeSize = 500
)
View Source
const (
	ShodanSize = 100
)

Variables

View Source
var Plugins = make(map[string]Plugin)

Functions

This section is empty.

Types

type Fofa

type Fofa struct {
	// contains filtered or unexported fields
}

func (Fofa) Name

func (f Fofa) Name() string

func (Fofa) Query

func (f Fofa) Query(session *sources.Session, query interface{}) (chan sources.Result, error)

type FofaResponse

type FofaResponse struct {
	Error   bool       `json:"error"`
	ErrMsg  string     `json:"errmsg"`
	Mode    string     `json:"mode"`
	Page    int        `json:"page"`
	Query   string     `json:"query"`
	Results [][]string `json:"results"`
	Size    int        `json:"size"`
}

FofaResponse contains the fofa response

type Hunter

type Hunter struct {
	// contains filtered or unexported fields
}

func (Hunter) Name

func (f Hunter) Name() string

func (Hunter) Query

func (f Hunter) Query(session *sources.Session, query interface{}) (chan sources.Result, error)

type HunterResponse

type HunterResponse struct {
	Code int `json:"code"`
	Data struct {
		AccountType string `json:"account_type"`
		Total       int    `json:"total"`
		Time        int    `json:"time"`
		Arr         []struct {
			IP           string `json:"ip"`
			Port         int    `json:"port"`
			Domain       string `json:"domain"`
			BaseProtocol string `json:"base_protocol"`
			Protocol     string `json:"protocol"`
			UpdatedAt    string `json:"updated_at"`
			Url          string `json:"url"`
			WebTitle     string `json:"web_title"`
		} `json:"arr"`
		ConsumeQuota string `json:"consume_quota"`
		RestQuota    string `json:"rest_quota"`
	} `json:"data"`
	Msg string `json:"message"`
}

type Plugin

type Plugin interface {
	Name() string
	Query(*sources.Session, interface{}) (chan sources.Result, error)
}

type Quake

type Quake struct {
	// contains filtered or unexported fields
}

func (Quake) Name

func (f Quake) Name() string

func (Quake) Query

func (f Quake) Query(session *sources.Session, query interface{}) (chan sources.Result, error)

type QuakeRequest

type QuakeRequest struct {
	Query       string   `json:"query"`
	Size        int      `json:"size"`
	Start       int      `json:"start"`
	IgnoreCache bool     `json:"ignore_cache"`
	Include     []string `json:"include"`
}

type QuakeResponse

type QuakeResponse struct {
	Code    interface{} `json:"code"`
	Data    interface{} `json:"data"`
	Message string      `json:"message"`
	Meta    struct {
		Pagination struct {
			Count     int `json:"count"`
			PageIndex int `json:"page_index"`
			PageSize  int `json:"page_size"`
			Total     int `json:"total"`
		} `json:"pagination"`
	} `json:"meta"`
}

type Shodan

type Shodan struct {
	// contains filtered or unexported fields
}

func (Shodan) Name

func (f Shodan) Name() string

func (Shodan) Query

func (f Shodan) Query(session *sources.Session, query interface{}) (chan sources.Result, error)

type ShodanResponse

type ShodanResponse struct {
	Total int `json:"total"`
	//Results []map[string]interface{} `json:"matches"`
	Results []struct {
		IP        string   `json:"ip_str"`
		Port      int      `json:"port"`
		Transport string   `json:"transport"`
		Hostname  []string `json:"hostname"`
		Product   string   `json:"product"`
		Http      struct {
			Host  string `json:"host"`
			Title string `json:"title"`
		}
		SSL struct {
			Chain []string `json:"chain"`
		} `json:"ssl"`
		Timestamp string `json:"timestamp"`
	} `json:"matches"`
}

Jump to

Keyboard shortcuts

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