Open zlgxzswjy opened 1 month ago
When I add-Pn
, The command becomes: naabu -host 47.101.211.147 -Pn -p - -stats -mp 63636
。the statistics are correct.
So is it just a statistical error, or are there really a lot of duplicate requests?
*Switch to version 2.1.6 for testing, regardless of whether there is a-Pn parameter, the statistical results are correct, and obviously much faster
Can you retry with dev
branch? Thanks
go install -v github.com/projectdiscovery/naabu/v2/cmd/naabu@dev
Just guessing, but that's possible that statistics are wrongly incremented during host-discovery phase. Whereas if we have both service-discovery + port-scan probably we should consider only portscan as relevant, or split the statistics in two parts for the respective phases.
Can you retry with
dev
branch? Thanksgo install -v github.com/projectdiscovery/naabu/v2/cmd/naabu@dev
I try this dev
branch with the same commad,the json also returned prompts me : "hosts": 2
I couldn't repro this issue - used the dev
branch for testing.
$ go run . -host 47.101.211.147 -p - -stats -mp 63636
__
___ ___ ___ _/ / __ __
/ _ \/ _ \/ _ \/ _ \/ // /
/_//_/\_,_/\_,_/_.__/\_,_/
projectdiscovery.io
[INF] Current naabu version 2.3.1 (latest)
[INF] Running CONNECT scan with non root privileges
Target: 47.101.211.147/32, Target Count: 1
47.101.211.147:32080
47.101.211.147:43080
$ curl -s http://localhost:63636/metrics | jq .hosts
1
This may be a problem with my cloud service provider. I scan the same ip on my local arch linux,hosts is indeed 1, but when placed on my Aliyun ECS, hosts is still 3 or 2,And debug output the following information:
[DBG] Can not send packet to ffff:ffff:800:4514:28:0:4000:f706:32748 port: Invalid source IPv6 address (wrong length of 0 bytes instead of 16) [DBG] Can not send packet to ffff:ffff:800:4514:28:0:4000:f706:44512 port: Invalid source IPv6 address (wrong length of 0 bytes instead of 16) [DBG] Can not send packet to ffff:ffff:800:4514:28:0:4000:f706:35597 port: Invalid source IPv6 address (wrong length of 0 bytes instead of 16) [DBG] Can not send packet to ffff:ffff:800:4514:28:0:4000:f706:15332 port: Invalid source IPv6 address (wrong length of 0 bytes instead of 16) [DBG] Can not send packet to ffff:ffff:800:4514:28:0:4000:f706:11172 port: Invalid source IPv6 address (wrong length of 0 bytes instead of 16) [DBG] Can not send packet to ffff:ffff:800:4514:28:0:4000:f706:24343 port: Invalid source IPv6 address (wrong length of 0 bytes instead of 16) [DBG] Can not send packet to ffff:ffff:800:4514:28:0:4000:f706:58715 port: Invalid source IPv6 address (wrong length of 0 bytes instead of 16) [DBG] Can not send packet to ffff:ffff:800:4514:28:0:4000:f706:9790 port: Invalid source IPv6 address (wrong length of 0 bytes instead of 16) [DBG] Can not send packet to ffff:ffff:800:4514:28:0:4000:f706:9793 port: Invalid source IPv6 address (wrong length of 0 bytes instead of 16) [DBG] Can not send packet to ffff:ffff:800:4514:28:0:4000:f706:44531 port: Invalid source IPv6 address (wrong length of 0 bytes instead of 16)
FYI: I still can't repro this but I'll leave it open for a while to see if someone else is experiencing it.
Naabu version: 2.3.1
Current Behavior:
I made an ip
x.x.x.x
using-host and enabled the-stats -mp 63636
parameter,But when I requesthttp://localhost:63636/metrics
, the json returned prompts me that the number of"hosts": 2
Expected Behavior:
Number of hosts should be 1
Steps To Reproduce:
Example: steps to reproduce the behavior:
curl http://localhost:63636/metrics|jq
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 169 100 169 0 0 19580 0 --:--:-- --:--:-- --:--:-- 21125 { "total": 393210, "packets": 3500, "hosts": 2, "retries": 3, "errors": 0, "startedAt": "2024-06-12T15:45:55.953068423+08:00", "hosts_with_port": 0, "ports": 65535, "duration": "0:00:07" }
Anything else: