• Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Menu
  • Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Search
Close
  • Home
  • 2020
  • September
  • 30
  • mapCIDR – Small Utility Program To Perform Multiple Operations For A Given subnet/CIDR Ranges

mapCIDR – Small Utility Program To Perform Multiple Operations For A Given subnet/CIDR Ranges

September 30, 2020 Comments Off on mapCIDR – Small Utility Program To Perform Multiple Operations For A Given subnet/CIDR Ranges
mapCIDR - Small Utility Program To Perform Multiple Operations For A Given subnet/CIDR Ranges cybersecurity ethical hacking hack android hack app hack wordpress hacker news hacking hacking tools for windows keylogger kit kitploit password brute force penetration testing pentest pentest android pentest linux pentest toolkit pentest tools spy tool kit spyware tools

Small utility program to perform multiple operations for a given subnet/CIDR ranges.

The tool was developed to ease load distribution for mass scanning operations, it can be used both as a library and as independent CLI tool.

Features

  • Simple and modular code base making it easy to contribute.
  • CIDR distribution for distributed scanning.
  • Stdin and stdout support for integrating in workflows

Installation:-

From Source

▶ GO111MODULE=auto go get -u github.com/projectdiscovery/mapcidr/cmd/mapcidr

From Github

▶ git clone https://github.com/projectdiscovery/mapcidr.git; cd mapcidr/cmd/mapcidr; go build .; cp mapcidr /usr/local/bin

Usage:-

▶ mapcidr -h

This will display help for the tool. Here are all the switches it supports.

Flag Description Example
-cidr Single CIDR to process mapcidr -cidr 173.0.84.0/24
-sbc Slice by CIDR count mapcidr -sbc 10
-sbh Slice by HOST count mapcidr -sbh 10000
-l File containing list of CIDRs mapcidr -l cidr.txt
-o File to write output to (optional) mapcidr -o output.txt
-silent Make the output silent mapcidr -silent
-version Print current version of chaos client mapcidr -version

Running mapCIDR

In order to get list of IPs for a give CIDR, use the following command.

▶ mapcidr -cidr 173.0.84.0/24
▶ echo 173.0.84.0/24 | mapcidr
                   ____________  ___    
__ _ ___ ____ / ___/ _/ _ / _
/ ' / _ '/ _ / /___/ // // / , _/
/_/_/_/_,_/ .__/___/___/____/_/|_| v0.1
/_/

projectdiscovery.io

[WRN] Use with caution. You are responsible for your actions
[WRN] Developers assume no liability and are not responsible for any misuse or damage.

173.0.84.0
173.0.84.1
173.0.84.2
173.0.84.3
173.0.84.4
173.0.84.5
173.0.84.13
173.0.84.14
173.0.84.15
173.0.84.16

Slice by CIDR

In order to slice given CIDR or list of CIDR by CIDR count or slice into multiple and equal smaller subnets, use the following command.

▶ mapcidr -cidr 173.0.84.0/24 -sbc 10 -silent
▶ echo 173.0.84.0/24 | mapcidr -sbc 10 -silent
173.0.84.0/27
173.0.84.32/27
173.0.84.64/27
173.0.84.96/27
173.0.84.128/27
173.0.84.160/27
173.0.84.208/28
173.0.84.192/28
173.0.84.240/28
173.0.84.224/28

Slice by HOST

In order to slice given CIDR for equal number of host count in each CIDR, use the following command.

▶ mapcidr -cidr 173.0.84.0/16 -sbh 20000 -silent
▶ echo 173.0.84.0/16 | mapcidr -sbh 20000 -silent
173.0.0.0/18
173.0.64.0/18
173.0.128.0/18
173.0.192.0/18

Note: it’s possible to obtain a perfect split only when the desired amount of slices or hosts per subnet is a powers of two. Otherwise the tool will attempt to automatically find the best split strategy to obtain the desired outcome.

Use mapCIDR as a library

It’s possible to use the library directly in your go programs. The following code snippets outline how to divide a cidr into subnets, and how to divide the same into subnets containing a certain number of hosts

package main

import (
"fmt"

"github.com/projectdiscovery/mapcidr"
)

func main() {
// Divide the CIDR into two subnets
subnets1 := mapcidr.SplitN("192.168.1.0/24", 2)
for _, subnet := range subnets1 {
fmt.Println(subnet)
}
// Divide the CIDR into two subnets containing 128 hosts each
subnets2 := mapcidr.SplitByNumber("192.168.1.0/24", 128)
for _, subnet := range subnets2 {
fmt.Println(subnet)
}

// List all ips in the CIDR
ips, _ := mapcidr.Ips("192.168.1.0/24")
for _, ip := range ips {
fmt.Println(ip)
}
}

