robertdavidgraham / masscan

TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes.
GNU Affero General Public License v3.0
23k stars 3.02k forks source link

Ipv6 address must start with a decimal number #702

Open yingque opened 1 year ago

yingque commented 1 year ago

hi, i using latest code to build program。found a question for masscan with IPv6 scanning.

for example:

$ masscan -p 80 fe80::ae1f:6bff:fedd:36f6
FAIL: unknown command-line parameter "fe80::ae1f:6bff:fedd:36f6"
 [hint] did you want "--fe80::ae1f:6bff:fedd:36f6"?

I simply followed the code,found in code file src/main-conf.c , line 3078:

if (!isdigit(argv[i][0]) && argv[i][0] != ':' && argv[i][0] != '[') {
    fprintf(stderr, "FAIL: unknown command-line parameter \"%s\"\n", argv[i]);
    fprintf(stderr, " [hint] did you want \"--%s\"?\n", argv[i]);
    exit(1);
}

isdigit ? So ipv6 addresses must start with a decimal number?

Any suggestions?

p-l- commented 1 year ago

Based on the code extract you have pasted, I tried masscan -p 80 [fe80::ae1f:6bff:fedd:36f6] and it seems to work.