Skip to content

Commit 4937103

Browse files
committed
fix nuclei Project is true file missing bug 2022-06-28 15:01:1656399684
1 parent 4035f1a commit 4937103

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

config/config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
"HydraPass": "",
5151
"UrlPrecise": true,
5252
"ParseSSl": false,
53-
""
5453
"EnableSubfinder": false,
5554
"naabu_dns": {},
5655
"naabu": {"TopPorts": "1000","ScanAllIPS": true},

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func main() {
2323
}
2424
naabuRunner, err := naaburunner.NewRunner(options)
2525
if err != nil {
26-
gologger.Fatal().Msgf("Could not create runner: %s\n", err)
26+
gologger.Fatal().Msgf("naaburunner.NewRunner Could not create runner: %s\n", err)
2727
}
2828
err = naabuRunner.RunEnumeration()
2929
if err != nil {
@@ -34,6 +34,6 @@ func main() {
3434
hydra.DoNmapRst()
3535
err = naabuRunner.Httpxrun()
3636
if err != nil {
37-
gologger.Fatal().Msgf("Could not run httpRunner: %s\n", err)
37+
gologger.Fatal().Msgf("naabuRunner.Httpxrun Could not run httpRunner: %s\n", err)
3838
}
3939
}

nuclei_Yaml/nuclei_yaml.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package nuclei_Yaml
22

33
import (
44
"bytes"
5+
"fmt"
56
"github.com/hktalent/scan4all/pkg"
67
"os"
78
"strings"
@@ -36,20 +37,24 @@ func RunNuclei(buf bytes.Buffer, xx chan bool) {
3637
options.Targets = strings.Split(buf.String(), "\n")
3738
runner.ParseOptions(options)
3839
/////////////////////////////////////
40+
options.Verbose = false
41+
options.UpdateNuclei = false
42+
options.Stream = false
3943
if nil != pkg.G_Options {
4044
x01, ok := pkg.G_Options.(types.Options)
4145
if ok {
4246
options.Output = x01.Output
4347
options.JSON = x01.JSON
48+
options.Stream = x01.Stream
49+
options.Verbose = x01.Verbose
50+
options.Debug = x01.Debug
4451
}
4552
}
46-
options.Verbose = false
47-
options.Stream = false
4853
////////////////////////////////////*/
49-
5054
nucleiRunner, err := runner.New(options)
5155
if err != nil {
52-
gologger.Fatal().Msgf("Could not create runner: %s\n", err)
56+
fmt.Println(options)
57+
gologger.Fatal().Msgf("nucleiRunner Could not create runner: %s\n", err)
5358
}
5459
if nucleiRunner == nil {
5560
return
@@ -225,7 +230,7 @@ func readConfig() {
225230
options.Retries = 1
226231
options.LeaveDefaultPorts = false
227232
options.MaxHostError = 30
228-
options.Project = true // 去重复
233+
options.Project = false // 去重复
229234
options.ProjectPath = os.TempDir()
230235
options.StopAtFirstMatch = false
231236
options.Stream = false

subfinder/subfinder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func DoSubfinder(a []string, out chan string, done chan bool) {
9797
}
9898
newRunner, err := runner.NewRunner(options)
9999
if err != nil {
100-
gologger.Fatal().Msgf("Could not create runner: %s\n", err)
100+
gologger.Fatal().Msgf("newRunner, err := runner.NewRunner Could not create runner: %s\n", err)
101101
}
102102

103103
err = newRunner.RunEnumeration(context.Background())

0 commit comments

Comments
 (0)