Skip to content

Commit

Permalink
性能优化 2.2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
x51pwn committed Jun 23, 2022
1 parent 4f74aab commit 10f1b46
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ require (
github.com/mfonda/simhash v0.0.0-20151007195837-79f94a1100d6
github.com/olekukonko/tablewriter v0.0.5
github.com/projectdiscovery/folderutil v0.0.0-20220215113126-add60a1e8e08
github.com/projectdiscovery/interactsh v1.0.4
github.com/projectdiscovery/nuclei-updatecheck-api v0.0.0-20220612112524-9b1adac8563c
github.com/projectdiscovery/nuclei/v2 v2.7.2
github.com/projectdiscovery/subfinder/v2 v2.5.2
Expand Down Expand Up @@ -198,6 +197,7 @@ require (
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/projectdiscovery/chaos-client v0.1.8 // indirect
github.com/projectdiscovery/filekv v0.0.0-20210915124239-3467ef45dd08 // indirect
github.com/projectdiscovery/interactsh v1.0.4 // indirect
github.com/projectdiscovery/reflectutil v0.0.0-20210804085554-4d90952bf92f // indirect
github.com/projectdiscovery/yamldoc-go v1.0.3-0.20211126104922-00d2c6bb43b6 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
Expand Down
3 changes: 2 additions & 1 deletion nuclei_Yaml/internal/runner/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ func ParseOptions(options *types.Options) {
gologger.Fatal().Msgf("Could not read template configuration: %s\n", err)
}
gologger.Info().Msgf("Current nuclei-templates version: %s (%s)\n", configuration.TemplateVersion, configuration.TemplatesDirectory)
os.Exit(0)
//os.Exit(0)
return
}
if options.StoreResponseDir != DefaultDumpTrafficOutputFolder && !options.StoreResponse {
gologger.Debug().Msgf("Store response directory specified, enabling \"store-resp\" flag automatically\n")
Expand Down
3 changes: 2 additions & 1 deletion pkg/naabu/v2/pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func (r *Runner) Httpxrun() error {
httpxrunner.Naabubuffer = Naabubuffer
var nucleiDone = make(chan bool)
// 集成nuclei
//log.Println("httpxrunner.Naabubuffer = ", httpxrunner.Naabubuffer.String())
go nuclei_Yaml.RunNuclei(httpxrunner.Naabubuffer, nucleiDone)
httpxoptions := httpxrunner.ParseOptions()
httpxoptions.Output = r.options.Output
Expand Down Expand Up @@ -563,7 +564,7 @@ func (r *Runner) handleOutput() {
host = hostIP
}
for port := range ports {
Naabubuffer.Write([]byte(fmt.Sprintf("%s:%d\n", host, port)))
Add2Naabubuffer(fmt.Sprintf("%s:%d\n", host, port))
}
gologger.Info().Msgf("Found %d ports on host %s (%s)\n", len(ports), host, hostIP)
// console output
Expand Down
4 changes: 2 additions & 2 deletions pkg/naabu/v2/pkg/runner/targets.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ func (r *Runner) PreProcessTargets() error {
var noRpt1 = map[string]string{}

func Add2Naabubuffer(target string) {
target = strings.TrimSpace(target)
if _, ok := noRpt1[target]; ok {
if s1, ok := noRpt1[target]; ok {
log.Println("重复:", s1, " = ", target)
return
}
noRpt1[target] = "1"
Expand Down
6 changes: 6 additions & 0 deletions pocs_go/go_poc_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ import (
"net/url"
)

var noRpt = map[string]string{}

func POCcheck(wappalyzertechnologies []string, URL string, finalURL string, checklog4j bool) []string {
if _, ok := noRpt[URL]; ok {
return []string{}
}
noRpt[URL] = "1"
var HOST string
var technologies []string
if host, err := url.Parse(URL); err == nil {
Expand Down

0 comments on commit 10f1b46

Please sign in to comment.