cyberchef 10.23.0 → 11.0.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.
Files changed (50) hide show
  1. package/.devcontainer/devcontainer.json +1 -1
  2. package/.nvmrc +1 -1
  3. package/CHANGELOG.md +79 -0
  4. package/CONTRIBUTING.md +4 -1
  5. package/Dockerfile +2 -2
  6. package/Gruntfile.js +3 -17
  7. package/README.md +3 -3
  8. package/babel.config.js +4 -1
  9. package/package.json +31 -27
  10. package/src/core/ChefWorker.js +1 -1
  11. package/src/core/Recipe.mjs +1 -1
  12. package/src/core/config/Categories.json +2 -1
  13. package/src/core/config/OperationConfig.json +54 -3
  14. package/src/core/config/modules/Default.mjs +2 -0
  15. package/src/core/config/scripts/fixCryptoApiImports.mjs +54 -0
  16. package/src/core/config/scripts/fixSnackBarMarkup.mjs +28 -0
  17. package/src/core/lib/Extract.mjs +5 -0
  18. package/src/core/lib/Magic.mjs +1 -1
  19. package/src/core/lib/ParityBit.mjs +50 -0
  20. package/src/core/operations/AnalyseUUID.mjs +109 -6
  21. package/src/core/operations/ExtractEmailAddresses.mjs +2 -3
  22. package/src/core/operations/FromPunycode.mjs +1 -1
  23. package/src/core/operations/ParityBit.mjs +128 -0
  24. package/src/core/operations/RegularExpression.mjs +2 -1
  25. package/src/core/operations/RenderMarkdown.mjs +35 -4
  26. package/src/core/operations/ShowBase64Offsets.mjs +28 -28
  27. package/src/core/operations/ToPunycode.mjs +1 -1
  28. package/src/core/operations/index.mjs +2 -0
  29. package/src/node/NodeRecipe.mjs +8 -7
  30. package/src/node/api.mjs +4 -4
  31. package/src/node/index.mjs +5 -0
  32. package/src/web/HTMLOperation.mjs +8 -2
  33. package/src/web/html/index.html +1 -1
  34. package/src/web/index.js +2 -2
  35. package/src/web/static/sitemap.mjs +1 -1
  36. package/src/web/waiters/OperationsWaiter.mjs +30 -13
  37. package/tests/lib/wasmFetchPolyfill.mjs +31 -0
  38. package/tests/node/consumers/cjs-consumer.js +2 -2
  39. package/tests/node/consumers/esm-consumer.mjs +2 -2
  40. package/tests/node/tests/Categories.mjs +2 -2
  41. package/tests/node/tests/nodeApi.mjs +55 -58
  42. package/tests/node/tests/operations.mjs +2 -3
  43. package/tests/operations/index.mjs +6 -0
  44. package/tests/operations/tests/AnalyseUUID.mjs +66 -0
  45. package/tests/operations/tests/Base64.mjs +11 -0
  46. package/tests/operations/tests/ExtractEmailAddresses.mjs +38 -12
  47. package/tests/operations/tests/Fernet.mjs +18 -3
  48. package/tests/operations/tests/ParityBit.mjs +147 -0
  49. package/tests/operations/tests/RegularExpression.mjs +75 -0
  50. package/tests/operations/tests/RenderMarkdown.mjs +110 -0
