From 15c3f8677c928cc6bd8bc5bf8dbe62edbbfcde48 Mon Sep 17 00:00:00 2001 From: wjlin0 Date: Fri, 22 Mar 2024 16:12:12 +0800 Subject: [PATCH] add uncover engine zoomeye-spider --- README.md | 14 +++++++------- go.mod | 2 +- go.sum | 4 ++-- pkg/runner/banner.go | 2 +- pkg/runner/runner.go | 9 +++++++++ pkg/runner/validate.go | 12 ++++++++++++ pkg/scanner/uncover.go | 6 +++++- 7 files changed, 37 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 7689062..dbead33 100644 --- a/README.md +++ b/README.md @@ -27,15 +27,15 @@ go install -v github.com/wjlin0/pathScan/v2/cmd/pathScan@latest ``` 下载准备运行的[二进制文件](https://github.com/wjlin0/pathScan/releases/latest) -- [macOS-arm64](https://github.com/wjlin0/pathScan/releases/download/v2.0.4/pathScan_2.0.4_macOS_arm64.zip) +- [macOS-arm64](https://github.com/wjlin0/pathScan/releases/download/v2.0.5/pathScan_2.0.5_macOS_arm64.zip) -- [macOS-amd64](https://github.com/wjlin0/pathScan/releases/download/v2.0.4/pathScan_2.0.4_macOS_amd64.zip) +- [macOS-amd64](https://github.com/wjlin0/pathScan/releases/download/v2.0.5/pathScan_2.0.5_macOS_amd64.zip) -- [linux-amd64](https://github.com/wjlin0/pathScan/releases/download/v2.0.4/pathScan_2.0.4_linux_amd64.zip) +- [linux-amd64](https://github.com/wjlin0/pathScan/releases/download/v2.0.5/pathScan_2.0.5_linux_amd64.zip) -- [windows-amd64](https://github.com/wjlin0/pathScan/releases/download/v2.0.4/pathScan_2.0.4_windows_amd64.zip) +- [windows-amd64](https://github.com/wjlin0/pathScan/releases/download/v2.0.5/pathScan_2.0.5_windows_amd64.zip) -- [windows-386](https://github.com/wjlin0/pathScan/releases/download/v2.0.4/pathScan_2.0.4_windows_386.zip) +- [windows-386](https://github.com/wjlin0/pathScan/releases/download/v2.0.5/pathScan_2.0.5_windows_386.zip) # 用法 @@ -44,7 +44,7 @@ go install -v github.com/wjlin0/pathScan/v2/cmd/pathScan@latest pathScan -h ``` ```yaml -pathScan 2.0.4 Go 扫描、信息收集工具 +pathScan 2.0.5 Go 扫描、信息收集工具 Usage: pathScan [flags] @@ -65,7 +65,7 @@ Flags: -sq, -sub-query string[] 需要收集的域名 (支持从文件中录入 -sq /tmp/sub-query.txt) -sl, -sub-limit int 每个搜索引擎返回的至少不超过数 (default 1000) -so, -sub-output string 子域名搜索结果保存 支持csv格式输出 - -se, -sub-engine string[] 子域名搜索引擎 [shodan censys fofa quake hunter zoomeye netlas criminalip publicwww hunterhow binaryedge github fullhunt zone0 shodan-idb anubis-sitedossier-spider fofa-spider bing-spider chinaz-spider google-spider ip138-spider qianxun-spider rapiddns-spider baidu-spider yahoo-spider] (default all) + -se, -sub-engine string[] 子域名搜索引擎 [shodan censys fofa quake hunter zoomeye netlas criminalip publicwww hunterhow binaryedge github fullhunt zone0 shodan-idb anubis-sitedossier-spider fofa-spider bing-spider chinaz-spider google-spider ip138-spider qianxun-spider rapiddns-spider baidu-spider yahoo-spider zoomeye-spider] (default all) 引擎搜索模式: -uc, -uncover 启用打开搜索引擎 diff --git a/go.mod b/go.mod index 9eef68f..4f6b2d0 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/projectdiscovery/retryablehttp-go v1.0.52 github.com/projectdiscovery/utils v0.0.84 github.com/remeh/sizedwaitgroup v1.0.0 - github.com/wjlin0/uncover v1.1.1 + github.com/wjlin0/uncover v1.1.2 github.com/wjlin0/utils v0.0.8 golang.org/x/net v0.22.0 golang.org/x/text v0.14.0 diff --git a/go.sum b/go.sum index 1bbe5cf..0c7c918 100644 --- a/go.sum +++ b/go.sum @@ -399,8 +399,8 @@ github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyC github.com/weppos/publicsuffix-go v0.13.0/go.mod h1:z3LCPQ38eedDQSwmsSRW4Y7t2L8Ln16JPQ02lHAdn5k= github.com/weppos/publicsuffix-go v0.30.2-0.20230730094716-a20f9abcc222 h1:h2JizvZl9aIj6za9S5AyrkU+OzIS4CetQthH/ejO+lg= github.com/weppos/publicsuffix-go v0.30.2-0.20230730094716-a20f9abcc222/go.mod h1:s41lQh6dIsDWIC1OWh7ChWJXLH0zkJ9KHZVqA7vHyuQ= -github.com/wjlin0/uncover v1.1.1 h1:wSrY13ZNxsTCnkYIhrAzG0sOIs1hpYJypV2IWD56TdM= -github.com/wjlin0/uncover v1.1.1/go.mod h1:Q7B5c6oL8+RUxVf+7cSI1OKKTQcjHtQWYrHWnjzct6E= +github.com/wjlin0/uncover v1.1.2 h1:g/K1dwVB/PT/IB80DwuUSU0mGqOOHtU+FbV4r8Uq41M= +github.com/wjlin0/uncover v1.1.2/go.mod h1:z2z3uUBefmjOcIppBoN3mCLDNhN4PUECwbQOELNwg00= github.com/wjlin0/utils v0.0.8 h1:xy9xzycwgeg7PONmBmU2+h2LuSnWqd23n36BNjCCECQ= github.com/wjlin0/utils v0.0.8/go.mod h1:MX73+JHTNwbTxx7RvWy/NFEeo8O0xFWa5QhY5ds3tnQ= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= diff --git a/pkg/runner/banner.go b/pkg/runner/banner.go index 27edd00..12920e7 100644 --- a/pkg/runner/banner.go +++ b/pkg/runner/banner.go @@ -15,7 +15,7 @@ const ( / .__/\_,_/ \__//_//_//___/ \__/ \_,_//_//_/ /_/ ` - Version = `2.0.4` + Version = `2.0.5` userName = "wjlin0" pathScanMatchRepoName = "pathScan-match" pathScanRepoName = "pathScan" diff --git a/pkg/runner/runner.go b/pkg/runner/runner.go index 21215fc..9919a64 100644 --- a/pkg/runner/runner.go +++ b/pkg/runner/runner.go @@ -240,6 +240,15 @@ func (r *Runner) displayRunEnumeration() { if !opts.DisableScanMatch { gologger.Info().Msgf("PathScan-match templates loaded for current scan: %d", r.scanner.CountOperators()) } + // 输出 uncoverEngine uncoverQuery + if opts.Uncover { + gologger.Info().Msgf("Uncover engine: %s", opts.UncoverEngine) + gologger.Info().Msgf("Uncover query: %s", opts.UncoverQuery) + } + if opts.Subdomain { + gologger.Info().Msgf("Subdomain engine: %s", opts.SubdomainEngine) + gologger.Info().Msgf("Subdomain query: %s", opts.SubdomainQuery) + } } func (r *Runner) showNumberOfRequests() { diff --git a/pkg/runner/validate.go b/pkg/runner/validate.go index 7247cb3..c613fa6 100644 --- a/pkg/runner/validate.go +++ b/pkg/runner/validate.go @@ -11,6 +11,7 @@ import ( stringsutil "github.com/projectdiscovery/utils/strings" "github.com/wjlin0/pathScan/v2/pkg/types" "github.com/wjlin0/pathScan/v2/pkg/util" + "github.com/wjlin0/uncover" proxyutils "github.com/wjlin0/utils/proxy" "net/url" "os" @@ -98,6 +99,17 @@ func ValidateRunEnumeration(options *types.Options) error { } } + if options.Uncover { + if sliceutil.ContainsItems(uncover.DestructAgents(), options.UncoverEngine) { + return errors.New("uncover can't use only destruct agents") + } + } + if options.Subdomain { + if sliceutil.ContainsItems(uncover.DestructAgents(), options.SubdomainEngine) { + return errors.New("uncover can't use destruct agents") + } + } + return nil } diff --git a/pkg/scanner/uncover.go b/pkg/scanner/uncover.go index 804122f..9f9cd62 100644 --- a/pkg/scanner/uncover.go +++ b/pkg/scanner/uncover.go @@ -5,7 +5,9 @@ import ( "fmt" "github.com/projectdiscovery/gologger" folderutil "github.com/projectdiscovery/utils/folder" + sliceutil "github.com/projectdiscovery/utils/slice" stringsutil "github.com/projectdiscovery/utils/strings" + "github.com/wjlin0/uncover" "github.com/wjlin0/uncover/sources" "path/filepath" "strings" @@ -128,7 +130,9 @@ func (scanner *Scanner) rebaseUncover() { if service.Keys.BinaryedgeToken == "" { continue } - + } + if sliceutil.Contains(uncover.DestructAgents(), agent.Name()) { + continue } agents = append(agents, agent)