Versions in this module Expand all Collapse all v0 v0.2.27 Dec 18, 2024 Changes in this version + type Cate struct + Filters []string + Name string + type Config struct + Categories []Cate + CustomFields []CusFields + func LoadConfig(configFile string) (*Config, error) + type CusFields struct + Fields string + Name string type WorkerBrowser + Retry int v0.2.26 Dec 5, 2024 Changes in this version + const NoHostWithFixURL + func Category(configFile, inputFile string, options ...CategoryOptions) (string, error) + func ExtractIconFromHtml(data []byte) string + func FofaURLFromEnv() string + func IconHash(iconUrl string) (hash string, err error) + func NewFixUrl(rowURL string) string + func NewRequestConfig(fullURL string) *http.Client + type AccountInfo struct + ErrMsg string + Error bool + FCoin int + FofaPoint int64 + IsVIP bool + RemainApiData int + RemainApiQuery int + VIPLevel VipLevel + func (ai AccountInfo) String() string + type CategoryOptions struct + RelationFile string + SourceField string + TargetField string + Unique bool + type Client struct + APIVersion string + Account AccountInfo + DeductMode DeductMode + Email string + Key string + Server string + func NewClient(options ...ClientOption) (*Client, error) + func (c *Client) AccountInfo() (ac AccountInfo, err error) + func (c *Client) DumpSearch(query string, allSize int, batchSize int, fields []string, ...) (err error) + func (c *Client) Fetch(apiURI string, params map[string]string, v interface{}) (err error) + func (c *Client) GetContext() context.Context + func (c *Client) HostSearch(query string, size int, fields []string, options ...SearchOptions) (res [][]string, err error) + func (c *Client) HostSize(query string) (count int, err error) + func (c *Client) HostStats(host string) (data HostStatsData, err error) + func (c *Client) SetContext(ctx context.Context) + func (c *Client) Stats(query string, size int, fields []string) (res []StatsObject, err error) + func (c *Client) URL() string + func (c *Client) Update(configURL string) error + type ClientOption func(c *Client) error + func WithAccountDebug(v bool) ClientOption + func WithLogger(logger *logrus.Logger) ClientOption + func WithOnResults(onResults func(results [][]string)) ClientOption + func WithURL(configURL string) ClientOption + type DataCategory struct + Record []string + Type string + type DeductMode int + const DeductModeFCoin + const DeductModeFree + func ParseDeductMode(v string) DeductMode + type HostResults struct + Errmsg string + Error bool + Mode string + Next string + Page int + Query string + Results interface{} + Size int + type HostStatsData struct + ASN int + Categories []string + Country string + CountryCode string + Errmsg string + Error bool + Host string + IP string + ORG string + Ports []int + Products []string + Protocols []string + UpdateTime string + type HttpResponse struct + IsActive bool + StatusCode string + func DoHttpCheck(rowURL string, retry int) HttpResponse + type SearchOptions struct + CheckActive int + DeWildcard int + DedupHost bool + Filter string + FixUrl bool + Full bool + UniqByIP bool + UrlPrefix string + type StatsItem struct + Count int + Name string + type StatsObject struct + Items []StatsItem + Name string + type StatsResults struct + Aggs map[string]interface{} + Distinct map[string]interface{} + Errmsg string + Error bool + LastUpdateTime string + type VipLevel int + const VipLevelAdvanced + const VipLevelEnterprise + const VipLevelEnterprise2 + const VipLevelNever + const VipLevelNone + const VipLevelNormal + const VipLevelRed + const VipLevelStudent + const VipLevelSubBuss + const VipLevelSubPersonal + const VipLevelSubPro + type WorkerBrowser struct + Url string + func NewWorkerBrowser(url string) *WorkerBrowser + func (wp *WorkerBrowser) ParseHTML(htmlStr string, tag string) string + func (wp *WorkerBrowser) Run() (response map[string]interface{}, err error)