cyberchef 9.32.3 → 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/.eslintrc.json +1 -1
- package/.nvmrc +1 -1
- package/CHANGELOG.md +17 -1
- package/Gruntfile.js +9 -17
- package/README.md +2 -2
- package/babel.config.js +1 -0
- package/package.json +24 -21
- package/src/core/ChefWorker.js +1 -1
- package/src/core/Recipe.mjs +1 -1
- package/src/core/config/Categories.json +1 -0
- package/src/core/config/OperationConfig.json +10 -0
- package/src/core/config/modules/Bletchley.mjs +1 -1
- package/src/core/config/modules/Charts.mjs +1 -1
- package/src/core/config/modules/Ciphers.mjs +1 -1
- package/src/core/config/modules/Code.mjs +1 -1
- package/src/core/config/modules/Compression.mjs +1 -1
- package/src/core/config/modules/Crypto.mjs +1 -1
- package/src/core/config/modules/Default.mjs +3 -1
- package/src/core/config/modules/Diff.mjs +1 -1
- package/src/core/config/modules/Encodings.mjs +1 -1
- package/src/core/config/modules/Hashing.mjs +1 -1
- package/src/core/config/modules/Image.mjs +1 -1
- package/src/core/config/modules/OCR.mjs +1 -1
- package/src/core/config/modules/OpModules.mjs +1 -1
- package/src/core/config/modules/PGP.mjs +1 -1
- package/src/core/config/modules/Protobuf.mjs +1 -1
- package/src/core/config/modules/PublicKey.mjs +1 -1
- package/src/core/config/modules/Regex.mjs +1 -1
- package/src/core/config/modules/Serialise.mjs +1 -1
- package/src/core/config/modules/Shellcode.mjs +1 -1
- package/src/core/config/modules/URL.mjs +1 -1
- package/src/core/config/modules/UserAgent.mjs +1 -1
- package/src/core/config/modules/Yara.mjs +1 -1
- package/src/core/errors/index.mjs +1 -1
- package/src/core/lib/Magic.mjs +1 -1
- package/src/core/operations/GetAllCasings.mjs +53 -0
- package/src/core/operations/index.mjs +3 -1
- package/src/node/api.mjs +1 -1
- package/src/node/config/scripts/generateNodeIndex.mjs +2 -2
- package/src/node/index.mjs +7 -2
- package/src/node/{repl.js → repl.mjs} +2 -2
- package/src/node/wrapper.js +11 -0
- package/src/web/index.js +2 -2
- package/src/web/static/sitemap.mjs +1 -1
- package/src/web/stylesheets/layout/_io.css +2 -2
- package/tests/node/consumers/cjs-consumer.js +20 -17
- package/tests/node/consumers/esm-consumer.mjs +22 -2
- package/tests/node/tests/Categories.mjs +2 -2
- package/tests/node/tests/operations.mjs +1 -1
- package/tests/operations/index.mjs +1 -1
- package/tests/operations/tests/AvroToJSON.mjs +1 -1
- package/tests/operations/tests/BaconCipher.mjs +2 -2
- package/tests/operations/tests/GetAllCasings.mjs +44 -0
- package/src/node/cjs.js +0 -13
- package/tests/node/consumers/esm-deep-import-consumer.mjs +0 -28
package/.eslintrc.json
CHANGED
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
17
|
package/CHANGELOG.md
CHANGED
|
@@ -13,6 +13,13 @@ 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
|
+
|
|
19
|
+
### [9.33.0] - 2022-03-25
|
|
20
|
+
- Updated to support Node 17 [@n1474335] [@john19696] [@t-8ch] | [[#1326] [#1313] [#1244]
|
|
21
|
+
- Improved CJS and ESM module support [@d98762625] | [#1037]
|
|
22
|
+
|
|
16
23
|
### [9.32.0] - 2021-08-18
|
|
17
24
|
- 'Protobuf Encode' operation added and decode operation modified to allow decoding with full and partial schemas [@n1474335] | [dd18e52]
|
|
18
25
|
|
|
@@ -271,6 +278,8 @@ All major and minor version changes will be documented in this file. Details of
|
|
|
271
278
|
|
|
272
279
|
|
|
273
280
|
|
|
281
|
+
[9.34.0]: https://github.com/gchq/CyberChef/releases/tag/v9.34.0
|
|
282
|
+
[9.33.0]: https://github.com/gchq/CyberChef/releases/tag/v9.33.0
|
|
274
283
|
[9.32.0]: https://github.com/gchq/CyberChef/releases/tag/v9.32.0
|
|
275
284
|
[9.31.0]: https://github.com/gchq/CyberChef/releases/tag/v9.31.0
|
|
276
285
|
[9.30.0]: https://github.com/gchq/CyberChef/releases/tag/v9.30.0
|
|
@@ -384,6 +393,8 @@ All major and minor version changes will be documented in this file. Details of
|
|
|
384
393
|
[@dmfj]: https://github.com/dmfj
|
|
385
394
|
[@mattnotmitt]: https://github.com/mattnotmitt
|
|
386
395
|
[@Danh4]: https://github.com/Danh4
|
|
396
|
+
[@john19696]: https://github.com/john19696
|
|
397
|
+
[@t-8ch]: https://github.com/t-8ch
|
|
387
398
|
|
|
388
399
|
[8ad18b]: https://github.com/gchq/CyberChef/commit/8ad18bc7db6d9ff184ba3518686293a7685bf7b7
|
|
389
400
|
[9a33498]: https://github.com/gchq/CyberChef/commit/9a33498fed26a8df9c9f35f39a78a174bf50a513
|
|
@@ -466,6 +477,11 @@ All major and minor version changes will be documented in this file. Details of
|
|
|
466
477
|
[#999]: https://github.com/gchq/CyberChef/pull/999
|
|
467
478
|
[#1006]: https://github.com/gchq/CyberChef/pull/1006
|
|
468
479
|
[#1022]: https://github.com/gchq/CyberChef/pull/1022
|
|
480
|
+
[#1037]: https://github.com/gchq/CyberChef/pull/1037
|
|
469
481
|
[#1045]: https://github.com/gchq/CyberChef/pull/1045
|
|
470
482
|
[#1049]: https://github.com/gchq/CyberChef/pull/1049
|
|
471
|
-
[#
|
|
483
|
+
[#1065]: https://github.com/gchq/CyberChef/pull/1065
|
|
484
|
+
[#1083]: https://github.com/gchq/CyberChef/pull/1083
|
|
485
|
+
[#1244]: https://github.com/gchq/CyberChef/pull/1244
|
|
486
|
+
[#1313]: https://github.com/gchq/CyberChef/pull/1313
|
|
487
|
+
[#1326]: https://github.com/gchq/CyberChef/pull/1326
|
package/Gruntfile.js
CHANGED
|
@@ -6,6 +6,8 @@ const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPl
|
|
|
6
6
|
const glob = require("glob");
|
|
7
7
|
const path = require("path");
|
|
8
8
|
|
|
9
|
+
const nodeFlags = "--experimental-modules --experimental-json-modules --experimental-specifier-resolution=node --no-warnings --no-deprecation";
|
|
10
|
+
|
|
9
11
|
/**
|
|
10
12
|
* Grunt configuration for building the app in various formats.
|
|
11
13
|
*
|
|
@@ -48,7 +50,7 @@ module.exports = function (grunt) {
|
|
|
48
50
|
|
|
49
51
|
grunt.registerTask("testnodeconsumer",
|
|
50
52
|
"A task which checks whether consuming CJS and ESM apps work with the CyberChef build",
|
|
51
|
-
["exec:setupNodeConsumers", "exec:testCJSNodeConsumer", "exec:testESMNodeConsumer", "exec:
|
|
53
|
+
["exec:setupNodeConsumers", "exec:testCJSNodeConsumer", "exec:testESMNodeConsumer", "exec:teardownNodeConsumers"]);
|
|
52
54
|
|
|
53
55
|
grunt.registerTask("default",
|
|
54
56
|
"Lints the code base",
|
|
@@ -187,9 +189,6 @@ module.exports = function (grunt) {
|
|
|
187
189
|
standalone: ["build/prod/CyberChef*.html"]
|
|
188
190
|
},
|
|
189
191
|
eslint: {
|
|
190
|
-
options: {
|
|
191
|
-
configFile: "./.eslintrc.json"
|
|
192
|
-
},
|
|
193
192
|
configs: ["*.{js,mjs}"],
|
|
194
193
|
core: ["src/core/**/*.{js,mjs}", "!src/core/vendor/**/*", "!src/core/operations/legacy/**/*"],
|
|
195
194
|
web: ["src/web/**/*.{js,mjs}", "!src/web/static/**/*"],
|
|
@@ -349,15 +348,15 @@ module.exports = function (grunt) {
|
|
|
349
348
|
command: "git gc --prune=now --aggressive"
|
|
350
349
|
},
|
|
351
350
|
sitemap: {
|
|
352
|
-
command:
|
|
351
|
+
command: `node ${nodeFlags} src/web/static/sitemap.mjs > build/prod/sitemap.xml`,
|
|
353
352
|
sync: true
|
|
354
353
|
},
|
|
355
354
|
generateConfig: {
|
|
356
355
|
command: chainCommands([
|
|
357
356
|
"echo '\n--- Regenerating config files. ---'",
|
|
358
357
|
"echo [] > src/core/config/OperationConfig.json",
|
|
359
|
-
|
|
360
|
-
|
|
358
|
+
`node ${nodeFlags} src/core/config/scripts/generateOpsIndex.mjs`,
|
|
359
|
+
`node ${nodeFlags} src/core/config/scripts/generateConfig.mjs`,
|
|
361
360
|
"echo '--- Config scripts finished. ---\n'"
|
|
362
361
|
]),
|
|
363
362
|
sync: true
|
|
@@ -365,7 +364,7 @@ module.exports = function (grunt) {
|
|
|
365
364
|
generateNodeIndex: {
|
|
366
365
|
command: chainCommands([
|
|
367
366
|
"echo '\n--- Regenerating node index ---'",
|
|
368
|
-
|
|
367
|
+
`node ${nodeFlags} src/node/config/scripts/generateNodeIndex.mjs`,
|
|
369
368
|
"echo '--- Node index generated. ---\n'"
|
|
370
369
|
]),
|
|
371
370
|
sync: true
|
|
@@ -393,21 +392,14 @@ module.exports = function (grunt) {
|
|
|
393
392
|
testCJSNodeConsumer: {
|
|
394
393
|
command: chainCommands([
|
|
395
394
|
`cd ${nodeConsumerTestPath}`,
|
|
396
|
-
|
|
395
|
+
`node ${nodeFlags} cjs-consumer.js`,
|
|
397
396
|
]),
|
|
398
397
|
stdout: false,
|
|
399
398
|
},
|
|
400
399
|
testESMNodeConsumer: {
|
|
401
400
|
command: chainCommands([
|
|
402
401
|
`cd ${nodeConsumerTestPath}`,
|
|
403
|
-
|
|
404
|
-
]),
|
|
405
|
-
stdout: false,
|
|
406
|
-
},
|
|
407
|
-
testESMDeepImportNodeConsumer: {
|
|
408
|
-
command: chainCommands([
|
|
409
|
-
`cd ${nodeConsumerTestPath}`,
|
|
410
|
-
"node --no-warnings --experimental-modules esm-deep-import-consumer.mjs",
|
|
402
|
+
`node ${nodeFlags} esm-consumer.mjs`,
|
|
411
403
|
]),
|
|
412
404
|
stdout: false,
|
|
413
405
|
},
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
#### *The Cyber Swiss Army Knife*
|
|
12
12
|
|
|
13
|
-
CyberChef is a simple, intuitive web app for carrying out all manner of "cyber" operations within a web browser. These operations include simple encoding like XOR
|
|
13
|
+
CyberChef is a simple, intuitive web app for carrying out all manner of "cyber" operations within a web browser. These operations include simple encoding like XOR and Base64, more complex encryption like AES, DES and Blowfish, creating binary and hexdumps, compression and decompression of data, calculating hashes and checksums, IPv6 and X.509 parsing, changing character encodings, and much more.
|
|
14
14
|
|
|
15
15
|
The tool is designed to enable both technical and non-technical analysts to manipulate data in complex ways without having to deal with complex tools or algorithms. It was conceived, designed, built and incrementally improved by an analyst in their 10% innovation time over several years.
|
|
16
16
|
|
|
@@ -106,7 +106,7 @@ An installation walkthrough, how-to guides for adding new operations and themes,
|
|
|
106
106
|
|
|
107
107
|
## Licencing
|
|
108
108
|
|
|
109
|
-
CyberChef is released under the [Apache 2.0 Licence](https://www.apache.org/licenses/LICENSE-2.0) and is covered by [Crown Copyright](https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/
|
|
109
|
+
CyberChef is released under the [Apache 2.0 Licence](https://www.apache.org/licenses/LICENSE-2.0) and is covered by [Crown Copyright](https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/).
|
|
110
110
|
|
|
111
111
|
|
|
112
112
|
[1]: https://gchq.github.io/CyberChef
|
package/babel.config.js
CHANGED
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",
|
|
@@ -27,28 +27,34 @@
|
|
|
27
27
|
"type": "git",
|
|
28
28
|
"url": "https://github.com/gchq/CyberChef/"
|
|
29
29
|
},
|
|
30
|
-
"main": "src/node/
|
|
31
|
-
"
|
|
30
|
+
"main": "src/node/wrapper.js",
|
|
31
|
+
"exports": {
|
|
32
|
+
"import": "./src/node/index.mjs",
|
|
33
|
+
"require": "./src/node/wrapper.js"
|
|
34
|
+
},
|
|
32
35
|
"bugs": "https://github.com/gchq/CyberChef/issues",
|
|
33
36
|
"browserslist": [
|
|
34
37
|
"Chrome >= 50",
|
|
35
38
|
"Firefox >= 38",
|
|
36
|
-
"node >=
|
|
39
|
+
"node >= 16"
|
|
37
40
|
],
|
|
38
41
|
"devDependencies": {
|
|
39
|
-
"@babel/core": "^7.
|
|
40
|
-
"@babel/
|
|
41
|
-
"@babel/
|
|
42
|
+
"@babel/core": "^7.17.8",
|
|
43
|
+
"@babel/eslint-parser": "^7.17.0",
|
|
44
|
+
"@babel/plugin-syntax-import-assertions": "^7.16.7",
|
|
45
|
+
"@babel/plugin-transform-runtime": "^7.17.0",
|
|
46
|
+
"@babel/preset-env": "^7.16.11",
|
|
47
|
+
"@babel/runtime": "^7.17.8",
|
|
42
48
|
"autoprefixer": "^10.3.1",
|
|
43
|
-
"babel-
|
|
44
|
-
"babel-loader": "^8.2.2",
|
|
49
|
+
"babel-loader": "^8.2.4",
|
|
45
50
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
46
|
-
"chromedriver": "^
|
|
51
|
+
"chromedriver": "^99.0.0",
|
|
47
52
|
"cli-progress": "^3.9.0",
|
|
48
53
|
"colors": "^1.4.0",
|
|
49
54
|
"copy-webpack-plugin": "^9.0.1",
|
|
55
|
+
"core-js": "^3.21.1",
|
|
50
56
|
"css-loader": "5.2.7",
|
|
51
|
-
"eslint": "^
|
|
57
|
+
"eslint": "^8.11.0",
|
|
52
58
|
"exports-loader": "^3.0.0",
|
|
53
59
|
"file-loader": "^6.2.0",
|
|
54
60
|
"grunt": "^1.4.1",
|
|
@@ -58,7 +64,7 @@
|
|
|
58
64
|
"grunt-contrib-connect": "^3.0.0",
|
|
59
65
|
"grunt-contrib-copy": "~1.0.0",
|
|
60
66
|
"grunt-contrib-watch": "^1.1.0",
|
|
61
|
-
"grunt-eslint": "^
|
|
67
|
+
"grunt-eslint": "^24.0.0",
|
|
62
68
|
"grunt-exec": "~3.0.0",
|
|
63
69
|
"grunt-webpack": "^4.0.3",
|
|
64
70
|
"grunt-zip": "^0.18.2",
|
|
@@ -66,7 +72,6 @@
|
|
|
66
72
|
"imports-loader": "^3.0.0",
|
|
67
73
|
"mini-css-extract-plugin": "1.3.7",
|
|
68
74
|
"nightwatch": "^1.7.8",
|
|
69
|
-
"node-sass": "^5.0.0",
|
|
70
75
|
"postcss": "^8.3.6",
|
|
71
76
|
"postcss-css-variables": "^0.18.0",
|
|
72
77
|
"postcss-import": "^14.0.2",
|
|
@@ -77,7 +82,7 @@
|
|
|
77
82
|
"style-loader": "^3.2.1",
|
|
78
83
|
"svg-url-loader": "^7.1.1",
|
|
79
84
|
"url-loader": "^4.1.1",
|
|
80
|
-
"webpack": "^5.
|
|
85
|
+
"webpack": "^5.70.0",
|
|
81
86
|
"webpack-bundle-analyzer": "^4.4.2",
|
|
82
87
|
"webpack-dev-server": "3.11.2",
|
|
83
88
|
"webpack-node-externals": "^3.0.0",
|
|
@@ -85,7 +90,6 @@
|
|
|
85
90
|
},
|
|
86
91
|
"dependencies": {
|
|
87
92
|
"@babel/polyfill": "^7.12.1",
|
|
88
|
-
"@babel/runtime": "^7.15.3",
|
|
89
93
|
"arrive": "^2.4.1",
|
|
90
94
|
"avsc": "^5.7.3",
|
|
91
95
|
"babel-plugin-transform-builtin-extend": "1.1.2",
|
|
@@ -101,7 +105,6 @@
|
|
|
101
105
|
"cbor": "5.0.1",
|
|
102
106
|
"chi-squared": "^1.1.0",
|
|
103
107
|
"codepage": "^1.15.0",
|
|
104
|
-
"core-js": "^3.16.2",
|
|
105
108
|
"crypto-api": "^0.8.5",
|
|
106
109
|
"crypto-browserify": "^3.12.0",
|
|
107
110
|
"crypto-js": "^4.1.1",
|
|
@@ -111,7 +114,6 @@
|
|
|
111
114
|
"diff": "^5.0.0",
|
|
112
115
|
"es6-promisify": "^7.0.0",
|
|
113
116
|
"escodegen": "^2.0.0",
|
|
114
|
-
"esm": "^3.2.25",
|
|
115
117
|
"esprima": "^4.0.1",
|
|
116
118
|
"exif-parser": "^0.1.12",
|
|
117
119
|
"file-saver": "^2.0.5",
|
|
@@ -133,12 +135,13 @@
|
|
|
133
135
|
"lodash": "^4.17.21",
|
|
134
136
|
"loglevel": "^1.7.1",
|
|
135
137
|
"loglevel-message-prefix": "^3.0.0",
|
|
136
|
-
"markdown-it": "^12.2
|
|
138
|
+
"markdown-it": "^12.3.2",
|
|
137
139
|
"moment": "^2.29.1",
|
|
138
140
|
"moment-timezone": "^0.5.33",
|
|
139
141
|
"ngeohash": "^0.6.3",
|
|
140
142
|
"node-forge": "^0.10.0",
|
|
141
143
|
"node-md6": "^0.1.0",
|
|
144
|
+
"node-sass": "^7.0.1",
|
|
142
145
|
"nodom": "^2.4.0",
|
|
143
146
|
"notepack.io": "^2.3.0",
|
|
144
147
|
"nwmatcher": "^1.4.4",
|
|
@@ -168,14 +171,14 @@
|
|
|
168
171
|
"scripts": {
|
|
169
172
|
"start": "npx grunt dev",
|
|
170
173
|
"build": "npx grunt prod",
|
|
171
|
-
"repl": "node src/node/repl.
|
|
172
|
-
"test": "npx grunt configTests && node --experimental-modules --no-warnings --no-deprecation tests/node/index.mjs && node --experimental-modules --no-warnings --no-deprecation tests/operations/index.mjs",
|
|
174
|
+
"repl": "node --experimental-modules --experimental-json-modules --experimental-specifier-resolution=node --no-warnings src/node/repl.mjs",
|
|
175
|
+
"test": "npx grunt configTests && node --experimental-modules --experimental-json-modules --no-warnings --no-deprecation tests/node/index.mjs && node --experimental-modules --experimental-json-modules --no-warnings --no-deprecation tests/operations/index.mjs",
|
|
173
176
|
"test-node-consumer": "npx grunt testnodeconsumer",
|
|
174
177
|
"testui": "npx grunt testui",
|
|
175
178
|
"testuidev": "npx nightwatch --env=dev",
|
|
176
179
|
"lint": "npx grunt lint",
|
|
177
180
|
"postinstall": "npx grunt exec:fixCryptoApiImports",
|
|
178
|
-
"newop": "node --experimental-modules src/core/config/scripts/newOperation.mjs",
|
|
181
|
+
"newop": "node --experimental-modules --experimental-json-modules src/core/config/scripts/newOperation.mjs",
|
|
179
182
|
"getheapsize": "node -e 'console.log(`node heap limit = ${require(\"v8\").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)'",
|
|
180
183
|
"setheapsize": "export NODE_OPTIONS=--max_old_space_size=2048"
|
|
181
184
|
}
|
package/src/core/ChefWorker.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import Chef from "./Chef.mjs";
|
|
10
|
-
import OperationConfig from "./config/OperationConfig.json";
|
|
10
|
+
import OperationConfig from "./config/OperationConfig.json" assert {type: "json"};
|
|
11
11
|
import OpModules from "./config/modules/OpModules.mjs";
|
|
12
12
|
|
|
13
13
|
// Add ">" to the start of all log messages in the Chef Worker
|
package/src/core/Recipe.mjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @license Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import OperationConfig from "./config/OperationConfig.json";
|
|
7
|
+
import OperationConfig from "./config/OperationConfig.json" assert {type: "json"};
|
|
8
8
|
import OperationError from "./errors/OperationError.mjs";
|
|
9
9
|
import Operation from "./Operation.mjs";
|
|
10
10
|
import DishError from "./errors/DishError.mjs";
|
|
@@ -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.",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import Bombe from "../../operations/Bombe.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import Entropy from "../../operations/Entropy.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import A1Z26CipherDecode from "../../operations/A1Z26CipherDecode.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import CSSBeautify from "../../operations/CSSBeautify.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import Bzip2Compress from "../../operations/Bzip2Compress.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import Adler32Checksum from "../../operations/Adler32Checksum.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import ADD from "../../operations/ADD.mjs";
|
|
@@ -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,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import Diff from "../../operations/Diff.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import CitrixCTX1Decode from "../../operations/CitrixCTX1Decode.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import BLAKE2b from "../../operations/BLAKE2b.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import AddTextToImage from "../../operations/AddTextToImage.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import OpticalCharacterRecognition from "../../operations/OpticalCharacterRecognition.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import GeneratePGPKeyPair from "../../operations/GeneratePGPKeyPair.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import ProtobufDecode from "../../operations/ProtobufDecode.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import HexToObjectIdentifier from "../../operations/HexToObjectIdentifier.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import ExtractDates from "../../operations/ExtractDates.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import AvroToJSON from "../../operations/AvroToJSON.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import DisassembleX86 from "../../operations/DisassembleX86.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import ParseURI from "../../operations/ParseURI.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import ParseUserAgent from "../../operations/ParseUserAgent.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import YARARules from "../../operations/YARARules.mjs";
|
package/src/core/lib/Magic.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import OperationConfig from "../config/OperationConfig.json";
|
|
1
|
+
import OperationConfig from "../config/OperationConfig.json" assert {type: "json"};
|
|
2
2
|
import Utils, { isWorkerEnvironment } from "../Utils.mjs";
|
|
3
3
|
import Recipe from "../Recipe.mjs";
|
|
4
4
|
import Dish from "../Dish.mjs";
|
|
@@ -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;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateOpsIndex.mjs
|
|
3
3
|
*
|
|
4
4
|
* @author n1474335 [n1474335@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright
|
|
5
|
+
* @copyright Crown Copyright 2022
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
import A1Z26CipherDecode from "./A1Z26CipherDecode.mjs";
|
|
@@ -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/api.mjs
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import NodeDish from "./NodeDish.mjs";
|
|
12
12
|
import NodeRecipe from "./NodeRecipe.mjs";
|
|
13
|
-
import OperationConfig from "../core/config/OperationConfig.json";
|
|
13
|
+
import OperationConfig from "../core/config/OperationConfig.json" assert {type: "json"};
|
|
14
14
|
import { sanitise, removeSubheadingsFromArray, sentenceToCamelCase } from "./apiUtils.mjs";
|
|
15
15
|
import ExcludedOperationError from "../core/errors/ExcludedOperationError.mjs";
|
|
16
16
|
|
|
@@ -41,7 +41,7 @@ let code = `/**
|
|
|
41
41
|
import NodeDish from "./NodeDish.mjs";
|
|
42
42
|
import { _wrap, help, bake, _explainExcludedFunction } from "./api.mjs";
|
|
43
43
|
import File from "./File.mjs";
|
|
44
|
-
import { OperationError, DishError, ExcludedOperationError } from "../core/errors/index";
|
|
44
|
+
import { OperationError, DishError, ExcludedOperationError } from "../core/errors/index.mjs";
|
|
45
45
|
import {
|
|
46
46
|
// import as core_ to avoid name clashes after wrap.
|
|
47
47
|
`;
|
|
@@ -52,7 +52,7 @@ includedOperations.forEach((op) => {
|
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
code +=`
|
|
55
|
-
} from "../core/operations/index";
|
|
55
|
+
} from "../core/operations/index.mjs";
|
|
56
56
|
|
|
57
57
|
global.File = File;
|
|
58
58
|
|
package/src/node/index.mjs
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import NodeDish from "./NodeDish.mjs";
|
|
13
13
|
import { _wrap, help, bake, _explainExcludedFunction } from "./api.mjs";
|
|
14
14
|
import File from "./File.mjs";
|
|
15
|
-
import { OperationError, DishError, ExcludedOperationError } from "../core/errors/index";
|
|
15
|
+
import { OperationError, DishError, ExcludedOperationError } from "../core/errors/index.mjs";
|
|
16
16
|
import {
|
|
17
17
|
// import as core_ to avoid name clashes after wrap.
|
|
18
18
|
A1Z26CipherDecode as core_A1Z26CipherDecode,
|
|
@@ -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,
|
|
@@ -370,7 +371,7 @@ import {
|
|
|
370
371
|
ZlibDeflate as core_ZlibDeflate,
|
|
371
372
|
ZlibInflate as core_ZlibInflate,
|
|
372
373
|
|
|
373
|
-
} from "../core/operations/index";
|
|
374
|
+
} from "../core/operations/index.mjs";
|
|
374
375
|
|
|
375
376
|
global.File = File;
|
|
376
377
|
|
|
@@ -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,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Export the main ESM module as CommonJS
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* @author d98762656 [d98762625@gmail.com]
|
|
6
|
+
* @copyright Crown Copyright 2019
|
|
7
|
+
* @license Apache-2.0
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
module.exports = (async () => await import("./index.mjs"))();
|
|
11
|
+
module.exports.File = (async () => await import("./File.mjs"))();
|
package/src/web/index.js
CHANGED
|
@@ -17,8 +17,8 @@ import * as CanvasComponents from "../core/lib/CanvasComponents.mjs";
|
|
|
17
17
|
|
|
18
18
|
// CyberChef
|
|
19
19
|
import App from "./App.mjs";
|
|
20
|
-
import Categories from "../core/config/Categories.json";
|
|
21
|
-
import OperationConfig from "../core/config/OperationConfig.json";
|
|
20
|
+
import Categories from "../core/config/Categories.json" assert {type: "json"};
|
|
21
|
+
import OperationConfig from "../core/config/OperationConfig.json" assert {type: "json"};
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
/**
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
|
|
304
304
|
#stale-indicator {
|
|
305
305
|
opacity: 1;
|
|
306
|
-
visibility:
|
|
306
|
+
visibility: visible;
|
|
307
307
|
transition: margin 0s, opacity 0.3s;
|
|
308
308
|
margin-left: 5px;
|
|
309
309
|
cursor: help;
|
|
@@ -316,7 +316,7 @@
|
|
|
316
316
|
|
|
317
317
|
#magic {
|
|
318
318
|
opacity: 1;
|
|
319
|
-
visibility:
|
|
319
|
+
visibility: visible;
|
|
320
320
|
transition: margin 0s 0.3s, opacity 0.3s 0.3s, visibility 0.3s 0.3s;
|
|
321
321
|
margin-left: 5px;
|
|
322
322
|
margin-bottom: 5px;
|
|
@@ -6,24 +6,27 @@
|
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
const chef = require("cyberchef");
|
|
10
9
|
const assert = require("assert");
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
chef.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
require("cyberchef").then(chef => {
|
|
12
|
+
|
|
13
|
+
const d = chef.bake("Testing, 1 2 3", [
|
|
14
|
+
chef.toHex,
|
|
15
|
+
chef.reverse,
|
|
16
|
+
{
|
|
17
|
+
op: chef.unique,
|
|
18
|
+
args: {
|
|
19
|
+
delimiter: "Space",
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
op: chef.multiply,
|
|
24
|
+
args: {
|
|
25
|
+
delimiter: "Space",
|
|
26
|
+
}
|
|
25
27
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
]);
|
|
29
|
+
|
|
30
|
+
assert.equal(d.value, "630957449041920");
|
|
28
31
|
|
|
29
|
-
|
|
32
|
+
});
|
|
@@ -7,8 +7,28 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import assert from "assert";
|
|
9
9
|
import chef from "cyberchef";
|
|
10
|
+
import { bake, toHex, reverse, unique, multiply } from "cyberchef";
|
|
10
11
|
|
|
11
|
-
const
|
|
12
|
+
const a = bake("Testing, 1 2 3", [
|
|
13
|
+
toHex,
|
|
14
|
+
reverse,
|
|
15
|
+
{
|
|
16
|
+
op: unique,
|
|
17
|
+
args: {
|
|
18
|
+
delimiter: "Space",
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
op: multiply,
|
|
23
|
+
args: {
|
|
24
|
+
delimiter: "Space",
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]);
|
|
28
|
+
|
|
29
|
+
assert.equal(a.value, "630957449041920");
|
|
30
|
+
|
|
31
|
+
const b = chef.bake("Testing, 1 2 3", [
|
|
12
32
|
chef.toHex,
|
|
13
33
|
chef.reverse,
|
|
14
34
|
{
|
|
@@ -25,4 +45,4 @@ const d = chef.bake("Testing, 1 2 3", [
|
|
|
25
45
|
}
|
|
26
46
|
]);
|
|
27
47
|
|
|
28
|
-
assert.equal(
|
|
48
|
+
assert.equal(b.value, "630957449041920");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import TestRegister from "../../lib/TestRegister.mjs";
|
|
2
|
-
import Categories from "../../../src/core/config/Categories.json";
|
|
3
|
-
import OperationConfig from "../../../src/core/config/OperationConfig.json";
|
|
2
|
+
import Categories from "../../../src/core/config/Categories.json" assert {type: "json"};
|
|
3
|
+
import OperationConfig from "../../../src/core/config/OperationConfig.json" assert {type: "json"};
|
|
4
4
|
import it from "../assertionHandler.mjs";
|
|
5
5
|
import assert from "assert";
|
|
6
6
|
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
CSSMinify,
|
|
33
33
|
toBase64,
|
|
34
34
|
toHex
|
|
35
|
-
} from "../../../src/node/index";
|
|
35
|
+
} from "../../../src/node/index.mjs";
|
|
36
36
|
import chef from "../../../src/node/index.mjs";
|
|
37
37
|
import TestRegister from "../../lib/TestRegister.mjs";
|
|
38
38
|
import File from "../../../src/node/File.mjs";
|
|
@@ -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";
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* @copyright Karsten Silkenbäumer 2019
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
|
-
import TestRegister from "../../lib/TestRegister";
|
|
9
|
-
import { BACON_ALPHABETS, BACON_TRANSLATIONS } from "../../../src/core/lib/Bacon";
|
|
8
|
+
import TestRegister from "../../lib/TestRegister.mjs";
|
|
9
|
+
import { BACON_ALPHABETS, BACON_TRANSLATIONS } from "../../../src/core/lib/Bacon.mjs";
|
|
10
10
|
|
|
11
11
|
const alphabets = Object.keys(BACON_ALPHABETS);
|
|
12
12
|
const translations = BACON_TRANSLATIONS;
|
|
@@ -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
|
+
]);
|
package/src/node/cjs.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Export the main ESM module as CommonJS
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* @author d98762656 [d98762625@gmail.com]
|
|
6
|
-
* @copyright Crown Copyright 2019
|
|
7
|
-
* @license Apache-2.0
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/* eslint no-global-assign: ["off"] */
|
|
11
|
-
require = require("esm")(module);
|
|
12
|
-
module.exports = require("./index.mjs");
|
|
13
|
-
module.exports.File = require("./File.mjs");
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests to ensure that a consuming app can use named imports from deep import patch
|
|
3
|
-
*
|
|
4
|
-
* @author d98762625 [d98762625@gmail.com]
|
|
5
|
-
* @copyright Crown Copyright 2019
|
|
6
|
-
* @license Apache-2.0
|
|
7
|
-
*/
|
|
8
|
-
import assert from "assert";
|
|
9
|
-
import { bake, toHex, reverse, unique, multiply } from "cyberchef/src/node/index.mjs";
|
|
10
|
-
|
|
11
|
-
const d = bake("Testing, 1 2 3", [
|
|
12
|
-
toHex,
|
|
13
|
-
reverse,
|
|
14
|
-
{
|
|
15
|
-
op: unique,
|
|
16
|
-
args: {
|
|
17
|
-
delimiter: "Space",
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
op: multiply,
|
|
22
|
-
args: {
|
|
23
|
-
delimiter: "Space",
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
]);
|
|
27
|
-
|
|
28
|
-
assert.equal(d.value, "630957449041920");
|