mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-11 00:31:31 -04:00
Modifications to the IP library
This commit is contained in:
parent
8df9d6fcf6
commit
2ac3ec2a7c
3 changed files with 6 additions and 6 deletions
|
@ -64,7 +64,7 @@ export function ipv6CidrRange(cidr, includeNetworkInfo) {
|
||||||
cidrRange = parseInt(cidr[cidr.length-1], 10);
|
cidrRange = parseInt(cidr[cidr.length-1], 10);
|
||||||
|
|
||||||
if (cidrRange < 0 || cidrRange > 127) {
|
if (cidrRange < 0 || cidrRange > 127) {
|
||||||
return "IPv6 CIDR must be less than 128";
|
throw new OperationError("IPv6 CIDR must be less than 128");
|
||||||
}
|
}
|
||||||
|
|
||||||
const ip1 = new Array(8),
|
const ip1 = new Array(8),
|
||||||
|
@ -254,7 +254,7 @@ export function ipv6ListedRange(match, includeNetworkInfo) {
|
||||||
const cidrRange = parseInt(ipv6CidrList[i].split("/")[1], 10);
|
const cidrRange = parseInt(ipv6CidrList[i].split("/")[1], 10);
|
||||||
|
|
||||||
if (cidrRange < 0 || cidrRange > 127) {
|
if (cidrRange < 0 || cidrRange > 127) {
|
||||||
return "IPv6 CIDR must be less than 128";
|
throw new OperationError("IPv6 CIDR must be less than 128");
|
||||||
}
|
}
|
||||||
|
|
||||||
const cidrIp1 = new Array(8),
|
const cidrIp1 = new Array(8),
|
||||||
|
|
|
@ -31,9 +31,9 @@ class ParseX509Certificate extends Operation {
|
||||||
this.outputType = "string";
|
this.outputType = "string";
|
||||||
this.args = [
|
this.args = [
|
||||||
{
|
{
|
||||||
"name": "Input format",
|
name: "Input format",
|
||||||
"type": "option",
|
type: "option",
|
||||||
"value": ["PEM", "DER Hex", "Base64", "Raw"]
|
value: ["PEM", "DER Hex", "Base64", "Raw"]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
this.checks = new magicObject([
|
this.checks = new magicObject([
|
||||||
|
|
|
@ -28,7 +28,7 @@ class RemoveLineNumbers extends Operation {
|
||||||
{
|
{
|
||||||
match: "^\\s*([0-9]+ .*?(\\n))+[0-9] .+$",
|
match: "^\\s*([0-9]+ .*?(\\n))+[0-9] .+$",
|
||||||
flags: "",
|
flags: "",
|
||||||
magic: true,
|
magic: false,
|
||||||
args: []
|
args: []
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue