Skip to content

Commit

Permalink
fix craw judge
Browse files Browse the repository at this point in the history
  • Loading branch information
yhy0 committed Mar 18, 2024
1 parent 8a22ff7 commit bd14f78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
11 changes: 6 additions & 5 deletions lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,28 @@ func lib() {
logging.Logger = logging.New(conf.GlobalConfig.Debug, "", "Jie", true)
conf.Init()
conf.GlobalConfig.Http.Proxy = ""
conf.GlobalConfig.WebScan.Craw = "k"
conf.GlobalConfig.WebScan.Poc = nil
conf.GlobalConfig.Reverse.Host = "https://dig.pm/"
conf.GlobalConfig.Passive.WebPort = "9088"
conf.GlobalConfig.Passive.WebUser = "yhy"
conf.GlobalConfig.Passive.WebPass = "123456" // 注意修改为强口令

// 全部插件开启
for k := range conf.Plugin {
// if k == "nuclei" || k == "poc" {
// continue
// }
conf.Plugin[k] = true
}

if conf.GlobalConfig.Passive.WebPort != "" {
go SCopilot.Init()
}

// 初始化爬虫
crawler.NewCrawlergo(false)

go func() {
for v := range output.OutChannel {
// SCopilot 显示
Expand All @@ -53,7 +54,7 @@ func lib() {
msg := output.SCopilotData{
Target: v.VulnData.Target,
}

if v.Level == "Low" {
msg.InfoMsg = []output.PluginMsg{
{
Expand Down
5 changes: 2 additions & 3 deletions pkg/mode/active.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func Katana(target string, waf []string, t *task.Task, fingerprint []string) []s
go t.Distribution(crawlResult)
}

if conf.GlobalConfig.WebScan.Craw == "h" {
if conf.GlobalConfig.WebScan.Craw == "k" {
crawler.Katana(target, false, false, out)
} else {
crawler.Katana(target, true, conf.GlobalConfig.WebScan.Show, out)
Expand Down Expand Up @@ -304,8 +304,7 @@ func getOption() model.Options {
if crawler.TaskConfig.ExtraHeadersString != "" {
err := json.Unmarshal([]byte(crawler.TaskConfig.ExtraHeadersString), &crawler.TaskConfig.ExtraHeaders)
if err != nil {
logging.Logger.Fatal("custom headers can't be Unmarshal.")
panic(err)
logging.Logger.Errorln("custom headers can't be Unmarshal.", err)
}
option.Headers = crawler.TaskConfig.ExtraHeaders
}
Expand Down

0 comments on commit bd14f78

Please sign in to comment.