mapCDIR is made with  by the projectdiscovery team.

Download Mapcidr

Post navigation

frp v0.34.1 releases: fast reverse proxy for exposing a local server behind a NAT or firewall to the internet
H2Csmuggler – HTTP Request Smuggling Over HTTP/2 Cleartext (H2C)

Related Articles

BigBountyRecon - This Tool Utilises 58 Different Techniques To Expediate The Process Of Intial Reconnaissance On The Target Organisation

BigBountyRecon – This Tool Utilises 58 Different Techniques To Expediate The Process Of Intial Reconnaissance On The Target Organisation

- Hack Tools
January 19, 2021
BigBountyRecon: expediate the process of intial reconnaissance on the target organisation

BigBountyRecon: expediate the process of intial reconnaissance on the target organisation

- Hack Tools
January 18, 2021
Token-Hunter - Collect OSINT For GitLab Groups And Members And Search The Group And Group Members' Snippets, Issues, And Issue Discussions For Sensitive Data That May Be Included In These Assets

Token-Hunter – Collect OSINT For GitLab Groups And Members And Search The Group And Group Members’ Snippets, Issues, And Issue Discussions For Sensitive Data That May Be Included In These Assets

- Hack Tools
January 18, 2021
hacker gadgets
hacker phone covers

Recent Posts

BigBountyRecon - This Tool Utilises 58 Different Techniques To Expediate The Process Of Intial Reconnaissance On The Target Organisation

BigBountyRecon – This Tool Utilises 58 Different Techniques To Expediate The Process Of Intial Reconnaissance On The Target Organisation

January 19, 2021
Father and Son Sentenced for Selling Drugs on the Darkweb

Father and Son Sentenced for Selling Drugs on the Darkweb

January 19, 2021
BigBountyRecon: expediate the process of intial reconnaissance on the target organisation

BigBountyRecon: expediate the process of intial reconnaissance on the target organisation

January 18, 2021
Token-Hunter - Collect OSINT For GitLab Groups And Members And Search The Group And Group Members' Snippets, Issues, And Issue Discussions For Sensitive Data That May Be Included In These Assets

Token-Hunter – Collect OSINT For GitLab Groups And Members And Search The Group And Group Members’ Snippets, Issues, And Issue Discussions For Sensitive Data That May Be Included In These Assets

January 18, 2021
Pentest Collaboration Framework: help security specialist manage and share project information

Pentest Collaboration Framework: help security specialist manage and share project information

January 18, 2021
ImHex - A Hex Editor For Reverse Engineers, Programmers And People That Value Their Eye Sight When Working At 3 AM.

ImHex – A Hex Editor For Reverse Engineers, Programmers And People That Value Their Eye Sight When Working At 3 AM.

January 18, 2021

Social Media Hacking

SocialPath – Track users across Social Media Platforms

SocialPath – Track users across Social Media Platforms

- Social Media Hacking
October 16, 2019October 16, 2019

SocialPath is a django application for gathering social media intelligence on specific username. It checks for Twitter, Instagram, Facebook, Reddit...

SocialScan – Check Email Address and Username Availability on Online Platforms

SocialScan – Check Email Address and Username Availability on Online Platforms

June 17, 2019
Shellphish – Phishing Tool For 18 Social Media Apps

Shellphish – Phishing Tool For 18 Social Media Apps

June 10, 2019July 27, 2019
WhatsApp Hacking using QRLJacking

WhatsApp Hacking using QRLJacking

May 2, 2019May 19, 2019
How to Hack any Facebook Account with Z-Shadow

How to Hack any Facebook Account with Z-Shadow

April 26, 2019June 29, 2020
hacker buffs
ABOUT US

Haxf4rall is a collective, a good starting point and provides a variety of quality material for cyber security professionals.

Our primary focus revolves around the latest tools released in the Infosec community and provide a platform for developers to showcase their skillset and current projects.

COMPANY
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • Lanc Remastered
  • Privacy Policy
  • Rainmeter Skins
  • Sitemap
  • Submit your Tool
Menu
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • Lanc Remastered
  • Privacy Policy
  • Rainmeter Skins
  • Sitemap
  • Submit your Tool
Live Chat
RESOURCES
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Menu
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Get Started
TOOLBOX
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Menu
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Tools Directory

2014 – 2020 | Haxf4rall.com               Stay Connected:

Facebook
Twitter
Google-plus
Wordpress
Please wait...

Join Our Community

Subscribe now and get your free HACKERS HANDBOOK

Don't Worry ! You will not be spammed
SIGN UP FOR NEWSLETTER NOW