masscan icon indicating copy to clipboard operation
masscan copied to clipboard

[ Suggestion ] Map multiple targets to multiple ports separated by commas

Open SolsticeSpectrum opened this issue 3 years ago • 2 comments

masscan.SetParamTargets("82.208.17.0/26, 89.203.193.100/26, 89.187.158.0/24"),
masscan.SetParamPorts("27000-27999, 20000-60000, 30000-60000"),

Basically add functionality where you have multiple targets and ports separated by commas and third target corresponds to third port etc.

So you can have multiple target and each target can have it's own assined port range

SolsticeSpectrum avatar Jul 14 '22 14:07 SolsticeSpectrum

And to not kill the functionality of having multiple port ranges on one IP, a solution would be something like this

masscan.SetParamTargets("82.208.17.0/26, 89.203.193.100/26, 89.187.158.0/24 89.187.159.0/24"),
masscan.SetParamPorts("27000-27999, 20000-60000 5000-10000, 30000-60000"),

So it would result in this 82.208.17.0/26 has assigned ports 27000-27999 89.203.193.100/26 has assigned ports 20000-60000 and 5000-10000 89.187.158.0/24 and 89.187.159.0/24 has both assigned ports 30000-60000

Basically space would mean multiple port ranges for one IP or multiple IPs for one port range or even multiple IPs for multiple port ranges. And next target and it's port range would be sepparated by comma

SolsticeSpectrum avatar Jul 20 '22 16:07 SolsticeSpectrum

And to not kill the functionality of having multiple port ranges on one IP, a solution would be something like this

masscan.SetParamTargets("82.208.17.0/26, 89.203.193.100/26, 89.187.158.0/24 89.187.159.0/24"),
masscan.SetParamPorts("27000-27999, 20000-60000 5000-10000, 30000-60000"),

So it would result in this 82.208.17.0/26 has assigned ports 27000-27999 89.203.193.100/26 has assigned ports 20000-60000 and 5000-10000 89.187.158.0/24 and 89.187.159.0/24 has both assigned ports 30000-60000

Basically space would mean multiple port ranges for one IP or multiple IPs for one port range or even multiple IPs for multiple port ranges. And next target and it's port range would be sepparated by comma

I'm sorry for the delayed response. The advice you provided may be too customized for a fundamental library like masscan.

zan8in avatar Sep 08 '23 01:09 zan8in