@@ -3,7 +3,7 @@
3
3
  {
4
4
  "name": "CyberChef",
5
5
  // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6
- "image": "mcr.microsoft.com/devcontainers/javascript-node:1-18-bookworm",
6
+ "image": "mcr.microsoft.com/devcontainers/javascript-node:24-trixie",
7
7
 
8
8
  // Features to add to the dev container. More info: https://containers.dev/features.
9
9
  "features": {
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 18
1
+ 24
package/CHANGELOG.md CHANGED
@@ -13,6 +13,46 @@ All major and minor version changes will be documented in this file. Details of
13
13
 
14
14
  ## Details
15
15
 
16
+ ## [11.0.0] - 2026-04-28
17
+ - Revert sitemap to v8.0.X to fix build/deploy on master [@GCHQDeveloper581] | [#2348]
18
+ - Node version update from 22 to 24 [@lzandman] [@GCHQDeveloper581] | [#2347]
19
+ - Fix XSS in Show Base64 offsets [@C85297] | [#2346]
20
+ - Make compatible with node >=22 [@GCHQDeveloper581] | [#2273]
21
+ - Fix(node): enable asynchronous operation support in Node.js API [@engin0223] [@GCHQDeveloper581] | [#2342]
22
+ - Feature: Change to nginx-unprivileged image for better kubernetes support [@hsolberg] | [#1922]
23
+
24
+ Breaking changes:
25
+ - Minimum supported node version - now v24 (was v16)
26
+ - Change of exported port on Docker Container - now 8080 (was 80)
27
+ - Node API now exports "bake" and "execute" functions as async.
28
+
29
+ <details>
30
+ <summary>Click to expand v10 minor versions</summary>
31
+
32
+ ### [10.24.0] - 2026-04-27
33
+ - Update CONTRIBUTING.md [@GCHQDeveloper581] | [#2333]
34
+ - Fix, and link, Fernet tests [@GCHQDeveloper581] | [#2335]
35
+ - [#927] added parity bit operation [@j83305] | [#1036]
36
+ - Feature md link blanks [@BjoernAkAManf] [@GCHQDeveloper581] | [#660]
37
+ - Accessibility - Add support for screenreaders in operations search [@mattnotmitt] | [#1862]
38
+ - Added metadata extraction for UUID strings. [@ko80240] | [#2322]
39
+ - chore (deps): bump the patch-updates group with 6 updates | [#2330]
40
+ - chore (deps): bump @codemirror/search from 6.6.0 to 6.7.0 | [#2331]
41
+ - (Feature) Improve CI [@GCHQDeveloper581] | [#2328]
42
+ - Update dependabot.yml [@GCHQDeveloper581] | [#2326]
43
+ - chore (deps): bump lodash, grunt-legacy-log and grunt-legacy-util | [#2327]
44
+ - chore (deps): bump the patch-updates group with 6 updates [@GCHQDeveloper581] | [#2323]
45
+ - chore (deps): bump autoprefixer from 10.4.27 to 10.5.0 | [#2324]
46
+ - chore (deps): bump dompurify from 3.3.3 to 3.4.0 | [#2321]
47
+ - chore (deps): bump follow-redirects from 1.15.11 to 1.16.0 | [#2320]
48
+ - Regular Expression operation email address regex: Support IPv4 domains [@C85297] [@GCHQDeveloper581] | [#2167]
49
+ - Rewriting fixCryptoApiImports and fixSnackbarMarkup to js to make it OS agnostic [@BigYellowHammer] | [#2298]
50
+ - chore (deps): bump basic-ftp from 5.2.1 to 5.2.2 | [#2317]
51
+ - chore (deps): bump axios from 1.13.6 to 1.15.0 | [#2316]
52
+ - chore (deps): bump webpack from 5.105.4 to 5.106.0 | [#2315]
53
+ - chore (deps): bump basic-ftp from 5.2.0 to 5.2.1 | [#2313]
54
+ - Update vulnerable dependencies [@GCHQDeveloper581] | [#2311]
55
+
16
56
  ### [10.23.0] - 2026-04-06
17
57
  - Properly escape HTML entities in sampleDelim to avoid XSS issue [@GCHQDeveloper581] | [#2307]
18
58
  - chore (deps): bump lodash from 4.17.23 to 4.18.1 | [#2304]
@@ -253,6 +293,8 @@ All major and minor version changes will be documented in this file. Details of
253
293
  - Added 'Levenshtein Distance' operation [@mikecat] | [#1498]
254
294
  - Added 'Swap case' operation [@mikecat] | [#1499]
255
295
 
296
+ </details>
297
+
256
298
  ## [10.0.0] - 2023-03-22
257
299
  - [Full details explained here](https://github.com/gchq/CyberChef/wiki/Character-encoding,-EOL-separators,-and-editor-features)
258
300
  - Status bars added to the Input and Output [@n1474335] | [#1405]
@@ -596,6 +638,8 @@ All major and minor version changes will be documented in this file. Details of
596
638
  ## [4.0.0] - 2016-11-28
597
639
  - Initial open source commit [@n1474335] | [b1d73a72](https://github.com/gchq/CyberChef/commit/b1d73a725dc7ab9fb7eb789296efd2b7e4b08306)
598
640
 
641
+ [11.0.0]: https://github.com/gchq/CyberChef/releases/tag/v11.0.0
642
+ [10.24.0]: https://github.com/gchq/CyberChef/releases/tag/v10.24.0
599
643
  [10.23.0]: https://github.com/gchq/CyberChef/releases/tag/v10.23.0
600
644
  [10.22.0]: https://github.com/gchq/CyberChef/releases/tag/v10.22.0
601
645
  [10.21.0]: https://github.com/gchq/CyberChef/releases/tag/v10.21.0
@@ -872,6 +916,13 @@ All major and minor version changes will be documented in this file. Details of
872
916
  [@aby-jo]: https://github.com/aby-jo
873
917
  [@atsiv1]: https://github.com/atsiv1
874
918
  [@fjh1997]: https://github.com/fjh1997
919
+ [@j83305]: https://github.com/j83305
920
+ [@BjoernAkAManf]: https://github.com/BjoernAkAManf
921
+ [@ko80240]: https://github.com/ko80240
922
+ [@BigYellowHammer]: https://github.com/BigYellowHammer
923
+ [@hsolberg]: https://github.com/hsolberg
924
+ [@lzandman]: https://github.com/lzandman
925
+ [@engin0223]: https://github.com/engin0223
875
926
 
876
927
 
877
928
  [8ad18b]: https://github.com/gchq/CyberChef/commit/8ad18bc7db6d9ff184ba3518686293a7685bf7b7
@@ -1141,4 +1192,32 @@ All major and minor version changes will be documented in this file. Details of
1141
1192
  [#2194]: https://github.com/gchq/CyberChef/pull/2194
1142
1193
  [#2193]: https://github.com/gchq/CyberChef/pull/2193
1143
1194
  [#2192]: https://github.com/gchq/CyberChef/pull/2192
1195
+ [#2333]: https://github.com/gchq/CyberChef/pull/2333
1196
+ [#2335]: https://github.com/gchq/CyberChef/pull/2335
1197
+ [#1036]: https://github.com/gchq/CyberChef/pull/1036
1198
+ [#660]: https://github.com/gchq/CyberChef/pull/660
1199
+ [#1862]: https://github.com/gchq/CyberChef/pull/1862
1200
+ [#2322]: https://github.com/gchq/CyberChef/pull/2322
1201
+ [#2330]: https://github.com/gchq/CyberChef/pull/2330
1202
+ [#2331]: https://github.com/gchq/CyberChef/pull/2331
1203
+ [#2328]: https://github.com/gchq/CyberChef/pull/2328
1204
+ [#2326]: https://github.com/gchq/CyberChef/pull/2326
1205
+ [#2327]: https://github.com/gchq/CyberChef/pull/2327
1206
+ [#2323]: https://github.com/gchq/CyberChef/pull/2323
1207
+ [#2324]: https://github.com/gchq/CyberChef/pull/2324
1208
+ [#2321]: https://github.com/gchq/CyberChef/pull/2321
1209
+ [#2320]: https://github.com/gchq/CyberChef/pull/2320
1210
+ [#2167]: https://github.com/gchq/CyberChef/pull/2167
1211
+ [#2298]: https://github.com/gchq/CyberChef/pull/2298
1212
+ [#2317]: https://github.com/gchq/CyberChef/pull/2317
1213
+ [#2316]: https://github.com/gchq/CyberChef/pull/2316
1214
+ [#2315]: https://github.com/gchq/CyberChef/pull/2315
1215
+ [#2313]: https://github.com/gchq/CyberChef/pull/2313
1216
+ [#2311]: https://github.com/gchq/CyberChef/pull/2311
1217
+ [#2348]: https://github.com/gchq/CyberChef/pull/2348
1218
+ [#2347]: https://github.com/gchq/CyberChef/pull/2347
1219
+ [#2346]: https://github.com/gchq/CyberChef/pull/2346
1220
+ [#2273]: https://github.com/gchq/CyberChef/pull/2273
1221
+ [#2342]: https://github.com/gchq/CyberChef/pull/2342
1222
+ [#1922]: https://github.com/gchq/CyberChef/pull/1922
1144
1223
 
package/CONTRIBUTING.md CHANGED
@@ -6,10 +6,13 @@ There are lots of opportunities to contribute to CyberChef. If you want ideas, t
6
6
 
7
7
  Before your contributions can be accepted, you must:
8
8
 
9
- - Sign the [GCHQ Contributor Licence Agreement](https://cla-assistant.io/gchq/CyberChef)
9
+ - Fork the CyberChef repo
10
+ - Create a new branch within your fork for the changes
10
11
  - Push your changes to your fork.
12
+ - Sign the [GCHQ Contributor Licence Agreement](https://cla-assistant.io/gchq/CyberChef)
11
13
  - Submit a pull request.
12
14
 
15
+ Please note that we will ***reject*** pull requests from the master branch of your fork owing to the mess it makes of our own working repositories and the extra work entailed.
13
16
 
14
17
  ## Coding conventions
15
18
 
package/Dockerfile CHANGED
@@ -4,7 +4,7 @@
4
4
  # Modifier --platform=$BUILDPLATFORM limits the platform to "BUILDPLATFORM" during buildx multi-platform builds
5
5
  # This is because npm "chromedriver" package is not compatiable with all platforms
6
6
  # For more info see: https://docs.docker.com/build/building/multi-platform/#cross-compilation
7
- FROM --platform=$BUILDPLATFORM node:18-alpine AS builder
7
+ FROM --platform=$BUILDPLATFORM node:24-alpine AS builder
8
8
 
9
9
  WORKDIR /app
10
10
 
@@ -27,7 +27,7 @@ RUN npm run build
27
27
  #########################################
28
28
  # Package static build files into nginx #
29
29
  #########################################
30
- FROM nginx:stable-alpine AS cyberchef
30
+ FROM nginxinc/nginx-unprivileged:stable-alpine AS cyberchef
31
31
 
32
32
  LABEL maintainer="GCHQ <oss@gchq.gov.uk>"
33
33
 
package/Gruntfile.js CHANGED
@@ -6,7 +6,7 @@ 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";
9
+ const nodeFlags = "--no-warnings --no-deprecation";
10
10
 
11
11
  /**
12
12
  * Grunt configuration for building the app in various formats.
@@ -411,25 +411,11 @@ module.exports = function (grunt) {
411
411
  stdout: false,
412
412
  },
413
413
  fixCryptoApiImports: {
414
- command: function () {
415
- switch (process.platform) {
416
- case "darwin":
417
- return `find ./node_modules/crypto-api/src/ \\( -type d -name .git -prune \\) -o -type f -print0 | xargs -0 sed -i '' -e '/\\.mjs/!s/\\(from "\\.[^"]*\\)";/\\1.mjs";/g'`;
418
- default:
419
- return `find ./node_modules/crypto-api/src/ \\( -type d -name .git -prune \\) -o -type f -print0 | xargs -0 sed -i -e '/\\.mjs/!s/\\(from "\\.[^"]*\\)";/\\1.mjs";/g'`;
420
- }
421
- },
414
+ command: `node ${nodeFlags} src/core/config/scripts/fixCryptoApiImports.mjs`,
422
415
  stdout: false
423
416
  },
424
417
  fixSnackbarMarkup: {
425
- command: function () {
426
- switch (process.platform) {
427
- case "darwin":
428
- return `sed -i '' 's/<div id=snackbar-container\\/>/<div id=snackbar-container>/g' ./node_modules/snackbarjs/src/snackbar.js`;
429
- default:
430
- return `sed -i 's/<div id=snackbar-container\\/>/<div id=snackbar-container>/g' ./node_modules/snackbarjs/src/snackbar.js`;
431
- }
432
- },
418
+ command: `node ${nodeFlags} src/core/config/scripts/fixSnackBarMarkup.mjs`,
433
419
  stdout: false
434
420
  },
435
421
  },
package/README.md CHANGED
@@ -36,7 +36,7 @@ docker build --tag cyberchef --ulimit nofile=10000 .
36
36
  ```
37
37
  2. Run the docker container
38
38
  ```bash
39
- docker run -it -p 8080:80 cyberchef
39
+ docker run -it -p 8080:8080 cyberchef
40
40
  ```
41
41
  3. Navigate to `http://localhost:8080` in your browser
42
42
 
@@ -45,7 +45,7 @@ docker run -it -p 8080:80 cyberchef
45
45
  If you prefer to skip the build process, you can use the pre-built image
46
46
 
47
47
  ```bash
48
- docker run -it -p 8080:80 ghcr.io/gchq/cyberchef:latest
48
+ docker run -it -p 8080:8080 ghcr.io/gchq/cyberchef:latest
49
49
  ```
50
50
 
51
51
  Just like before, navigate to `http://localhost:8080` in your browser.
@@ -120,7 +120,7 @@ CyberChef is built to support
120
120
 
121
121
  ## Node.js support
122
122
 
123
- CyberChef is built to fully support Node.js `v16`. For more information, see the ["Node API" wiki page](https://github.com/gchq/CyberChef/wiki/Node-API)
123
+ CyberChef is built to fully support Node.js `v24`. For more information, see the ["Node API" wiki page](https://github.com/gchq/CyberChef/wiki/Node-API)
124
124
 
125
125
 
126
126
  ## Contributing
package/babel.config.js CHANGED
@@ -16,6 +16,9 @@ module.exports = function(api) {
16
16
  "regenerator": true
17
17
  }
18
18
  ]
19
- ]
19
+ ],
20
+ "generatorOpts": {
21
+ "importAttributesKeyword": "with"
22
+ }
20
23
  };
21
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cyberchef",
3
- "version": "10.23.0",
3
+ "version": "11.0.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",
@@ -36,7 +36,7 @@
36
36
  "browserslist": [
37
37
  "Chrome >= 50",
38
38
  "Firefox >= 38",
39
- "node >= 16"
39
+ "node >= 24"
40
40
  ],
41
41
  "devDependencies": {
42
42
  "@babel/eslint-parser": "^7.28.6",
@@ -46,24 +46,24 @@
46
46
  "@babel/runtime": "^7.29.2",
47
47
  "@codemirror/commands": "^6.10.3",
48
48
  "@codemirror/language": "^6.12.3",
49
- "@codemirror/search": "^6.6.0",
49
+ "@codemirror/search": "^6.7.0",
50
50
  "@codemirror/state": "^6.5.4",
51
- "@codemirror/view": "^6.41.0",
52
- "autoprefixer": "^10.4.27",
51
+ "@codemirror/view": "^6.41.1",
52
+ "autoprefixer": "^10.5.0",
53
53
  "babel-loader": "^10.1.1",
54
54
  "base64-loader": "^1.0.0",
55
55
  "chromedriver": "^146.0.6",
56
56
  "cli-progress": "^3.12.0",
57
57
  "colors": "^1.4.0",
58
- "compression-webpack-plugin": "^11.1.0",
59
- "copy-webpack-plugin": "^13.0.1",
58
+ "compression-webpack-plugin": "^12.0.0",
59
+ "copy-webpack-plugin": "^14.0.0",
60
60
  "core-js": "^3.49.0",
61
- "cspell": "^8.19.4",
62
- "css-loader": "7.1.4",
61
+ "cspell": "^9.7.0",
62
+ "css-loader": "^7.1.4",
63
63
  "eslint": "^9.39.4",
64
64
  "eslint-plugin-jsdoc": "^50.8.0",
65
- "globals": "^15.15.0",
66
- "grunt": "^1.6.1",
65
+ "globals": "^17.4.0",
66
+ "grunt": "^1.6.2",
67
67
  "grunt-chmod": "~1.1.1",
68
68
  "grunt-concurrent": "^3.0.0",
69
69
  "grunt-contrib-clean": "~2.0.1",
@@ -74,21 +74,21 @@
74
74
  "grunt-exec": "~3.0.0",
75
75
  "grunt-webpack": "^6.0.0",
76
76
  "grunt-zip": "^1.0.0",
77
- "html-webpack-plugin": "^5.6.6",
77
+ "html-webpack-plugin": "^5.6.7",
78
78
  "imports-loader": "^5.0.0",
79
79
  "mini-css-extract-plugin": "2.10.2",
80
80
  "modify-source-webpack-plugin": "^4.1.0",
81
81
  "nightwatch": "^3.15.0",
82
- "postcss": "^8.5.8",
82
+ "postcss": "^8.5.10",
83
83
  "postcss-css-variables": "^0.19.0",
84
84
  "postcss-import": "^16.1.1",
85
85
  "postcss-loader": "^8.2.1",
86
86
  "prompt": "^1.3.0",
87
87
  "sitemap": "^8.0.3",
88
- "terser": "^5.46.1",
89
- "webpack": "^5.105.4",
90
- "webpack-bundle-analyzer": "^4.10.2",
91
- "webpack-dev-server": "5.0.4",
88
+ "terser": "^5.46.2",
89
+ "webpack": "^5.106.2",
90
+ "webpack-bundle-analyzer": "^5.0.0",
91
+ "webpack-dev-server": "^5.0.4",
92
92
  "webpack-node-externals": "^3.0.0",
93
93
  "worker-loader": "^3.0.8"
94
94
  },
@@ -97,7 +97,7 @@
97
97
  "@astronautlabs/amf": "^0.0.6",
98
98
  "@blu3r4y/lzma": "^2.3.3",
99
99
  "@wavesenterprise/crypto-gost-js": "^2.1.0-RC1",
100
- "@xmldom/xmldom": "^0.8.12",
100
+ "@xmldom/xmldom": "^0.8.13",
101
101
  "argon2-browser": "^1.18.0",
102
102
  "arrive": "^2.5.3",
103
103
  "assert": "^2.1.0",
@@ -121,7 +121,7 @@
121
121
  "d3": "7.9.0",
122
122
  "d3-hexbin": "^0.2.2",
123
123
  "diff": "^5.2.2",
124
- "dompurify": "^3.3.3",
124
+ "dompurify": "^3.4.1",
125
125
  "es6-promisify": "^7.0.0",
126
126
  "escodegen": "^2.1.0",
127
127
  "esprima": "^4.0.1",
@@ -135,7 +135,7 @@
135
135
  "hash-wasm": "^4.12.0",
136
136
  "highlight.js": "^11.11.1",
137
137
  "ieee754": "^1.2.1",
138
- "jimp": "^1.6.0",
138
+ "jimp": "1.6.0",
139
139
  "jq-web": "^0.5.1",
140
140
  "jquery": "3.7.1",
141
141
  "js-sha3": "^0.9.3",
@@ -145,7 +145,7 @@
145
145
  "jsonpath-plus": "^10.4.0",
146
146
  "jsonwebtoken": "9.0.3",
147
147
  "jsqr": "^1.4.0",
148
- "jsrsasign": "^11.1.1",
148
+ "jsrsasign": "^11.1.3",
149
149
  "kbpgp": "^2.1.17",
150
150
  "libbzip2-wasm": "0.0.4",
151
151
  "libyara-wasm": "^1.2.1",
@@ -164,11 +164,12 @@
164
164
  "notepack.io": "^3.0.1",
165
165
  "ntlm": "^0.1.3",
166
166
  "nwmatcher": "^1.4.4",
167
- "otpauth": "9.3.6",
167
+ "otpauth": "^9.5.0",
168
168
  "path": "^0.12.7",
169
169
  "popper.js": "^1.16.1",
170
170
  "process": "^0.11.10",
171
- "protobufjs": "^7.5.4",
171
+ "protobufjs": "^7.5.5",
172
+ "punycode.js": "^2.3.1",
172
173
  "qr-image": "^3.2.0",
173
174
  "reflect-metadata": "^0.2.2",
174
175
  "rison": "^0.1.1",
@@ -194,18 +195,21 @@
194
195
  "start": "npx grunt dev",
195
196
  "build": "npx grunt prod",
196
197
  "node": "npx grunt node",
197
- "repl": "node --experimental-modules --experimental-json-modules --experimental-specifier-resolution=node --no-experimental-fetch --no-warnings src/node/repl.mjs",
198
- "test": "npx grunt configTests && node --experimental-modules --experimental-json-modules --no-warnings --no-deprecation --openssl-legacy-provider --no-experimental-fetch tests/node/index.mjs && node --experimental-modules --experimental-json-modules --no-warnings --no-deprecation --openssl-legacy-provider --no-experimental-fetch --trace-uncaught tests/operations/index.mjs",
198
+ "repl": "node --no-warnings src/node/repl.mjs",
199
+ "test": "npx grunt configTests && node --no-warnings --no-deprecation --openssl-legacy-provider tests/node/index.mjs && node --no-warnings --no-deprecation --openssl-legacy-provider --trace-uncaught tests/operations/index.mjs",
199
200
  "testnodeconsumer": "npx grunt testnodeconsumer",
200
201
  "testui": "npx grunt testui",
201
202
  "testuidev": "npx nightwatch --env=dev",
202
203
  "lint": "npx grunt lint",
203
204
  "lint:grammar": "cspell ./src",
204
205
  "postinstall": "npx grunt exec:fixCryptoApiImports && npx grunt exec:fixSnackbarMarkup",
205
- "newop": "node --experimental-modules --experimental-json-modules src/core/config/scripts/newOperation.mjs",
206
- "minor": "node --experimental-modules --experimental-json-modules src/core/config/scripts/newMinorVersion.mjs && npm version minor --git-tag-version=false && echo \"Updated to version v$(npm pkg get version | xargs), please create a pull request and once merged use 'npm run tag'\"",
206
+ "newop": "node src/core/config/scripts/newOperation.mjs",
207
+ "minor": "node src/core/config/scripts/newMinorVersion.mjs && npm version minor --git-tag-version=false && echo \"Updated to version v$(npm pkg get version | xargs), please create a pull request and once merged use 'npm run tag'\"",
207
208
  "tag": "git tag -s \"v$(npm pkg get version | xargs)\" -m \"$(npm pkg get version | xargs)\" && echo \"Created v$(npm pkg get version | xargs), now check and push the tag\"",
208
209
  "getheapsize": "node -e 'console.log(`node heap limit = ${require(\"v8\").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)'",
209
210
  "setheapsize": "export NODE_OPTIONS=--max_old_space_size=2048"
211
+ },
212
+ "engines": {
213
+ "node": ">=24 <25"
210
214
  }
211
215
  }
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import Chef from "./Chef.mjs";
10
- import OperationConfig from "./config/OperationConfig.json" assert {type: "json"};
10
+ import OperationConfig from "./config/OperationConfig.json" with { type: "json" };
11
11
  import OpModules from "./config/modules/OpModules.mjs";
12
12
  import loglevelMessagePrefix from "loglevel-message-prefix";
13
13
 
@@ -4,7 +4,7 @@
4
4
  * @license Apache-2.0
5
5
  */
6
6
 
7
- import OperationConfig from "./config/OperationConfig.json" assert {type: "json"};
7
+ import OperationConfig from "./config/OperationConfig.json" with { 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";
@@ -465,7 +465,8 @@
465
465
  "Luhn Checksum",
466
466
  "CRC Checksum",
467
467
  "TCP/IP Checksum",
468
- "XOR Checksum"
468
+ "XOR Checksum",
469
+ "Parity Bit"
469
470
  ]
470
471
  },
471
472
  {
@@ -702,13 +702,19 @@
702
702
  },
703
703
  "Analyse UUID": {
704
704
  "module": "Crypto",
705
- "description": "Tries to determine information about a given UUID and suggests which version may have been used to generate it",
705
+ "description": "Operation for extracting metadata and detecting the version of a given UUID.",
706
706
  "infoURL": "https://wikipedia.org/wiki/Universally_unique_identifier",
707
707
  "inputType": "string",
708
708
  "outputType": "string",
709
709
  "flowControl": false,
710
710
  "manualBake": false,
711
- "args": []
711
+ "args": [
712
+ {
713
+ "name": "Include Metadata",
714
+ "type": "boolean",
715
+ "value": true
716
+ }
717
+ ]
712
718
  },
713
719
  "Argon2": {
714
720
  "module": "Crypto",
@@ -13218,6 +13224,46 @@
13218
13224
  }
13219
13225
  ]
13220
13226
  },
13227
+ "Parity Bit": {
13228
+ "module": "Default",
13229
+ "description": "A parity bit, or check bit, is the simplest form of error detection. It is a bit which is added to a string of bits and represents if the number of 1's in the binary string is an even number or odd number.<br><br>If a delimiter is specified, the parity bit calculation will be performed on each 'block' of the input data, where the blocks are created by slicing the input at each occurence of the delimiter character",
13230
+ "infoURL": "https://wikipedia.org/wiki/Parity_bit",
13231
+ "inputType": "string",
13232
+ "outputType": "string",
13233
+ "flowControl": false,
13234
+ "manualBake": false,
13235
+ "args": [
13236
+ {
13237
+ "name": "Mode",
13238
+ "type": "option",
13239
+ "value": [
13240
+ "Even Parity",
13241
+ "Odd Parity"
13242
+ ]
13243
+ },
13244
+ {
13245
+ "name": "Postion",
13246
+ "type": "option",
13247
+ "value": [
13248
+ "Start",
13249
+ "End"
13250
+ ]
13251
+ },
13252
+ {
13253
+ "name": "Encode or Decode",
13254
+ "type": "option",
13255
+ "value": [
13256
+ "Encode",
13257
+ "Decode"
13258
+ ]
13259
+ },
13260
+ {
13261
+ "name": "Delimiter",
13262
+ "type": "shortString",
13263
+ "value": ""
13264
+ }
13265
+ ]
13266
+ },
13221
13267
  "Parse ASN.1 hex string": {
13222
13268
  "module": "PublicKey",
13223
13269
  "description": "Abstract Syntax Notation One (ASN.1) is a standard and notation that describes rules and structures for representing, encoding, transmitting, and decoding data in telecommunications and computer networking.<br><br>This operation parses arbitrary ASN.1 data (encoded as an hex string: use the 'To Hex' operation if necessary) and presents the resulting tree.",
@@ -15436,7 +15482,7 @@
15436
15482
  },
15437
15483
  {
15438
15484
  "name": "Email address",
15439
- "value": "(?:[\\u00A0-\\uD7FF\\uE000-\\uFFFFa-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[\\u00A0-\\uD7FF\\uE000-\\uFFFFa-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[\\u00A0-\\uD7FF\\uE000-\\uFFFFa-z0-9](?:[\\u00A0-\\uD7FF\\uE000-\\uFFFF-a-z0-9-]*[\\u00A0-\\uD7FF\\uE000-\\uFFFFa-z0-9])?\\.)+[\\u00A0-\\uD7FF\\uE000-\\uFFFFa-z0-9](?:[\\u00A0-\\uD7FF\\uE000-\\uFFFFa-z0-9-]*[\\u00A0-\\uD7FF\\uE000-\\uFFFFa-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}\\])"
15485
+ "value": "(?:[\\u00A0-\\uD7FF\\uE000-\\uFFFFa-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[\\u00A0-\\uD7FF\\uE000-\\uFFFFa-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[\\u00A0-\\uD7FF\\uE000-\\uFFFFa-z0-9](?:[\\u00A0-\\uD7FF\\uE000-\\uFFFFa-z0-9-]*[\\u00A0-\\uD7FF\\uE000-\\uFFFFa-z0-9])?\\.)+[\\u00A0-\\uD7FF\\uE000-\\uFFFFa-z0-9](?:[\\u00A0-\\uD7FF\\uE000-\\uFFFFa-z0-9-]*[\\u00A0-\\uD7FF\\uE000-\\uFFFFa-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\])"
15440
15486
  },
15441
15487
  {
15442
15488
  "name": "URL",
@@ -15660,6 +15706,11 @@
15660
15706
  "name": "Enable syntax highlighting",
15661
15707
  "type": "boolean",
15662
15708
  "value": true
15709
+ },
15710
+ {
15711
+ "name": "Open links in new tab.",
15712
+ "type": "boolean",
15713
+ "value": false
15663
15714
  }
15664
15715
  ]
15665
15716
  },
@@ -115,6 +115,7 @@ import PHPDeserialize from "../../operations/PHPDeserialize.mjs";
115
115
  import PHPSerialize from "../../operations/PHPSerialize.mjs";
116
116
  import PLISTViewer from "../../operations/PLISTViewer.mjs";
117
117
  import PadLines from "../../operations/PadLines.mjs";
118
+ import ParityBit from "../../operations/ParityBit.mjs";
118
119
  import ParseColourCode from "../../operations/ParseColourCode.mjs";
119
120
  import ParseDateTime from "../../operations/ParseDateTime.mjs";
120
121
  import ParseEthernetFrame from "../../operations/ParseEthernetFrame.mjs";
@@ -324,6 +325,7 @@ OpModules.Default = {
324
325
  "PHP Serialize": PHPSerialize,
325
326
  "P-list Viewer": PLISTViewer,
326
327
  "Pad lines": PadLines,
328
+ "Parity Bit": ParityBit,
327
329
  "Parse colour code": ParseColourCode,
328
330
  "Parse DateTime": ParseDateTime,
329
331
  "Parse Ethernet frame": ParseEthernetFrame,
@@ -0,0 +1,54 @@
1
+ /**
2
+ * This script updates crypto-api package
3
+ * It adds .mjs to local imports where its missing
4
+ *
5
+ * before:
6
+ * import foo from "./bar";
7
+ * after
8
+ * import foo from "./bar.mjs";
9
+ *
10
+ */
11
+
12
+ /* eslint no-console: ["off"] */
13
+
14
+ import { readdirSync, readFileSync, writeFileSync } from "fs";
15
+ import { join } from "path";
16
+
17
+ // Base directory of crypto-api source
18
+ const baseDir = join(process.cwd(), "node_modules/crypto-api/src");
19
+
20
+ /**
21
+ * Recursively walk a directory, updating import statements
22
+ * to include ".mjs" if missing
23
+ */
24
+ function walk(dir) {
25
+ const entries = readdirSync(dir, { withFileTypes: true });
26
+
27
+ for (const entry of entries) {
28
+ if (entry.name === ".git") continue;
29
+
30
+ const fullPath = join(dir, entry.name);
31
+
32
+ if (entry.isDirectory()) {
33
+ walk(fullPath);
34
+ } else if (entry.isFile()) {
35
+ const content = readFileSync(fullPath, "utf8");
36
+
37
+ // Add .mjs to imports if not present
38
+ const updated = content.replace(
39
+ /from "(\.[^"]*)";/g,
40
+ (match, p1) => {
41
+ if (p1.endsWith(".mjs")) return match;
42
+ return `from "${p1}.mjs";`;
43
+ }
44
+ );
45
+
46
+ if (updated !== content) {
47
+ writeFileSync(fullPath, updated, "utf8");
48
+ }
49
+ }
50
+ }
51
+ }
52
+
53
+ // Run the walker
54
+ walk(baseDir);
@@ -0,0 +1,28 @@
1
+ /**
2
+ * This script updates snackbarjs package
3
+ * Replaces self-closing div with standard opening div
4
+ *
5
+ * before:
6
+ * <div id=snackbar-container/>
7
+ * after:
8
+ * <div id=snackbar-container>
9
+ *
10
+ */
11
+
12
+ /* eslint no-console: ["off"] */
13
+
14
+ import { readFileSync, writeFileSync } from "fs";
15
+ import { join } from "path";
16
+
17
+ // Base directory of snackbarjs source
18
+ const filePath = join(process.cwd(), "node_modules/snackbarjs/src/snackbar.js");
19
+
20
+ const content = readFileSync(filePath, "utf8");
21
+
22
+ // Replace self-closing div with standard opening div
23
+ const updated = content.replace(
24
+ /<div id=snackbar-container\/>/g,
25
+ "<div id=snackbar-container>"
26
+ );
27
+
28
+ writeFileSync(filePath, updated, "utf8");
@@ -45,6 +45,11 @@ export function search(input, searchRegex, removeRegex=null, sortBy=null, unique
45
45
  return results;
46
46
  }
47
47
 
48
+ /**
49
+ * Email regular expression
50
+ */
51
+ export const EMAIL_REGEX = /(?:[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9](?:[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9-]*[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9])?\.)+[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9](?:[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9-]*[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\])/ig;
52
+
48
53
 
49
54
  /**
50
55
  * URL regular expression
@@ -1,4 +1,4 @@
1
- import OperationConfig from "../config/OperationConfig.json" assert {type: "json"};
1
+ import OperationConfig from "../config/OperationConfig.json" with { type: "json" };
2
2
  import Utils, { isWorkerEnvironment } from "../Utils.mjs";
3
3
  import Recipe from "../Recipe.mjs";
4
4
  import Dish from "../Dish.mjs";