-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
186 changed files
with
447 additions
and
33,615 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ var Banner = ` | |
|
||
const Website = "https://github.com/yhy0/Jie" | ||
|
||
const Version = "1.0.8" | ||
const Version = "1.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.