Skip to content

[Bug] Cannot run RustScan with CIDR notation #777

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

Open
s7x opened this issue Apr 10, 2025 · 4 comments
Open

[Bug] Cannot run RustScan with CIDR notation #777

s7x opened this issue Apr 10, 2025 · 4 comments

Comments

@s7x
Copy link

s7x commented Apr 10, 2025

Describe the bug
Hello there,

RustScan currently does not support CIDR notation.

To Reproduce
Steps to reproduce the behavior:

  1. run rustscan with the following command: `rustscan -a 1.1.1.1/24'

Expected behavior
Be able to scan CIDR ranges/notation.

Screenshots

Image

Desktop (please complete the following information):

  • OS: ArchLinux
  • Version: rustscan 2.3.0

Additional context
N/A

@PenTeZtZMicZ
Copy link

Hi, I'm also having the same issue, using the latest version of Rustscan via an m2 Mac proc

@PsypherPunk
Copy link
Collaborator

Thanks, @s7x, @PenTeZtZMicZ. Can I check if you've previously seen this working?

Strangely, /32 seems to work fine but all others don't so some parsing is working correctly.

@PsypherPunk
Copy link
Collaborator

Ah, okay: there's a valid error from the underlying library that's being swallowed: "host part of address was not zero".

As per your example, @s7x, this should work:

rustscan -a 1.1.1.0/24

@zombiepigdragon
Copy link

I believe this should theoretically be a fixable issue (and I'll submit a PR to fix it if nobody else does). Would it be better to silently correct this error (if the host part of the address is non-zero, just zero it out and continue- I believe nmap does this) or to print a diagnostic suggesting the corrected CIDR (requires user to re-run the command, but more strictly correct)? In my opinion, option 1 would be more consistent with the current design.

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

4 participants