Skip to content

Commit 10f1b46

Browse files
committed
性能优化 2.2.9
1 parent 4f74aab commit 10f1b46

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ require (
100100
github.com/mfonda/simhash v0.0.0-20151007195837-79f94a1100d6
101101
github.com/olekukonko/tablewriter v0.0.5
102102
github.com/projectdiscovery/folderutil v0.0.0-20220215113126-add60a1e8e08
103-
github.com/projectdiscovery/interactsh v1.0.4
104103
github.com/projectdiscovery/nuclei-updatecheck-api v0.0.0-20220612112524-9b1adac8563c
105104
github.com/projectdiscovery/nuclei/v2 v2.7.2
106105
github.com/projectdiscovery/subfinder/v2 v2.5.2
@@ -198,6 +197,7 @@ require (
198197
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
199198
github.com/projectdiscovery/chaos-client v0.1.8 // indirect
200199
github.com/projectdiscovery/filekv v0.0.0-20210915124239-3467ef45dd08 // indirect
200+
github.com/projectdiscovery/interactsh v1.0.4 // indirect
201201
github.com/projectdiscovery/reflectutil v0.0.0-20210804085554-4d90952bf92f // indirect
202202
github.com/projectdiscovery/yamldoc-go v1.0.3-0.20211126104922-00d2c6bb43b6 // indirect
203203
github.com/rivo/uniseg v0.2.0 // indirect

nuclei_Yaml/internal/runner/options.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ func ParseOptions(options *types.Options) {
5656
gologger.Fatal().Msgf("Could not read template configuration: %s\n", err)
5757
}
5858
gologger.Info().Msgf("Current nuclei-templates version: %s (%s)\n", configuration.TemplateVersion, configuration.TemplatesDirectory)
59-
os.Exit(0)
59+
//os.Exit(0)
60+
return
6061
}
6162
if options.StoreResponseDir != DefaultDumpTrafficOutputFolder && !options.StoreResponse {
6263
gologger.Debug().Msgf("Store response directory specified, enabling \"store-resp\" flag automatically\n")

pkg/naabu/v2/pkg/runner/runner.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ func (r *Runner) Httpxrun() error {
5252
httpxrunner.Naabubuffer = Naabubuffer
5353
var nucleiDone = make(chan bool)
5454
// 集成nuclei
55+
//log.Println("httpxrunner.Naabubuffer = ", httpxrunner.Naabubuffer.String())
5556
go nuclei_Yaml.RunNuclei(httpxrunner.Naabubuffer, nucleiDone)
5657
httpxoptions := httpxrunner.ParseOptions()
5758
httpxoptions.Output = r.options.Output
@@ -563,7 +564,7 @@ func (r *Runner) handleOutput() {
563564
host = hostIP
564565
}
565566
for port := range ports {
566-
Naabubuffer.Write([]byte(fmt.Sprintf("%s:%d\n", host, port)))
567+
Add2Naabubuffer(fmt.Sprintf("%s:%d\n", host, port))
567568
}
568569
gologger.Info().Msgf("Found %d ports on host %s (%s)\n", len(ports), host, hostIP)
569570
// console output

pkg/naabu/v2/pkg/runner/targets.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ func (r *Runner) PreProcessTargets() error {
125125
var noRpt1 = map[string]string{}
126126

127127
func Add2Naabubuffer(target string) {
128-
target = strings.TrimSpace(target)
129-
if _, ok := noRpt1[target]; ok {
128+
if s1, ok := noRpt1[target]; ok {
129+
log.Println("重复:", s1, " = ", target)
130130
return
131131
}
132132
noRpt1[target] = "1"

pocs_go/go_poc_check.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ import (
2222
"net/url"
2323
)
2424

25+
var noRpt = map[string]string{}
26+
2527
func POCcheck(wappalyzertechnologies []string, URL string, finalURL string, checklog4j bool) []string {
28+
if _, ok := noRpt[URL]; ok {
29+
return []string{}
30+
}
31+
noRpt[URL] = "1"
2632
var HOST string
2733
var technologies []string
2834
if host, err := url.Parse(URL); err == nil {

0 commit comments

Comments
 (0)