fofa

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

Documentation

Index

Constants

View Source
const (
	FOFA     = "FOFA"
	BASE_URL = "https://fofa.info/api/v1/"
	AUTH_URL = "https://fofa.info/api/v1/info/my?key=%s"
)

Variables

View Source
var (
	AUTHED_SEARCH_URL = BASE_URL + "search/all?key=%s"
)

Functions

func ToFofaGrammar

func ToFofaGrammar(s string) (string, error)

Types

type FofaSearchFiled

type FofaSearchFiled struct {
	Query  string
	Size   int
	Page   int
	Fields string
	Full   string // 默认搜索一年内的数据,指定为true即可搜索全部数据
}

func NewFofaSearchFiled

func NewFofaSearchFiled(query string, pageIndex, pageSize int) *FofaSearchFiled

type FofaSearchResult

type FofaSearchResult 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"`
}

type Provider

type Provider struct {
}

func (*Provider) Auth

func (p *Provider) Auth(s *sources.Session) bool

Auth checks if the provider is valid to use

func (*Provider) Name

func (p *Provider) Name() string

Name returns the name of the provider

func (*Provider) Search

func (p *Provider) Search(query *sources.Query) (chan *sources.Result, error)

Search the result with provider

Jump to

Keyboard shortcuts

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