Skip to content

Commit 8aae57a

Browse files
committed
fix 线程过多、目标多时内存开销过大多bug 2022-07-11 11:27:1657510051
1 parent f8beec1 commit 8aae57a

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<img width="928" alt="image" src="https://user-images.githubusercontent.com/18223385/175768227-098c779b-6c5f-48ee-91b1-c56e3daa9c87.png">
1616
</h1>
1717

18+
- 默认检测系统有nmap时优先使用nmap进行快速扫描,弊端:因为设置网络包过大会导致结果不全,另外需要将root密码设置到环境变量PPSSWWDD,更多参考config/doNmapScan.sh
1819
- 快速端口扫描,指纹检测功能
1920
- 快速登录密码爆破功能
2021
- 快速POC检测功能

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ package runner
22

33
const (
44
DefaultPortTimeoutSynScan = 1000
5-
DefaultPortTimeoutConnectScan = 5000
5+
DefaultPortTimeoutConnectScan = 3000
66

77
DefaultRateSynScan = 1000
8-
DefaultRateConnectScan = 1500
8+
DefaultRateConnectScan = 2000
99

1010
DefaultRetriesSynScan = 3
1111
DefaultRetriesConnectScan = 3

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ func ParseOptions() *Options {
9696

9797
flagSet.CreateGroup("port", "Port",
9898
flagSet.StringVarP(&options.Ports, "p", "port", "", "ports to scan (80,443, 100-200"),
99-
flagSet.StringVarP(&options.TopPorts, "tp", "top-ports", "full", "top ports to scan (default 100)"),
99+
flagSet.StringVarP(&options.TopPorts, "tp", "top-ports", "1000", "top ports to scan (default 100)"),
100100
flagSet.StringVarP(&options.ExcludePorts, "ep", "exclude-ports", "", "ports to exclude from scan (comma-separated)"),
101101
flagSet.StringVarP(&options.PortsFile, "pf", "ports-file", "", "list of ports to exclude from scan (file)"),
102102
flagSet.BoolVarP(&options.ExcludeCDN, "ec", "exclude-cdn", false, "skip full port scans for CDN's (only checks for 80,443)"),
103103
)
104104

105105
flagSet.CreateGroup("rate-limit", "Rate-limit",
106-
flagSet.IntVar(&options.Threads, "c", 256*2, "general internal worker threads"),
107-
flagSet.IntVar(&options.Rate, "rate", DefaultRateSynScan*2, "packets to send per second"),
106+
flagSet.IntVar(&options.Threads, "c", 64, "general internal worker threads"),
107+
flagSet.IntVar(&options.Rate, "rate", DefaultRateSynScan, "packets to send per second"),
108108
)
109109

110110
flagSet.CreateGroup("output", "Output",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (r *Runner) Httpxrun() error {
6262
httpxoptions.CSVOutput = r.options.CSV
6363
httpxoptions.JSONOutput = r.options.JSON
6464
httpxoptions.HTTPProxy = r.options.Proxy
65-
httpxoptions.Threads = r.options.Threads * 2
65+
httpxoptions.Threads = r.options.Threads
6666
httpxoptions.Verbose = r.options.Verbose
6767
httpxoptions.NoColor = r.options.NoColor
6868
httpxoptions.Silent = r.options.Silent

0 commit comments

Comments
 (0)