Skip to content

Conversation

@RaghavendraRQ
Copy link

This PR adds support for parsing mixed port specifications that combine individual ports and ranges within the same -p argument.

Previous Behaviour
RustScan accepted a single range of ports (100-1000).

New Behaviour
Users can now specify ports using a flexible syntax that supports Multi-range ports
rustscan --range 100-200,300-400 $IP'

Implementation Details
input.rs -- parse_range validation; [Opts.range] -> Option<Vec>; config handling and defaults updated; tests adjusted
mod.rs -- pick -> updated to accept multiple ranges and expand them into a Manual port list for multi-range input
mod.rs -- & lib.rs — tests and doctest updated to use the new API where necessary

Testing done

Updated unit tests and doctests run locally: cargo test - (all tests passed)
Existing behaviour retained for single-range or --ports inputs

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

Successfully merging this pull request may close these issues.

1 participant