Skip to content

Commit

Permalink
remove naabu, use masscan and nmap
Browse files Browse the repository at this point in the history
  • Loading branch information
yhy0 committed Apr 12, 2024
1 parent b64c99f commit a31bede
Show file tree
Hide file tree
Showing 186 changed files with 447 additions and 33,615 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<img alt="Release" src="https://img.shields.io/github/license/yhy0/Jie"/>
</a>
<a href="https://github.com/yhy0/Jie">
<img alt="Release" src="https://img.shields.io/badge/release-v1.0.8-brightgreen"/>
<img alt="Release" src="https://img.shields.io/badge/release-v1.1.0-brightgreen"/>
</a>
<a href="https://github.com/yhy0/Jie">
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/yhy0/Jie?color=9cf"/>
Expand Down Expand Up @@ -35,6 +35,13 @@ Analyze and scan traffic by using [active crawler mode](https://github.com/Qianl

**Please read the documentation carefully before using**

## Pre-requisites for use
- nmap
- masscan
- chromium

You should check whether the above programs exist on your machine before using them

## Active Mode

Three built-in crawler modes are available:
Expand Down
9 changes: 8 additions & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<img alt="Release" src="https://img.shields.io/github/license/yhy0/Jie"/>
</a>
<a href="https://github.com/yhy0/Jie">
<img alt="Release" src="https://img.shields.io/badge/release-v1.0.8-brightgreen"/>
<img alt="Release" src="https://img.shields.io/badge/release-v1.1.0-brightgreen"/>
</a>
<a href="https://github.com/yhy0/Jie">
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/yhy0/Jie?color=9cf"/>
Expand All @@ -31,6 +31,13 @@

**使用前请详细阅读文档**

## 前提条件
- nmap
- masscan
- chromium

检查机器上是否存在以上程序

## 主动模式

内置三种爬虫模式
Expand Down
2 changes: 1 addition & 1 deletion cmd/webscan.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ var webScanCmd = &cobra.Command{
}
go SCopilot.Init()
}

