cyberchef 9.33.1 → 9.34.0
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/CHANGELOG.md +5 -0
- package/package.json +1 -1
- package/src/core/config/Categories.json +1 -0
- package/src/core/config/OperationConfig.json +10 -0
- package/src/core/config/modules/Default.mjs +2 -0
- package/src/core/operations/GetAllCasings.mjs +53 -0
- package/src/core/operations/index.mjs +2 -0
- package/src/node/index.mjs +5 -0
- package/tests/operations/index.mjs +1 -1
- package/tests/operations/tests/GetAllCasings.mjs +44 -0
package/CHANGELOG.md
CHANGED
|
@@ -13,6 +13,9 @@ All major and minor version changes will be documented in this file. Details of
|
|
|
13
13
|
|
|
14
14
|
## Details
|
|
15
15
|
|
|
16
|
+
### [9.34.0] - 2022-03-28
|
|
17
|
+
- 'Get All Casings' operation added [@n1073645] | [#1065]
|
|
18
|
+
|
|
16
19
|
### [9.33.0] - 2022-03-25
|
|
17
20
|
- Updated to support Node 17 [@n1474335] [@john19696] [@t-8ch] | [[#1326] [#1313] [#1244]
|
|
18
21
|
- Improved CJS and ESM module support [@d98762625] | [#1037]
|
|
@@ -275,6 +278,7 @@ All major and minor version changes will be documented in this file. Details of
|
|
|
275
278
|
|
|
276
279
|
|
|
277
280
|
|
|
281
|
+
[9.34.0]: https://github.com/gchq/CyberChef/releases/tag/v9.34.0
|
|
278
282
|
[9.33.0]: https://github.com/gchq/CyberChef/releases/tag/v9.33.0
|
|
279
283
|
[9.32.0]: https://github.com/gchq/CyberChef/releases/tag/v9.32.0
|
|
280
284
|
[9.31.0]: https://github.com/gchq/CyberChef/releases/tag/v9.31.0
|
|
@@ -476,6 +480,7 @@ All major and minor version changes will be documented in this file. Details of
|
|
|
476
480
|
[#1037]: https://github.com/gchq/CyberChef/pull/1037
|
|
477
481
|
[#1045]: https://github.com/gchq/CyberChef/pull/1045
|
|
478
482
|
[#1049]: https://github.com/gchq/CyberChef/pull/1049
|
|
483
|
+
[#1065]: https://github.com/gchq/CyberChef/pull/1065
|
|
479
484
|
[#1083]: https://github.com/gchq/CyberChef/pull/1083
|
|
480
485
|
[#1244]: https://github.com/gchq/CyberChef/pull/1244
|
|
481
486
|
[#1313]: https://github.com/gchq/CyberChef/pull/1313
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cyberchef",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.34.0",
|
|
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",
|
|
@@ -6787,6 +6787,16 @@
|
|
|
6787
6787
|
"manualBake": false,
|
|
6788
6788
|
"args": []
|
|
6789
6789
|
},
|
|
6790
|
+
"Get All Casings": {
|
|
6791
|
+
"module": "Default",
|
|
6792
|
+
"description": "Outputs all possible casing variations of a string.",
|
|
6793
|
+
"infoURL": "",
|
|
6794
|
+
"inputType": "string",
|
|
6795
|
+
"outputType": "string",
|
|
6796
|
+
"flowControl": false,
|
|
6797
|
+
"manualBake": false,
|
|
6798
|
+
"args": []
|
|
6799
|
+
},
|
|
6790
6800
|
"Get Time": {
|
|
6791
6801
|
"module": "Default",
|
|
6792
6802
|
"description": "Generates a timestamp showing the amount of time since the UNIX epoch (1970-01-01 00:00:00 UTC). Uses the W3C High Resolution Time API.",
|
|
@@ -65,6 +65,7 @@ import FuzzyMatch from "../../operations/FuzzyMatch.mjs";
|
|
|
65
65
|
import GenerateHOTP from "../../operations/GenerateHOTP.mjs";
|
|
66
66
|
import GenerateLoremIpsum from "../../operations/GenerateLoremIpsum.mjs";
|
|
67
67
|
import GenerateTOTP from "../../operations/GenerateTOTP.mjs";
|
|
68
|
+
import GetAllCasings from "../../operations/GetAllCasings.mjs";
|
|
68
69
|
import GetTime from "../../operations/GetTime.mjs";
|
|
69
70
|
import GroupIPAddresses from "../../operations/GroupIPAddresses.mjs";
|
|
70
71
|
import HTMLToText from "../../operations/HTMLToText.mjs";
|
|
@@ -228,6 +229,7 @@ OpModules.Default = {
|
|
|
228
229
|
"Generate HOTP": GenerateHOTP,
|
|
229
230
|
"Generate Lorem Ipsum": GenerateLoremIpsum,
|
|
230
231
|
"Generate TOTP": GenerateTOTP,
|
|
232
|
+
"Get All Casings": GetAllCasings,
|
|
231
233
|
"Get Time": GetTime,
|
|
232
234
|
"Group IP addresses": GroupIPAddresses,
|
|
233
235
|
"HTML To Text": HTMLToText,
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author n1073645 [n1073645@gmail.com]
|
|
3
|
+
* @copyright Crown Copyright 2020
|
|
4
|
+
* @license Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import Operation from "../Operation.mjs";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Permutate String operation
|
|
11
|
+
*/
|
|
12
|
+
class GetAllCasings extends Operation {
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* GetAllCasings constructor
|
|
16
|
+
*/
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
|
|
20
|
+
this.name = "Get All Casings";
|
|
21
|
+
this.module = "Default";
|
|
22
|
+
this.description = "Outputs all possible casing variations of a string.";
|
|
23
|
+
this.infoURL = "";
|
|
24
|
+
this.inputType = "string";
|
|
25
|
+
this.outputType = "string";
|
|
26
|
+
this.args = [];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @param {string} input
|
|
31
|
+
* @param {Object[]} args
|
|
32
|
+
* @returns {string}
|
|
33
|
+
*/
|
|
34
|
+
run(input, args) {
|
|
35
|
+
const length = input.length;
|
|
36
|
+
const max = 1 << length;
|
|
37
|
+
input = input.toLowerCase();
|
|
38
|
+
let result = "";
|
|
39
|
+
|
|
40
|
+
for (let i = 0; i < max; i++) {
|
|
41
|
+
const temp = input.split("");
|
|
42
|
+
for (let j = 0; j < length; j++) {
|
|
43
|
+
if (((i >> j) & 1) === 1) {
|
|
44
|
+
temp[j] = temp[j].toUpperCase();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
result += temp.join("") + "\n";
|
|
48
|
+
}
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default GetAllCasings;
|
|
@@ -151,6 +151,7 @@ import GenerateRSAKeyPair from "./GenerateRSAKeyPair.mjs";
|
|
|
151
151
|
import GenerateTOTP from "./GenerateTOTP.mjs";
|
|
152
152
|
import GenerateUUID from "./GenerateUUID.mjs";
|
|
153
153
|
import GenericCodeBeautify from "./GenericCodeBeautify.mjs";
|
|
154
|
+
import GetAllCasings from "./GetAllCasings.mjs";
|
|
154
155
|
import GetTime from "./GetTime.mjs";
|
|
155
156
|
import GroupIPAddresses from "./GroupIPAddresses.mjs";
|
|
156
157
|
import Gunzip from "./Gunzip.mjs";
|
|
@@ -517,6 +518,7 @@ export {
|
|
|
517
518
|
GenerateTOTP,
|
|
518
519
|
GenerateUUID,
|
|
519
520
|
GenericCodeBeautify,
|
|
521
|
+
GetAllCasings,
|
|
520
522
|
GetTime,
|
|
521
523
|
GroupIPAddresses,
|
|
522
524
|
Gunzip,
|
package/src/node/index.mjs
CHANGED
|
@@ -158,6 +158,7 @@ import {
|
|
|
158
158
|
GenerateTOTP as core_GenerateTOTP,
|
|
159
159
|
GenerateUUID as core_GenerateUUID,
|
|
160
160
|
GenericCodeBeautify as core_GenericCodeBeautify,
|
|
161
|
+
GetAllCasings as core_GetAllCasings,
|
|
161
162
|
GetTime as core_GetTime,
|
|
162
163
|
GroupIPAddresses as core_GroupIPAddresses,
|
|
163
164
|
Gunzip as core_Gunzip,
|
|
@@ -524,6 +525,7 @@ function generateChef() {
|
|
|
524
525
|
"generateTOTP": _wrap(core_GenerateTOTP),
|
|
525
526
|
"generateUUID": _wrap(core_GenerateUUID),
|
|
526
527
|
"genericCodeBeautify": _wrap(core_GenericCodeBeautify),
|
|
528
|
+
"getAllCasings": _wrap(core_GetAllCasings),
|
|
527
529
|
"getTime": _wrap(core_GetTime),
|
|
528
530
|
"groupIPAddresses": _wrap(core_GroupIPAddresses),
|
|
529
531
|
"gunzip": _wrap(core_Gunzip),
|
|
@@ -901,6 +903,7 @@ const generateRSAKeyPair = chef.generateRSAKeyPair;
|
|
|
901
903
|
const generateTOTP = chef.generateTOTP;
|
|
902
904
|
const generateUUID = chef.generateUUID;
|
|
903
905
|
const genericCodeBeautify = chef.genericCodeBeautify;
|
|
906
|
+
const getAllCasings = chef.getAllCasings;
|
|
904
907
|
const getTime = chef.getTime;
|
|
905
908
|
const groupIPAddresses = chef.groupIPAddresses;
|
|
906
909
|
const gunzip = chef.gunzip;
|
|
@@ -1269,6 +1272,7 @@ const operations = [
|
|
|
1269
1272
|
generateTOTP,
|
|
1270
1273
|
generateUUID,
|
|
1271
1274
|
genericCodeBeautify,
|
|
1275
|
+
getAllCasings,
|
|
1272
1276
|
getTime,
|
|
1273
1277
|
groupIPAddresses,
|
|
1274
1278
|
gunzip,
|
|
@@ -1641,6 +1645,7 @@ export {
|
|
|
1641
1645
|
generateTOTP,
|
|
1642
1646
|
generateUUID,
|
|
1643
1647
|
genericCodeBeautify,
|
|
1648
|
+
getAllCasings,
|
|
1644
1649
|
getTime,
|
|
1645
1650
|
groupIPAddresses,
|
|
1646
1651
|
gunzip,
|
|
@@ -107,7 +107,7 @@ import "./tests/CBORDecode.mjs";
|
|
|
107
107
|
import "./tests/JA3Fingerprint.mjs";
|
|
108
108
|
import "./tests/JA3SFingerprint.mjs";
|
|
109
109
|
import "./tests/HASSH.mjs";
|
|
110
|
-
|
|
110
|
+
import "./tests/GetAllCasings.mjs";
|
|
111
111
|
|
|
112
112
|
// Cannot test operations that use the File type yet
|
|
113
113
|
// import "./tests/SplitColourChannels.mjs";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GetAllCasings tests.
|
|
3
|
+
*
|
|
4
|
+
* @author n1073645 [n1073645@gmail.com]
|
|
5
|
+
* @copyright Crown Copyright 2020
|
|
6
|
+
* @license Apache-2.0
|
|
7
|
+
*/
|
|
8
|
+
import TestRegister from "../../lib/TestRegister.mjs";
|
|
9
|
+
|
|
10
|
+
TestRegister.addTests([
|
|
11
|
+
{
|
|
12
|
+
name: "All casings of test",
|
|
13
|
+
input: "test",
|
|
14
|
+
expectedOutput: "test\nTest\ntEst\nTEst\nteSt\nTeSt\ntESt\nTESt\ntesT\nTesT\ntEsT\nTEsT\nteST\nTeST\ntEST\nTEST\n",
|
|
15
|
+
recipeConfig: [
|
|
16
|
+
{
|
|
17
|
+
"op": "Get All Casings",
|
|
18
|
+
"args": []
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "All casings of t",
|
|
24
|
+
input: "t",
|
|
25
|
+
expectedOutput: "t\nT\n",
|
|
26
|
+
recipeConfig: [
|
|
27
|
+
{
|
|
28
|
+
"op": "Get All Casings",
|
|
29
|
+
"args": []
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "All casings of null",
|
|
35
|
+
input: "",
|
|
36
|
+
expectedOutput: "\n",
|
|
37
|
+
recipeConfig: [
|
|
38
|
+
{
|
|
39
|
+
"op": "Get All Casings",
|
|
40
|
+
"args": []
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
]);
|