cyberchef 9.50.0 → 9.50.2
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.2",
|
|
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",
|
|
@@ -136,7 +136,7 @@ const getFeature = function() {
|
|
|
136
136
|
|
|
137
137
|
fs.writeFileSync(path.join(process.cwd(), "CHANGELOG.md"), changelogData);
|
|
138
138
|
|
|
139
|
-
console.log("Written CHANGELOG.md");
|
|
139
|
+
console.log("Written CHANGELOG.md\nCommit changes and then run `npm version minor`.");
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
142
|
};
|
package/src/core/lib/Hex.mjs
CHANGED
|
@@ -105,13 +105,17 @@ export function fromHex(data, delim="Auto", byteLen=2) {
|
|
|
105
105
|
throw new OperationError("Byte length must be a positive integer");
|
|
106
106
|
|
|
107
107
|
if (delim !== "None") {
|
|
108
|
-
const delimRegex = delim === "Auto" ? /[^a-f\d]|
|
|
109
|
-
data = data.
|
|
108
|
+
const delimRegex = delim === "Auto" ? /[^a-f\d]|0x/gi : Utils.regexRep(delim);
|
|
109
|
+
data = data.split(delimRegex);
|
|
110
|
+
} else {
|
|
111
|
+
data = [data];
|
|
110
112
|
}
|
|
111
113
|
|
|
112
114
|
const output = [];
|
|
113
|
-
for (let i = 0; i < data.length; i
|
|
114
|
-
|
|
115
|
+
for (let i = 0; i < data.length; i++) {
|
|
116
|
+
for (let j = 0; j < data[i].length; j += byteLen) {
|
|
117
|
+
output.push(parseInt(data[i].substr(j, byteLen), 16));
|
|
118
|
+
}
|
|
115
119
|
}
|
|
116
120
|
return output;
|
|
117
121
|
}
|
|
@@ -45,7 +45,7 @@ class ParseASN1HexString extends Operation {
|
|
|
45
45
|
*/
|
|
46
46
|
run(input, args) {
|
|
47
47
|
const [index, truncateLen] = args;
|
|
48
|
-
return r.ASN1HEX.dump(input.replace(/\s/g, ""), {
|
|
48
|
+
return r.ASN1HEX.dump(input.replace(/\s/g, "").toLowerCase(), {
|
|
49
49
|
"ommitLongOctet": truncateLen
|
|
50
50
|
}, index);
|
|
51
51
|
}
|
|
@@ -45,10 +45,10 @@ TestRegister.addApiTests([
|
|
|
45
45
|
const result = chef.ADD("sample input", {
|
|
46
46
|
key: {
|
|
47
47
|
string: "some key",
|
|
48
|
-
option: "
|
|
48
|
+
option: "utf8"
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
|
-
assert.equal(result.toString(), "
|
|
51
|
+
assert.equal(result.toString(), "\xe6\xd0\xda\xd5\x8c\xd0\x85\xe2\xe1\xdf\xe2\xd9");
|
|
52
52
|
}),
|
|
53
53
|
|
|
54
54
|
|
|
@@ -121,10 +121,10 @@ Tiger-128`;
|
|
|
121
121
|
const result = chef.AND("Scot-free", {
|
|
122
122
|
key: {
|
|
123
123
|
string: "Raining Cats and Dogs",
|
|
124
|
-
option: "
|
|
124
|
+
option: "utf8",
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
|
-
assert.strictEqual(result.toString(), "
|
|
127
|
+
assert.strictEqual(result.toString(), "Raid)fb A");
|
|
128
128
|
}),
|
|
129
129
|
|
|
130
130
|
it("atBash Cipher", () => {
|
|
@@ -371,10 +371,10 @@ color: white;
|
|
|
371
371
|
},
|
|
372
372
|
salt: {
|
|
373
373
|
string: "Market",
|
|
374
|
-
option: "
|
|
374
|
+
option: "utf8",
|
|
375
375
|
},
|
|
376
376
|
});
|
|
377
|
-
assert.strictEqual(result.toString(), "
|
|
377
|
+
assert.strictEqual(result.toString(), "4930d5d200e80f18c96b5550d13c6af8");
|
|
378
378
|
}),
|
|
379
379
|
|
|
380
380
|
it("Derive PBKDF2 Key", () => {
|