cyberchef 9.50.6 → 9.50.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cyberchef",
|
|
3
|
-
"version": "9.50.
|
|
3
|
+
"version": "9.50.8",
|
|
4
4
|
"description": "The Cyber Swiss Army Knife for encryption, encoding, compression and data analysis.",
|
|
5
5
|
"author": "n1474335 <n1474335@gmail.com>",
|
|
6
6
|
"homepage": "https://gchq.github.io/CyberChef",
|
|
@@ -57,23 +57,29 @@ class ParseX509Certificate extends Operation {
|
|
|
57
57
|
const cert = new r.X509(),
|
|
58
58
|
inputFormat = args[0];
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
60
|
+
let undefinedInputFormat = false;
|
|
61
|
+
try {
|
|
62
|
+
switch (inputFormat) {
|
|
63
|
+
case "DER Hex":
|
|
64
|
+
input = input.replace(/\s/g, "").toLowerCase();
|
|
65
|
+
cert.readCertHex(input);
|
|
66
|
+
break;
|
|
67
|
+
case "PEM":
|
|
68
|
+
cert.readCertPEM(input);
|
|
69
|
+
break;
|
|
70
|
+
case "Base64":
|
|
71
|
+
cert.readCertHex(toHex(fromBase64(input, null, "byteArray"), ""));
|
|
72
|
+
break;
|
|
73
|
+
case "Raw":
|
|
74
|
+
cert.readCertHex(toHex(Utils.strToByteArray(input), ""));
|
|
75
|
+
break;
|
|
76
|
+
default:
|
|
77
|
+
undefinedInputFormat = true;
|
|
78
|
+
}
|
|
79
|
+
} catch (e) {
|
|
80
|
+
throw "Certificate load error (non-certificate input?)";
|
|
76
81
|
}
|
|
82
|
+
if (undefinedInputFormat) throw "Undefined input format";
|
|
77
83
|
|
|
78
84
|
const sn = cert.getSerialNumberHex(),
|
|
79
85
|
issuer = cert.getIssuer(),
|