Modifications to the IP library

This commit is contained in:
n1073645 2019-12-04 14:52:55 +00:00
parent 8df9d6fcf6
commit 2ac3ec2a7c
3 changed files with 6 additions and 6 deletions

View file

@ -64,7 +64,7 @@ export function ipv6CidrRange(cidr, includeNetworkInfo) {
cidrRange = parseInt(cidr[cidr.length-1], 10);
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),
@ -254,7 +254,7 @@ export function ipv6ListedRange(match, includeNetworkInfo) {
const cidrRange = parseInt(ipv6CidrList[i].split("/")[1], 10);
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),

View file

@ -31,9 +31,9 @@ class ParseX509Certificate extends Operation {
this.outputType = "string";
this.args = [
{
"name": "Input format",
"type": "option",
"value": ["PEM", "DER Hex", "Base64", "Raw"]
name: "Input format",
type: "option",
value: ["PEM", "DER Hex", "Base64", "Raw"]
}
];
this.checks = new magicObject([

View file

@ -28,7 +28,7 @@ class RemoveLineNumbers extends Operation {
{
match: "^\\s*([0-9]+ .*?(\\n))+[0-9] .+$",
flags: "",
magic: true,
magic: false,
args: []
}
]);