Skip to content

Commit

Permalink
add uncover engine zoomeye-spider
Browse files Browse the repository at this point in the history
  • Loading branch information
wjlin0 committed Mar 24, 2024
1 parent 5ce41ba commit 15c3f86
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 12 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


# 用法
Expand All @@ -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]
Expand All @@ -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 启用打开搜索引擎
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion pkg/runner/banner.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (
/ .__/\_,_/ \__//_//_//___/ \__/ \_,_//_//_/
/_/
`
Version = `2.0.4`
Version = `2.0.5`
userName = "wjlin0"
pathScanMatchRepoName = "pathScan-match"
pathScanRepoName = "pathScan"
Expand Down
9 changes: 9 additions & 0 deletions pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
12 changes: 12 additions & 0 deletions pkg/runner/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}

Expand Down
6 changes: 5 additions & 1 deletion pkg/scanner/uncover.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 15c3f86

Please sign in to comment.