projectdiscovery / mapcidr

Utility program to perform multiple operations for a given subnet/CIDR ranges.
https://projectdiscovery.io
MIT License
993 stars 92 forks source link

Bug with -aa #430

Closed nullenc0de closed 2 months ago

nullenc0de commented 4 months ago

If you feed it a file with a large number of IP addresses with -aa. The previous released version will give you great feedback. With the latest version it will default to 0.0.0.0/0.

# cat /tmp/test.txt |mapcidr -aa

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

                projectdiscovery.io

[INF] Current mapcidr version v1.1.34 (latest)
0.0.0.0/0

----------------------------------------------------------------

# cat /tmp/test.txt |./mapcidr -aa

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

                projectdiscovery.io

[INF] Current mapcidr version v1.1.16 (outdated)
10.1.6.0/20

Im not sure where the break is between 1.1.34 and 1.1.16 is.

M09Ic commented 4 months ago

I have the same problem as well.

input

192.168.1.1
192.168.2.2
192.168.1.111

v1.1.34 output

.\mapcidr.exe -cl .\temp.txt -aa

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

                projectdiscovery.io

[INF] Current mapcidr version v1.1.34 (latest)
192.168.1.0/28

v1.1.16 output

mapcidr -cl .\temp.txt -aa

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

                projectdiscovery.io

[INF] Current mapcidr version v1.1.16 (outdated)
192.168.1.0/25
192.168.2.2/32