Closed Cnlouds closed 8 years ago
fix with this code
case 'p':
if (argv[i][2])
arg = argv[i]+2;
else
arg = argv[++i]; // Passes a NULL value that breaks rangelist_parse_ports in ranges.c
//fprintf(stderr, "%.*s: empty parameter\n", argv[0], argv[1]);
//break;
masscan_set_parameter(masscan, "ports", arg);
@Cnlouds please do NOT fix this way.
The correct way is pull request #246
If you fix this way, when you run 'masscan -p' you get a NULL ptr dereference. The initial fix for that issue is what caused this issue... #246 fixes both.
@agreene5 thanks
test in centos 6.3/7, have install the libpcap thanks