cli

package
v0.1.47 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NONE_Mode = iota
	Stdin_Mode
	Query_Mode
	File_Mode
	DefaultField = ""
)

Variables

View Source
var (
	FoFaXVersion = "0.1.47"
	Commit       = "unknown"
	Date         = "2023-12-21T17:14:09Z"
	Branch       = "unknown"
)
View Source
var UsageLists = []fgx{
	{
		Usage:   `fofax -q 'app="Grafana"'`,
		Comment: `搜索 fofa 语法 app="Grafana" `,
	},
	{
		Usage:   `fofax -q 'app="Grafana"' -open`,
		Comment: `搜索 fofa 语法 app="Grafana" 并用浏览器打开`,
	},
	{
		Usage:   `fofax -q 'app="Grafana"' -ffi`,
		Comment: `搜索 fofa 语法 app="Grafana" 并且输出带 schema 的数据(url)`,
	},
	{
		Usage:   `fofax -q 'app="Grafana"' -fto`,
		Comment: `搜索 fofa 语法 app="Grafana" 并且输出 url 和 tilte`,
	},
	{
		Usage:   `echo 'app="APACHE-Solr"' | fofax`,
		Comment: `搜索 fofa 语法 app="APACHE-Solr" `,
	},
	{
		Usage:   `echo 'app="APACHE-Solr"' | fofax -ec`,
		Comment: `搜索 fofa 语法 app="APACHE-Solr" 中排除中国的数据`,
	},
	{
		Usage:   `echo 'app="APACHE-Solr"' | fofax -fs 5`,
		Comment: `搜索  app="APACHE-Solr" 中的前五条数据`,
	},
	{
		Usage:   ` echo 'app="APACHE-Solr"' | fofax -fs 10 -e `,
		Comment: `搜索  app="APACHE-Solr" 中排除蜜罐的前十条数据`,
	},
	{
		Usage:   `fofax -use`,
		Comment: "打印 fofa 语法规则",
	},
	{
		Usage:   `fofax -uc https://www.baidu.com`,
		Comment: "搜索百度网站相同证书的站点",
	},
	{
		Usage:   `fofax -uc https://www.baidu.com -open`,
		Comment: "搜索百度网站相同证书的站点, 并用浏览器打开",
	},
	{
		Usage:   `fofax -iu https://www.baidu.com/favicon.ico -fs 5`,
		Comment: "搜索和百度网站相同ico的数据",
	},

	{
		Usage:   `fofax -q 'fx="google-reverse"' -fe  -open`,
		Comment: "搜索fx 中 google-reverse 并用浏览器打开, 查询时使用扩展功能必须加 -fe 参数",
	},
	{
		Usage:   `fofax -q 'fx="google-reverse"' -fe`,
		Comment: "搜索 fx 中 google-reverse, 查询时使用扩展功能必须加 -fe 参数",
	},
	{
		Usage:   `fofax -s google`,
		Comment: "搜索含有 google 的 fx 语句",
	},
	{
		Usage:   `fofax -s 'tag=fofa'`,
		Comment: "搜索 fx 中 tag 为 fofa 的语句",
	},
	{
		Usage:   `fofax -s 'tag=fofa;rulename=ism'`,
		Comment: "搜索 fx 中 tag 为 fofa, rulename 中包含 ism 的语句",
	},
}

Functions

func ParseFxOptions

func ParseFxOptions()

func PrintSingleUsage

func PrintSingleUsage()

func ShowUsage

func ShowUsage()

Types

type Options

type Options struct {
	Mode int

	FxQuery     *fx.FoFaxQuery
	Version     bool
	Use         bool
	Open        bool // 浏览器打开
	Silent      bool
	NolimitOpen bool
	// 标准输入
	Stdin   bool
	Xclient *http.Client
	// contains filtered or unexported fields
}

func ParseOptions

func ParseOptions() *Options

Jump to

Keyboard shortcuts

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