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

[Issue] Filtered IPs should not show up in aggregate subnets #473

Closed
coffeegist opened this issue Aug 12, 2024 · 1 comment · Fixed by #484
Closed

[Issue] Filtered IPs should not show up in aggregate subnets #473

coffeegist opened this issue Aug 12, 2024 · 1 comment · Fixed by #484
Assignees
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed.

Comments

@coffeegist
Copy link

Describe the bug
I expect, if I filter input using the -fi command, and then aggregate with -a to the minimum number of subnets, that the subnets generated would match the output given if -a is not provided. However, the filtered IPs are added back in after aggregating. Is there another way to exclude IPs and aggregate them back to the minimal subnets that do not include the filtered addresses?

Mapcidr version
Include the version of mapcidr you are using, mapcidr -version

$ mapcidr --version                                                                                                                                                                                                                       

                   ____________  ___    
  __ _  ___ ____  / ___/  _/ _ \/ _ \   
 /  ' \/ _ '/ _ \/ /___/ // // / , _/   
/_/_/_/\_,_/ .__/\___/___/____/_/|_|
          /_/                                                            

                projectdiscovery.io

[INF] Current Version: v1.1.34
$ mapcidr -silent -cl 10.0.0.0/30                                                                                                                                                                                                         
10.0.0.0
10.0.0.1
10.0.0.2
10.0.0.3

$ mapcidr -silent -cl 10.0.0.0/30 -fi 10.0.0.1
10.0.0.0
10.0.0.2
10.0.0.3

$ mapcidr -silent -cl 10.0.0.0/30 -fi 10.0.0.1 -a
10.0.0.0/30
@coffeegist
Copy link
Author

I suppose a workaround would be the following

$ mapcidr -silent -cl 10.0.0.0/30 -fi 10.0.0.1 | mapcidr -silent -a
10.0.0.0/32
10.0.0.2/31

@ehsandeep ehsandeep added the Status: Completed Nothing further to be done with this issue. Awaiting to be closed. label Sep 2, 2024
@christianfl christianfl mentioned this issue Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants