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 #354

Merged
merged 5 commits into from
Aug 29, 2018

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

@n1474335 n1474335 merged commit 2820660 into gchq:master Aug 29, 2018
@n1474335
Copy link
Member

Great, thanks very much! This is very useful.

@klaxon1 klaxon1 deleted the feature/improve-parse-ip-range branch August 29, 2018 22:20
BRAVO68WEB pushed a commit to BRAVO68WEB/CyberChef that referenced this pull request May 29, 2022
…etical-sort

[FEATURE] Case-insensitive item sorting
Fixes gchq#352
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