conf.Preparations()
if conf.GlobalConfig.Passive.ProxyPort != "" {
crawler.NewCrawlergo(false)
// 被动扫描
Expand Down
2 changes: 1 addition & 1 deletion conf/banner.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ var Banner = `

const Website = "https://github.com/yhy0/Jie"

const Version = "1.0.8"
const Version = "1.1.0"
49 changes: 49 additions & 0 deletions conf/envCheck.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package conf

import (
"fmt"
"github.com/go-rod/rod/lib/launcher"
"os"
"os/exec"
)

/**
@author: yhy
@since: 2024/4/12
@desc: 检查 namp、masscan、chrome 是否已经安装
**/

var ChromePath string

func Preparations() {
// 检查 nmap 是否已安装
nmapInstalled := commandExists("nmap")
if !nmapInstalled {
fmt.Println("nmap does not follow, please install")
os.Exit(1)
}

// 检查 masscan 是否已安装
masscanInstalled := commandExists("masscan")
if !masscanInstalled {
fmt.Println("nmap does not follow, please install")
os.Exit(1)
}

if GlobalConfig.WebScan.Craw == "c" {
// 检查 chromium 是否已安装
if path, exists := launcher.LookPath(); exists {
ChromePath = path
} else {
fmt.Println("chromium does not follow, please install https://www.chromium.org/getting-involved/download-chromium/")
os.Exit(1)
}
}

}

// 检查命令是否可执行
func commandExists(cmd string) bool {
_, err := exec.LookPath(cmd)
return err == nil
}
5 changes: 3 additions & 2 deletions crawler/crawlergo.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func NewCrawlergo(noHeadless bool) {
MaxTabsCount: 8,
MaxRunTime: 60 * 60 * 999,
FilterMode: "smart",
ChromiumPath: conf.ChromePath,
MaxCrawlCount: config.MaxCrawlCount,
TabRunTimeout: config.TabRunTimeout,
DomContentLoadedTimeout: config.DomContentLoadedTimeout,
Expand All @@ -63,11 +64,11 @@ func getJsonSerialize(result *crawlergo.Result) []byte {
req.Headers = _req.Headers
reqList = append(reqList, req)
}

res.ReqList = reqList
res.AllDomainList = result.AllDomainList
res.SubDomainList = result.SubDomainList

resBytes, err := json.Marshal(res)
if err != nil {
logging.Logger.Fatal("Marshal result error")
Expand Down
24 changes: 3 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/logrusorgru/aurora v2.0.3+incompatible
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/projectdiscovery/fastdialer v0.0.66 // indirect
github.com/projectdiscovery/goflags v0.1.47
github.com/projectdiscovery/goflags v0.1.47 // indirect
github.com/projectdiscovery/hmap v0.0.41 // indirect
github.com/projectdiscovery/ratelimit v0.0.36
github.com/projectdiscovery/retryablehttp-go v1.0.55
Expand All @@ -40,6 +40,7 @@ require (

require (
github.com/BishopFox/jsluice v0.0.0-20240110145140-0ddfab153e06
github.com/Ullaakut/nmap/v2 v2.2.2
github.com/andybalholm/brotli v1.1.0
github.com/charmbracelet/glamour v0.6.0
github.com/chromedp/cdproto v0.0.0-20240312231614-1e5096e63154
Expand All @@ -59,12 +60,10 @@ require (
github.com/jlaffaye/ftp v0.2.0
github.com/lib/pq v1.10.9
github.com/olekukonko/tablewriter v0.0.5
github.com/ory/dockertest/v3 v3.10.0
github.com/panjf2000/ants/v2 v2.9.1
github.com/pkg/errors v0.9.1
github.com/projectdiscovery/gologger v1.1.12
github.com/projectdiscovery/katana v1.1.0
github.com/projectdiscovery/naabu/v2 v2.3.0
github.com/projectdiscovery/nuclei/v3 v3.2.4
github.com/projectdiscovery/retryabledns v1.0.58
github.com/samber/lo v1.39.0
Expand All @@ -84,7 +83,6 @@ require (
github.com/yhy0/sizedwaitgroup v1.0.1
github.com/yl2chen/cidranger v1.0.2
golang.org/x/crypto v0.22.0
golang.org/x/term v0.19.0
)

require (
Expand All @@ -97,7 +95,6 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1 // indirect
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
github.com/DataDog/mmh3 v0.0.0-20210722141835-012dc69a9e49 // indirect
Expand All @@ -106,7 +103,6 @@ require (
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Mzack9999/gcache v0.0.0-20230410081825-519e28eab057 // indirect
github.com/Mzack9999/go-http-digest-auth-client v0.6.1-0.20220414142836-eb8883508809 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/ProtonMail/go-crypto v1.1.0-alpha.2-proton // indirect
github.com/VividCortex/ewma v1.2.0 // indirect
github.com/akrylysov/pogreb v0.10.2 // indirect
Expand Down Expand Up @@ -146,7 +142,6 @@ require (
github.com/bluele/gcache v0.0.2 // indirect
github.com/bytedance/sonic v1.11.3 // indirect
github.com/caddyserver/certmagic v0.20.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cheggaaa/pb/v3 v3.1.5 // indirect
Expand All @@ -157,7 +152,6 @@ require (
github.com/cloudflare/cfssl v1.6.5 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/cnf/structhash v0.0.0-20201127153200-e1b16c1ebc08 // indirect
github.com/containerd/continuity v0.4.2 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/davidmz/go-pageant v1.0.2 // indirect
Expand All @@ -167,8 +161,6 @@ require (
github.com/ditashi/jsbeautifier-go v0.0.0-20141206144643-2520a8026a9c // indirect
github.com/dlclark/regexp2 v1.11.0 // indirect
github.com/docker/cli v24.0.7+incompatible // indirect
github.com/docker/docker v25.0.2+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dop251/goja v0.0.0-20240220182346-e401ed450204 // indirect
github.com/dop251/goja_nodejs v0.0.0-20240221231712-27eeffc9c235 // indirect
Expand Down Expand Up @@ -202,7 +194,6 @@ require (
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.3.2 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
Expand All @@ -211,9 +202,7 @@ require (
github.com/google/certificate-transparency-go v1.1.8 // indirect
github.com/google/go-github/v30 v30.1.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gopacket v1.1.19 // indirect
github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/gorilla/css v1.0.1 // indirect
github.com/h2non/filetype v1.1.3 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
Expand Down Expand Up @@ -282,17 +271,14 @@ require (
github.com/minio/selfupdate v0.6.1-0.20230907112617-f11e74f84ca7 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/muesli/termenv v0.15.2 // indirect
github.com/nwaples/rardecode v1.1.3 // indirect
github.com/onsi/ginkgo/v2 v2.17.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
github.com/opencontainers/runc v1.1.12 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/pelletier/go-toml/v2 v2.2.0 // indirect
github.com/perimeterx/marshmallow v1.1.5 // indirect
Expand All @@ -308,7 +294,6 @@ require (
github.com/projectdiscovery/blackrock v0.0.1 // indirect
github.com/projectdiscovery/cdncheck v1.0.9 // indirect
github.com/projectdiscovery/clistats v0.0.20 // indirect
github.com/projectdiscovery/dnsx v1.2.1 // indirect
github.com/projectdiscovery/dsl v0.0.51 // indirect
github.com/projectdiscovery/fasttemplate v0.0.2 // indirect
github.com/projectdiscovery/freeport v0.0.5 // indirect
Expand All @@ -317,7 +302,6 @@ require (
github.com/projectdiscovery/gozero v0.0.2 // indirect
github.com/projectdiscovery/httpx v1.6.0 // indirect
github.com/projectdiscovery/interactsh v1.1.9 // indirect
github.com/projectdiscovery/ipranger v0.0.41 // indirect
github.com/projectdiscovery/ldapserver v1.0.2-0.20240219154113-dcc758ebc0cb // indirect
github.com/projectdiscovery/machineid v0.0.0-20240226150047-2e2c51e35983 // indirect
github.com/projectdiscovery/mapcidr v1.1.34 // indirect
Expand Down Expand Up @@ -373,9 +357,6 @@ require (
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/xanzy/go-gitlab v0.84.0 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
github.com/ysmood/fetchup v0.2.4 // indirect
Expand All @@ -400,6 +381,7 @@ require (
golang.org/x/mod v0.17.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/term v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.20.0 // indirect
Expand Down
Loading

0 comments on commit a31bede

Please sign in to comment.