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

Feature/improve parse ip range #353

Closed
wants to merge 5 commits into from

Conversation

klaxon1
Copy link
Contributor

@klaxon1 klaxon1 commented Aug 28, 2018

To resolve #270.

Operation 'Parse IP range' can accept as input a list of IP and CIDR addresses (1 per line) and returns the smallest subnet that covers them all.

As described in the issue - the function finds the smallest and largest IPs and constructs a range between them.

IPv4 Example
Input:

2.2.2.2
3.3.3.3/24
1.1.1.1

Output:

Minimum subnet required to hold this range:
	Network: 0.0.0.0
	CIDR: 6
	Mask: 252.0.0.0
	Subnet range: 0.0.0.0 - 3.255.255.255
	Total addresses in subnet: 67108864

Range: 1.1.1.1 - 3.3.3.255
Total addresses in range: 33686271

The specified range contains more than 65,536 addresses. Running this query could crash your browser. If you want to run it, select the "Allow large queries" option. You are advised to turn off "Auto Bake" whilst editing large ranges.

IPv6 Example
Input:

2404:6800:4001:ffff:ffff:ffff:ffff:ffff
2404:6800:4001::ffff
2404:6800:4001:ffff:ffff::1111
2404:6800:4001::/64

Output:

Range: 2404:6800:4001:0000:0000:0000:0000:0000 - 2404:6800:4001:ffff:ffff:ffff:ffff:ffff
Shorthand range: 2404:6800:4001:: - 2404:6800:4001:ffff:ffff:ffff:ffff:ffff
Total addresses in range: 1.2089258196146292e+24

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Duncan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@klaxon1 klaxon1 closed this Aug 28, 2018
@klaxon1 klaxon1 deleted the feature/improve-parse-ip-range branch August 28, 2018 12:57
@klaxon1
Copy link
Contributor Author

klaxon1 commented Aug 28, 2018

sorry. forgot to set my user details in git which has stuffed up the License Agreement

BRAVO68WEB pushed a commit to BRAVO68WEB/CyberChef that referenced this pull request May 29, 2022
[Snyk] Upgrade @sentry/tracing from 6.14.1 to 6.14.3
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.

Operation request: Improve 'Parse IP range' input options
2 participants