Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SolsticeSpectrum opened this issue Jul 14, 2022 · 2 comments

Comments

@SolsticeSpectrum
Copy link

SolsticeSpectrum commented Jul 14, 2022

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 SolsticeSpectrum changed the title [ Suggestion ] Map multiple hosts and multiple ports separated by commas [ Suggestion ] Map multiple targets to multiple ports separated by commas Jul 14, 2022
@SolsticeSpectrum
Copy link
Author

SolsticeSpectrum commented Jul 20, 2022

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

@zan8in
Copy link
Owner

zan8in commented Sep 8, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants