cyberchef 10.22.0 → 10.23.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 (121) hide show
  1. package/CHANGELOG.md +131 -0
  2. package/CONTRIBUTING.md +37 -0
  3. package/Dockerfile +2 -0
  4. package/Gruntfile.js +0 -12
  5. package/README.md +1 -1
  6. package/babel.config.js +0 -6
  7. package/package.json +63 -62
  8. package/src/core/Chef.mjs +8 -1
  9. package/src/core/Ingredient.mjs +5 -2
  10. package/src/core/Operation.mjs +6 -1
  11. package/src/core/Recipe.mjs +10 -5
  12. package/src/core/config/Categories.json +18 -3
  13. package/src/core/config/OperationConfig.json +22310 -0
  14. package/src/core/config/modules/Bletchley.mjs +28 -0
  15. package/src/core/config/modules/Charts.mjs +24 -0
  16. package/src/core/config/modules/Ciphers.mjs +128 -0
  17. package/src/core/config/modules/Code.mjs +60 -0
  18. package/src/core/config/modules/Compression.mjs +52 -0
  19. package/src/core/config/modules/Crypto.mjs +134 -0
  20. package/src/core/config/modules/Default.mjs +424 -0
  21. package/src/core/config/modules/Diff.mjs +16 -0
  22. package/src/core/config/modules/Encodings.mjs +42 -0
  23. package/src/core/config/modules/Handlebars.mjs +16 -0
  24. package/src/core/config/modules/Hashing.mjs +30 -0
  25. package/src/core/config/modules/Image.mjs +70 -0
  26. package/src/core/config/modules/Jq.mjs +16 -0
  27. package/src/core/config/modules/OCR.mjs +16 -0
  28. package/src/core/config/modules/OpModules.mjs +63 -0
  29. package/src/core/config/modules/PGP.mjs +26 -0
  30. package/src/core/config/modules/Protobuf.mjs +18 -0
  31. package/src/core/config/modules/PublicKey.mjs +36 -0
  32. package/src/core/config/modules/Regex.mjs +40 -0
  33. package/src/core/config/modules/Serialise.mjs +26 -0
  34. package/src/core/config/modules/Shellcode.mjs +18 -0
  35. package/src/core/config/modules/URL.mjs +20 -0
  36. package/src/core/config/modules/UserAgent.mjs +16 -0
  37. package/src/core/config/modules/Yara.mjs +16 -0
  38. package/src/core/lib/AudioBytes.mjs +103 -0
  39. package/src/core/lib/AudioMetaSchema.mjs +82 -0
  40. package/src/core/lib/AudioParsers.mjs +630 -0
  41. package/src/core/lib/BigIntUtils.mjs +73 -0
  42. package/src/core/lib/Modhex.mjs +2 -0
  43. package/src/core/lib/QRCode.mjs +30 -10
  44. package/src/core/lib/RC6.mjs +625 -0
  45. package/src/core/operations/A1Z26CipherDecode.mjs +1 -1
  46. package/src/core/operations/AddTextToImage.mjs +116 -64
  47. package/src/core/operations/BlurImage.mjs +10 -12
  48. package/src/core/operations/ContainImage.mjs +50 -40
  49. package/src/core/operations/ConvertImageFormat.mjs +33 -39
  50. package/src/core/operations/CoverImage.mjs +39 -37
  51. package/src/core/operations/CropImage.mjs +35 -21
  52. package/src/core/operations/DisassembleARM.mjs +193 -0
  53. package/src/core/operations/DitherImage.mjs +8 -8
  54. package/src/core/operations/EscapeUnicodeCharacters.mjs +0 -17
  55. package/src/core/operations/ExtractAudioMetadata.mjs +175 -0
  56. package/src/core/operations/ExtractLSB.mjs +17 -11
  57. package/src/core/operations/ExtractRGBA.mjs +12 -10
  58. package/src/core/operations/FlaskSessionDecode.mjs +80 -0
  59. package/src/core/operations/FlaskSessionSign.mjs +89 -0
  60. package/src/core/operations/FlaskSessionVerify.mjs +136 -0
  61. package/src/core/operations/FlipImage.mjs +14 -10
  62. package/src/core/operations/GenerateImage.mjs +39 -32
  63. package/src/core/operations/ImageBrightnessContrast.mjs +10 -10
  64. package/src/core/operations/ImageFilter.mjs +14 -13
  65. package/src/core/operations/ImageHueSaturationLightness.mjs +22 -20
  66. package/src/core/operations/ImageOpacity.mjs +6 -8
  67. package/src/core/operations/InvertImage.mjs +4 -6
  68. package/src/core/operations/Jq.mjs +12 -4
  69. package/src/core/operations/NormaliseImage.mjs +5 -7
  70. package/src/core/operations/OffsetChecker.mjs +1 -1
  71. package/src/core/operations/ParseEthernetFrame.mjs +112 -0
  72. package/src/core/operations/ParseIPv4Header.mjs +23 -6
  73. package/src/core/operations/ParseQRCode.mjs +13 -13
  74. package/src/core/operations/PseudoRandomIntegerGenerator.mjs +164 -0
  75. package/src/core/operations/RC6Decrypt.mjs +119 -0
  76. package/src/core/operations/RC6Encrypt.mjs +119 -0
  77. package/src/core/operations/RandomizeColourPalette.mjs +11 -11
  78. package/src/core/operations/ResizeImage.mjs +30 -23
  79. package/src/core/operations/RotateImage.mjs +8 -9
  80. package/src/core/operations/SQLBeautify.mjs +21 -3
  81. package/src/core/operations/SharpenImage.mjs +94 -62
  82. package/src/core/operations/SplitColourChannels.mjs +47 -21
  83. package/src/core/operations/TextIntegerConverter.mjs +123 -0
  84. package/src/core/operations/UnescapeUnicodeCharacters.mjs +17 -0
  85. package/src/core/operations/ViewBitPlane.mjs +16 -20
  86. package/src/core/operations/index.mjs +960 -0
  87. package/src/node/index.mjs +2423 -0
  88. package/src/web/HTMLIngredient.mjs +24 -43
  89. package/src/web/Manager.mjs +1 -0
  90. package/src/web/html/index.html +6 -6
  91. package/src/web/static/fonts/bmfonts/Roboto72White.fnt +491 -485
  92. package/src/web/static/fonts/bmfonts/RobotoBlack72White.fnt +494 -488
  93. package/src/web/static/fonts/bmfonts/RobotoMono72White.fnt +110 -103
  94. package/src/web/static/fonts/bmfonts/RobotoSlab72White.fnt +498 -492
  95. package/src/web/stylesheets/layout/_banner.css +30 -0
  96. package/src/web/stylesheets/layout/_modals.css +5 -0
  97. package/src/web/stylesheets/utils/_overrides.css +7 -0
  98. package/src/web/waiters/ControlsWaiter.mjs +82 -0
  99. package/src/web/waiters/InputWaiter.mjs +12 -6
  100. package/src/web/waiters/RecipeWaiter.mjs +2 -2
  101. package/tests/browser/02_ops.js +23 -3
  102. package/tests/node/index.mjs +1 -0
  103. package/tests/node/tests/lib/BigIntUtils.mjs +150 -0
  104. package/tests/node/tests/operations.mjs +9 -7
  105. package/tests/operations/index.mjs +8 -0
  106. package/tests/operations/tests/A1Z26CipherDecode.mjs +33 -0
  107. package/tests/operations/tests/DisassembleARM.mjs +377 -0
  108. package/tests/operations/tests/ExtractAudioMetadata.mjs +287 -0
  109. package/tests/operations/tests/FlaskSession.mjs +246 -0
  110. package/tests/operations/tests/GenerateQRCode.mjs +67 -0
  111. package/tests/operations/tests/JWTSign.mjs +83 -8
  112. package/tests/operations/tests/Jq.mjs +32 -0
  113. package/tests/operations/tests/Modhex.mjs +20 -0
  114. package/tests/operations/tests/ParseEthernetFrame.mjs +45 -0
  115. package/tests/operations/tests/RC6.mjs +487 -0
  116. package/tests/operations/tests/SQLBeautify.mjs +54 -0
  117. package/tests/operations/tests/TextIntegerConverter.mjs +199 -0
  118. package/tests/samples/Audio.mjs +73 -0
  119. package/tests/samples/Images.mjs +0 -12
  120. package/webpack.config.js +10 -7
  121. package/src/core/lib/ImageManipulation.mjs +0 -251
package/CHANGELOG.md CHANGED
@@ -13,6 +13,64 @@ All major and minor version changes will be documented in this file. Details of
13
13
 
14
14
  ## Details
15
15
 
16
+ ### [10.23.0] - 2026-04-06
17
+ - Properly escape HTML entities in sampleDelim to avoid XSS issue [@GCHQDeveloper581] | [#2307]
18
+ - chore (deps): bump lodash from 4.17.23 to 4.18.1 | [#2304]
19
+ - chore (deps): bump @codemirror/view from 6.40.0 to 6.41.0 | [#2305]
20
+ - chore (deps): bump the patch-updates group with 2 updates | [#2303]
21
+ - chore (deps): bump @xmldom/xmldom from 0.8.11 to 0.8.12 | [#2302]
22
+ - chore (deps): bump picomatch | [#2299]
23
+ - chore (deps): bump node-forge from 1.3.3 to 1.4.0 | [#2297]
24
+ - chore (deps): bump the patch-updates group with 3 updates | [#2296]
25
+ - chore (deps) bump chromedriver from 130.0.4 to 146.0.6 [@GCHQDeveloper581] | [#2292]
26
+ - ParseEthernetFrame - Fix vlan calculation [@Kalkran] | [#2295]
27
+ - Add pull request template with AI usage disclosure [@C85297] | [#2279]
28
+ - fix: return empty output for zero-length To Modhex input [@saschabuehrle] | [#2249]
29
+ - Added tab focus to top banner and navigation to About/Support Modal [@j264415] | [#1733]
30
+ - Add Parse Ethernet frame Operation, allow Parse IPv4 Header to cascade [@Kalkran] | [#1722]
31
+ - Selection and Deselection of autobake checkbox using keyboard [@j264415] | [#1727]
32
+ - chore (deps): bump @babel/runtime from 7.28.6 to 7.29.2 | [#2263]
33
+ - Add more helpful error for when numerical ingredient is left empty [@Lamby777] [@C85297] | [#1540]
34
+ - chore (deps): bump @codemirror/view from 6.39.17 to 6.40.0 | [#2262]
35
+ - Bump flatted from 3.3.2 to 3.4.2 [@GCHQDeveloper581] | [#2266]
36
+ - feat: add Raw option for Jq operation [@rtpt-romankarwacik] | [#2237]
37
+ - chore (deps): bump core-js from 3.48.0 to 3.49.0 | [#2261]
38
+ - chore (deps): bump the patch-updates group with 6 updates | [#2260]
39
+ - Add Extract Audio Metadata operation [@d0s1nt] [@GCHQDeveloper581] | [#2170]
40
+ - Fix Jq issue [@GCHQDeveloper581] | [#2210]
41
+ - Configure dependabot updates [@GCHQDeveloper581] | [#2259]
42
+ - fix(A1Z26): return empty string instead of empty array for empty input [@brick-pixel] | [#2257]
43
+ - Fix broken Docker link in README [@am-periphery] | [#2250]
44
+ - Update some dependencies, including a number causing npm audit warnings [@GCHQDeveloper581] | [#2236]
45
+ - Bump axios from 1.7.9 to 1.13.6 | [#2234]
46
+ - Bump jws from 3.2.2 to 3.2.3 | [#2235]
47
+ - Bump pbkdf2 from 3.1.2 to 3.1.5 | [#2229]
48
+ - Bump form-data from 4.0.1 to 4.0.5 | [#2228]
49
+ - Bump basic-ftp from 5.0.5 to 5.2.0 | [#2231]
50
+ - feat: add ARM disassembler operation [@thomasxm] | [#2156]
51
+ - Add Text/Integer Converter operation [@p-leriche] [@GCHQDeveloper581] | [#2213]
52
+ - Feat/rc6 add RC6 Encrypt/Decrypt operations [@thomasxm] | [#2163]
53
+ - [bugfix] Add Bootstrap form style for CodeMirror editor [@Swonkie] | [#2161]
54
+ - Add Flask Session operations (Decode, Sign, Verify) [@ThePlayer372-FR] | [#2208]
55
+ - fix: `jq-web` -> `jq-wasm`, includes `jq` version `1.8.1` [@W-Floyd] [@GCHQDeveloper581] | [#2223]
56
+ - Bump jsonwebtoken from 8.5.1 to 9.0.0 [@GCHQDeveloper581] | [#2219]
57
+ - Bump basic-ftp from 5.0.5 to 5.2.0 | [#2218]
58
+ - feat: add random integer generation operation [@cktgh] | [#2151]
59
+ - Add BigInt utility functions for number theory operations [@p-leriche] [@GCHQDeveloper581] | [#2205]
60
+ - Improve SQL Beautify: use sql-formatter and support bind variables [@aby-jo] [@GCHQDeveloper581] | [#2071]
61
+ - update tesseract.js to 6.0.1 [@atsiv1] | [#2133]
62
+ - Fix hint tooltip display issues [@bartvanandel] | [#2017]
63
+ - Simplify babel dependencies [@GCHQDeveloper581] | [#2204]
64
+ - Dependency updates [@GCHQDeveloper581] | [#2201]
65
+ - Fix: Move Magic checks from Escape to Unescape Unicode Characters [@fjh1997] | [#2195]
66
+ - Paste spreadsheets as text [@C85297] | [#2200]
67
+ - Fix Roboto Mono font [@C85297] | [#2199]
68
+ - Fix return of buffer for PNG QR image generation [@GCHQDeveloper581] [@C85297] | [#2125]
69
+ - Update JIMP [@C85297] | [#2171]
70
+ - Overwrite NGINX maintainer label [@C85297] | [#2194]
71
+ - Bump v10.22.1 [@GCHQDeveloper581] | [#2193]
72
+ - Fix npm publish - Run "npm ci" and "npm run node" under node 18 then switch to node 24.5 [@GCHQDeveloper581] | [#2192]
73
+
16
74
  ### [10.22.0] - 2026-02-11
17
75
  - Separate npm publish out into separate job and run with Node 24.5 [@GCHQDeveloper581] | [#2188]
18
76
  - Fixed Percent delimiter for hex encoding [@beneri] [@C85297] | [#2137]
@@ -538,6 +596,7 @@ All major and minor version changes will be documented in this file. Details of
538
596
  ## [4.0.0] - 2016-11-28
539
597
  - Initial open source commit [@n1474335] | [b1d73a72](https://github.com/gchq/CyberChef/commit/b1d73a725dc7ab9fb7eb789296efd2b7e4b08306)
540
598
 
599
+ [10.23.0]: https://github.com/gchq/CyberChef/releases/tag/v10.23.0
541
600
  [10.22.0]: https://github.com/gchq/CyberChef/releases/tag/v10.22.0
542
601
  [10.21.0]: https://github.com/gchq/CyberChef/releases/tag/v10.21.0
543
602
  [10.20.0]: https://github.com/gchq/CyberChef/releases/tag/v10.20.0
@@ -797,6 +856,22 @@ All major and minor version changes will be documented in this file. Details of
797
856
  [@t-martine]: https://github.com/t-martine
798
857
  [@wesinator]: https://github.com/wesinator
799
858
  [@Raka-loah]: https://github.com/Raka-loah
859
+ [@Kalkran]: https://github.com/Kalkran
860
+ [@saschabuehrle]: https://github.com/saschabuehrle
861
+ [@j264415]: https://github.com/j264415
862
+ [@Lamby777]: https://github.com/Lamby777
863
+ [@rtpt-romankarwacik]: https://github.com/rtpt-romankarwacik
864
+ [@d0s1nt]: https://github.com/d0s1nt
865
+ [@brick-pixel]: https://github.com/brick-pixel
866
+ [@am-periphery]: https://github.com/am-periphery
867
+ [@p-leriche]: https://github.com/p-leriche
868
+ [@Swonkie]: https://github.com/Swonkie
869
+ [@ThePlayer372-FR]: https://github.com/ThePlayer372-FR
870
+ [@W-Floyd]: https://github.com/W-Floyd
871
+ [@cktgh]: https://github.com/cktgh
872
+ [@aby-jo]: https://github.com/aby-jo
873
+ [@atsiv1]: https://github.com/atsiv1
874
+ [@fjh1997]: https://github.com/fjh1997
800
875
 
801
876
 
802
877
  [8ad18b]: https://github.com/gchq/CyberChef/commit/8ad18bc7db6d9ff184ba3518686293a7685bf7b7
@@ -1010,4 +1085,60 @@ All major and minor version changes will be documented in this file. Details of
1010
1085
  [#2183]: https://github.com/gchq/CyberChef/pull/2183
1011
1086
  [#2182]: https://github.com/gchq/CyberChef/pull/2182
1012
1087
  [#2181]: https://github.com/gchq/CyberChef/pull/2181
1088
+ [#2307]: https://github.com/gchq/CyberChef/pull/2307
1089
+ [#2304]: https://github.com/gchq/CyberChef/pull/2304
1090
+ [#2305]: https://github.com/gchq/CyberChef/pull/2305
1091
+ [#2303]: https://github.com/gchq/CyberChef/pull/2303
1092
+ [#2302]: https://github.com/gchq/CyberChef/pull/2302
1093
+ [#2299]: https://github.com/gchq/CyberChef/pull/2299
1094
+ [#2297]: https://github.com/gchq/CyberChef/pull/2297
1095
+ [#2296]: https://github.com/gchq/CyberChef/pull/2296
1096
+ [#2292]: https://github.com/gchq/CyberChef/pull/2292
1097
+ [#2295]: https://github.com/gchq/CyberChef/pull/2295
1098
+ [#2279]: https://github.com/gchq/CyberChef/pull/2279
1099
+ [#2249]: https://github.com/gchq/CyberChef/pull/2249
1100
+ [#1733]: https://github.com/gchq/CyberChef/pull/1733
1101
+ [#1722]: https://github.com/gchq/CyberChef/pull/1722
1102
+ [#1727]: https://github.com/gchq/CyberChef/pull/1727
1103
+ [#2263]: https://github.com/gchq/CyberChef/pull/2263
1104
+ [#1540]: https://github.com/gchq/CyberChef/pull/1540
1105
+ [#2262]: https://github.com/gchq/CyberChef/pull/2262
1106
+ [#2266]: https://github.com/gchq/CyberChef/pull/2266
1107
+ [#2237]: https://github.com/gchq/CyberChef/pull/2237
1108
+ [#2261]: https://github.com/gchq/CyberChef/pull/2261
1109
+ [#2260]: https://github.com/gchq/CyberChef/pull/2260
1110
+ [#2170]: https://github.com/gchq/CyberChef/pull/2170
1111
+ [#2210]: https://github.com/gchq/CyberChef/pull/2210
1112
+ [#2259]: https://github.com/gchq/CyberChef/pull/2259
1113
+ [#2257]: https://github.com/gchq/CyberChef/pull/2257
1114
+ [#2250]: https://github.com/gchq/CyberChef/pull/2250
1115
+ [#2236]: https://github.com/gchq/CyberChef/pull/2236
1116
+ [#2234]: https://github.com/gchq/CyberChef/pull/2234
1117
+ [#2235]: https://github.com/gchq/CyberChef/pull/2235
1118
+ [#2229]: https://github.com/gchq/CyberChef/pull/2229
1119
+ [#2228]: https://github.com/gchq/CyberChef/pull/2228
1120
+ [#2231]: https://github.com/gchq/CyberChef/pull/2231
1121
+ [#2156]: https://github.com/gchq/CyberChef/pull/2156
1122
+ [#2213]: https://github.com/gchq/CyberChef/pull/2213
1123
+ [#2163]: https://github.com/gchq/CyberChef/pull/2163
1124
+ [#2161]: https://github.com/gchq/CyberChef/pull/2161
1125
+ [#2208]: https://github.com/gchq/CyberChef/pull/2208
1126
+ [#2223]: https://github.com/gchq/CyberChef/pull/2223
1127
+ [#2219]: https://github.com/gchq/CyberChef/pull/2219
1128
+ [#2218]: https://github.com/gchq/CyberChef/pull/2218
1129
+ [#2151]: https://github.com/gchq/CyberChef/pull/2151
1130
+ [#2205]: https://github.com/gchq/CyberChef/pull/2205
1131
+ [#2071]: https://github.com/gchq/CyberChef/pull/2071
1132
+ [#2133]: https://github.com/gchq/CyberChef/pull/2133
1133
+ [#2017]: https://github.com/gchq/CyberChef/pull/2017
1134
+ [#2204]: https://github.com/gchq/CyberChef/pull/2204
1135
+ [#2201]: https://github.com/gchq/CyberChef/pull/2201
1136
+ [#2195]: https://github.com/gchq/CyberChef/pull/2195
1137
+ [#2200]: https://github.com/gchq/CyberChef/pull/2200
1138
+ [#2199]: https://github.com/gchq/CyberChef/pull/2199
1139
+ [#2125]: https://github.com/gchq/CyberChef/pull/2125
1140
+ [#2171]: https://github.com/gchq/CyberChef/pull/2171
1141
+ [#2194]: https://github.com/gchq/CyberChef/pull/2194
1142
+ [#2193]: https://github.com/gchq/CyberChef/pull/2193
1143
+ [#2192]: https://github.com/gchq/CyberChef/pull/2192
1013
1144
 
@@ -0,0 +1,37 @@
1
+ # Contributing
2
+
3
+ Take a look through the [Wiki pages](https://github.com/gchq/CyberChef/wiki) for guides on [compiling CyberChef](https://github.com/gchq/CyberChef/wiki/Getting-started) and [adding new operations](https://github.com/gchq/CyberChef/wiki/Adding-a-new-operation).
4
+
5
+ There are lots of opportunities to contribute to CyberChef. If you want ideas, take a look at any [Issues](https://github.com/gchq/CyberChef/issues) tagged with '[help wanted](https://github.com/gchq/CyberChef/labels/help%20wanted)'.
6
+
7
+ Before your contributions can be accepted, you must:
8
+
9
+ - Sign the [GCHQ Contributor Licence Agreement](https://cla-assistant.io/gchq/CyberChef)
10
+ - Push your changes to your fork.
11
+ - Submit a pull request.
12
+
13
+
14
+ ## Coding conventions
15
+
16
+ * Indentation: Each block should consist of 4 spaces
17
+ * Object/namespace identifiers: CamelCase
18
+ * Function/variable names: camelCase
19
+ * Constants: UNDERSCORE_UPPER_CASE
20
+ * Source code encoding: UTF-8 (without BOM)
21
+ * All source files must end with a newline
22
+ * Line endings: UNIX style (\n)
23
+
24
+
25
+ ## Design Principles
26
+
27
+ 1. If at all possible, all operations and features should be client-side and not rely on connections to an external server. This increases the utility of CyberChef on closed networks and in virtual machines that are not connected to the Internet. Calls to external APIs may be accepted if there is no other option, but not for critical components.
28
+ 2. Latency should be kept to a minimum to enhance the user experience. This means that operation code should sit on the client and be executed there. However, as a trade-off between latency and bandwidth, operation code with large dependencies can be loaded in discrete modules in order to reduce the size of the initial download. The downloading of additional modules must remain entirely transparent so that the user is not inconvenienced.
29
+ 3. Large libraries should be kept in separate modules so that they are not downloaded by everyone who uses the app, just those who specifically require the relevant operations.
30
+ 4. Use Vanilla JS if at all possible to reduce the number of libraries required and relied upon. Frameworks like jQuery, although included, should not be used unless absolutely necessary.
31
+
32
+
33
+ With these principles in mind, any changes or additions to CyberChef should keep it:
34
+
35
+ - Standalone
36
+ - Efficient
37
+ - As small as possible
package/Dockerfile CHANGED
@@ -29,4 +29,6 @@ RUN npm run build
29
29
  #########################################
30
30
  FROM nginx:stable-alpine AS cyberchef
31
31
 
32
+ LABEL maintainer="GCHQ <oss@gchq.gov.uk>"
33
+
32
34
  COPY --from=builder /app/build/prod /usr/share/nginx/html/
package/Gruntfile.js CHANGED
@@ -432,18 +432,6 @@ module.exports = function (grunt) {
432
432
  },
433
433
  stdout: false
434
434
  },
435
- fixJimpModule: {
436
- command: function () {
437
- switch (process.platform) {
438
- case "darwin":
439
- // Space added before comma to prevent multiple modifications
440
- return `sed -i '' 's/"es\\/index.js",/"es\\/index.js" ,\\n "type": "module",/' ./node_modules/jimp/package.json`;
441
- default:
442
- return `sed -i 's/"es\\/index.js",/"es\\/index.js" ,\\n "type": "module",/' ./node_modules/jimp/package.json`;
443
- }
444
- },
445
- stdout: false
446
- }
447
435
  },
448
436
  });
449
437
  };
package/README.md CHANGED
@@ -24,7 +24,7 @@ Cryptographic operations in CyberChef should not be relied upon to provide secur
24
24
 
25
25
  **Prerequisites**
26
26
 
27
- - [Docker](hhttps://www.docker.com/products/docker-desktop/)
27
+ - [Docker](https://www.docker.com/products/docker-desktop/)
28
28
  - Docker Desktop must be open and running on your machine
29
29
 
30
30
 
package/babel.config.js CHANGED
@@ -10,13 +10,7 @@ module.exports = function(api) {
10
10
  }]
11
11
  ],
12
12
  "plugins": [
13
- "dynamic-import-node",
14
13
  "@babel/plugin-syntax-import-assertions",
15
- [
16
- "babel-plugin-transform-builtin-extend", {
17
- "globals": ["Error"]
18
- }
19
- ],
20
14
  [
21
15
  "@babel/plugin-transform-runtime", {
22
16
  "regenerator": true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cyberchef",
3
- "version": "10.22.0",
3
+ "version": "10.23.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",
@@ -39,73 +39,71 @@
39
39
  "node >= 16"
40
40
  ],
41
41
  "devDependencies": {
42
- "@babel/core": "^7.24.7",
43
- "@babel/eslint-parser": "^7.24.7",
44
- "@babel/plugin-syntax-import-assertions": "^7.24.7",
45
- "@babel/plugin-transform-runtime": "^7.24.7",
46
- "@babel/preset-env": "^7.24.7",
47
- "@babel/runtime": "^7.24.7",
48
- "@codemirror/commands": "^6.6.0",
49
- "@codemirror/language": "^6.10.2",
50
- "@codemirror/search": "^6.5.6",
51
- "@codemirror/state": "^6.4.1",
52
- "@codemirror/view": "^6.28.0",
53
- "autoprefixer": "^10.4.19",
54
- "babel-loader": "^9.1.3",
55
- "babel-plugin-dynamic-import-node": "^2.3.3",
56
- "babel-plugin-transform-builtin-extend": "1.1.2",
42
+ "@babel/eslint-parser": "^7.28.6",
43
+ "@babel/plugin-syntax-import-assertions": "^7.28.6",
44
+ "@babel/plugin-transform-runtime": "^7.29.0",
45
+ "@babel/preset-env": "^7.29.2",
46
+ "@babel/runtime": "^7.29.2",
47
+ "@codemirror/commands": "^6.10.3",
48
+ "@codemirror/language": "^6.12.3",
49
+ "@codemirror/search": "^6.6.0",
50
+ "@codemirror/state": "^6.5.4",
51
+ "@codemirror/view": "^6.41.0",
52
+ "autoprefixer": "^10.4.27",
53
+ "babel-loader": "^10.1.1",
57
54
  "base64-loader": "^1.0.0",
58
- "chromedriver": "^130.0.0",
55
+ "chromedriver": "^146.0.6",
59
56
  "cli-progress": "^3.12.0",
60
57
  "colors": "^1.4.0",
61
58
  "compression-webpack-plugin": "^11.1.0",
62
- "copy-webpack-plugin": "^12.0.2",
63
- "core-js": "^3.37.1",
64
- "cspell": "^8.17.3",
65
- "css-loader": "7.1.2",
66
- "eslint": "^9.4.0",
67
- "eslint-plugin-jsdoc": "^48.2.9",
68
- "globals": "^15.4.0",
59
+ "copy-webpack-plugin": "^13.0.1",
60
+ "core-js": "^3.49.0",
61
+ "cspell": "^8.19.4",
62
+ "css-loader": "7.1.4",
63
+ "eslint": "^9.39.4",
64
+ "eslint-plugin-jsdoc": "^50.8.0",
65
+ "globals": "^15.15.0",
69
66
  "grunt": "^1.6.1",
70
67
  "grunt-chmod": "~1.1.1",
71
68
  "grunt-concurrent": "^3.0.0",
72
69
  "grunt-contrib-clean": "~2.0.1",
73
- "grunt-contrib-connect": "^4.0.0",
70
+ "grunt-contrib-connect": "^5.0.1",
74
71
  "grunt-contrib-copy": "~1.0.0",
75
72
  "grunt-contrib-watch": "^1.1.0",
76
73
  "grunt-eslint": "^25.0.0",
77
74
  "grunt-exec": "~3.0.0",
78
75
  "grunt-webpack": "^6.0.0",
79
76
  "grunt-zip": "^1.0.0",
80
- "html-webpack-plugin": "^5.6.0",
77
+ "html-webpack-plugin": "^5.6.6",
81
78
  "imports-loader": "^5.0.0",
82
- "mini-css-extract-plugin": "2.9.0",
79
+ "mini-css-extract-plugin": "2.10.2",
83
80
  "modify-source-webpack-plugin": "^4.1.0",
84
- "nightwatch": "^3.6.3",
85
- "postcss": "^8.4.38",
81
+ "nightwatch": "^3.15.0",
82
+ "postcss": "^8.5.8",
86
83
  "postcss-css-variables": "^0.19.0",
87
- "postcss-import": "^16.1.0",
88
- "postcss-loader": "^8.1.1",
84
+ "postcss-import": "^16.1.1",
85
+ "postcss-loader": "^8.2.1",
89
86
  "prompt": "^1.3.0",
90
- "sitemap": "^8.0.0",
91
- "terser": "^5.31.1",
92
- "webpack": "^5.91.0",
87
+ "sitemap": "^8.0.3",
88
+ "terser": "^5.46.1",
89
+ "webpack": "^5.105.4",
93
90
  "webpack-bundle-analyzer": "^4.10.2",
94
91
  "webpack-dev-server": "5.0.4",
95
92
  "webpack-node-externals": "^3.0.0",
96
93
  "worker-loader": "^3.0.8"
97
94
  },
98
95
  "dependencies": {
96
+ "@alexaltea/capstone-js": "^3.0.5",
99
97
  "@astronautlabs/amf": "^0.0.6",
100
- "@babel/polyfill": "^7.12.1",
101
98
  "@blu3r4y/lzma": "^2.3.3",
102
99
  "@wavesenterprise/crypto-gost-js": "^2.1.0-RC1",
103
- "@xmldom/xmldom": "^0.8.10",
100
+ "@xmldom/xmldom": "^0.8.12",
104
101
  "argon2-browser": "^1.18.0",
105
- "arrive": "^2.4.1",
106
- "avsc": "^5.7.7",
102
+ "arrive": "^2.5.3",
103
+ "assert": "^2.1.0",
104
+ "avsc": "^5.7.9",
107
105
  "bcryptjs": "^2.4.3",
108
- "bignumber.js": "^9.1.2",
106
+ "bignumber.js": "^9.3.1",
109
107
  "blakejs": "^1.2.1",
110
108
  "bootstrap": "4.6.2",
111
109
  "bootstrap-colorpicker": "^3.4.0",
@@ -122,44 +120,45 @@
122
120
  "ctph.js": "0.0.5",
123
121
  "d3": "7.9.0",
124
122
  "d3-hexbin": "^0.2.2",
125
- "diff": "^5.2.0",
126
- "dompurify": "^3.2.5",
123
+ "diff": "^5.2.2",
124
+ "dompurify": "^3.3.3",
127
125
  "es6-promisify": "^7.0.0",
128
126
  "escodegen": "^2.1.0",
129
127
  "esprima": "^4.0.1",
128
+ "events": "^3.3.0",
130
129
  "exif-parser": "^0.1.12",
131
- "fernet": "^0.4.0",
130
+ "fernet": "^0.3.3",
132
131
  "file-saver": "^2.0.5",
133
132
  "flat": "^6.0.1",
134
133
  "geodesy": "1.1.3",
135
- "handlebars": "^4.7.8",
134
+ "handlebars": "^4.7.9",
136
135
  "hash-wasm": "^4.12.0",
137
- "highlight.js": "^11.9.0",
136
+ "highlight.js": "^11.11.1",
138
137
  "ieee754": "^1.2.1",
139
- "jimp": "^0.22.12",
138
+ "jimp": "^1.6.0",
140
139
  "jq-web": "^0.5.1",
141
140
  "jquery": "3.7.1",
142
141
  "js-sha3": "^0.9.3",
143
- "jsesc": "^3.0.2",
142
+ "jsesc": "^3.1.0",
144
143
  "json5": "^2.2.3",
145
- "jsonata": "^2.0.3",
146
- "jsonpath-plus": "^10.3.0",
147
- "jsonwebtoken": "8.5.1",
144
+ "jsonata": "^2.1.0",
145
+ "jsonpath-plus": "^10.4.0",
146
+ "jsonwebtoken": "9.0.3",
148
147
  "jsqr": "^1.4.0",
149
- "jsrsasign": "^11.1.0",
148
+ "jsrsasign": "^11.1.1",
150
149
  "kbpgp": "^2.1.17",
151
150
  "libbzip2-wasm": "0.0.4",
152
151
  "libyara-wasm": "^1.2.1",
153
- "lodash": "^4.17.21",
154
- "loglevel": "^1.9.1",
152
+ "lodash": "^4.18.1",
153
+ "loglevel": "^1.9.2",
155
154
  "loglevel-message-prefix": "^3.0.0",
156
155
  "lz-string": "^1.5.0",
157
156
  "lz4js": "^0.2.0",
158
- "markdown-it": "^14.1.0",
157
+ "markdown-it": "^14.1.1",
159
158
  "moment": "^2.30.1",
160
- "moment-timezone": "^0.5.45",
159
+ "moment-timezone": "^0.6.1",
161
160
  "ngeohash": "^0.6.3",
162
- "node-forge": "^1.3.1",
161
+ "node-forge": "^1.4.0",
163
162
  "node-md6": "^0.1.0",
164
163
  "nodom": "^2.4.0",
165
164
  "notepack.io": "^3.0.1",
@@ -169,24 +168,26 @@
169
168
  "path": "^0.12.7",
170
169
  "popper.js": "^1.16.1",
171
170
  "process": "^0.11.10",
172
- "protobufjs": "^7.3.1",
171
+ "protobufjs": "^7.5.4",
173
172
  "qr-image": "^3.2.0",
174
173
  "reflect-metadata": "^0.2.2",
175
174
  "rison": "^0.1.1",
176
175
  "scryptsy": "^2.1.0",
177
176
  "snackbarjs": "^1.1.0",
178
- "sortablejs": "^1.15.2",
177
+ "sortablejs": "^1.15.7",
179
178
  "split.js": "^1.6.5",
179
+ "sql-formatter": "^15.7.3",
180
180
  "ssdeep.js": "0.0.3",
181
181
  "stream-browserify": "^3.0.0",
182
- "tesseract.js": "5.1.0",
183
- "ua-parser-js": "^1.0.38",
182
+ "tesseract.js": "^6.0.1",
183
+ "ua-parser-js": "^1.0.41",
184
184
  "unorm": "^1.6.0",
185
+ "url": "^0.11.4",
185
186
  "utf8": "^3.0.0",
186
- "uuid": "^11.1.0",
187
+ "uuid": "^13.0.0",
187
188
  "vkbeautify": "^0.99.3",
188
189
  "xpath": "0.0.34",
189
- "xregexp": "^5.1.1",
190
+ "xregexp": "^5.1.2",
190
191
  "zlibjs": "^0.3.1"
191
192
  },
192
193
  "scripts": {
@@ -200,7 +201,7 @@
200
201
  "testuidev": "npx nightwatch --env=dev",
201
202
  "lint": "npx grunt lint",
202
203
  "lint:grammar": "cspell ./src",
203
- "postinstall": "npx grunt exec:fixCryptoApiImports && npx grunt exec:fixSnackbarMarkup && npx grunt exec:fixJimpModule",
204
+ "postinstall": "npx grunt exec:fixCryptoApiImports && npx grunt exec:fixSnackbarMarkup",
204
205
  "newop": "node --experimental-modules --experimental-json-modules src/core/config/scripts/newOperation.mjs",
205
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
207
  "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\"",
package/src/core/Chef.mjs CHANGED
@@ -55,8 +55,15 @@ class Chef {
55
55
  progress = await recipe.execute(this.dish, progress);
56
56
  } catch (err) {
57
57
  log.error(err);
58
+
59
+ let displayStr;
60
+ if ("displayStr" in err) {
61
+ displayStr = err.displayStr;
62
+ } else {
63
+ displayStr = err.toString();
64
+ }
58
65
  error = {
59
- displayStr: err.displayStr,
66
+ displayStr: displayStr,
60
67
  };
61
68
  progress = err.progress;
62
69
  }
@@ -5,7 +5,8 @@
5
5
  */
6
6
 
7
7
  import Utils from "./Utils.mjs";
8
- import {fromHex} from "./lib/Hex.mjs";
8
+ import { fromHex } from "./lib/Hex.mjs";
9
+ import OperationError from "./errors/OperationError.mjs";
9
10
 
10
11
  /**
11
12
  * The arguments to operations.
@@ -119,7 +120,9 @@ class Ingredient {
119
120
  number = parseFloat(data);
120
121
  if (isNaN(number)) {
121
122
  const sample = Utils.truncate(data.toString(), 10);
122
- throw "Invalid ingredient value. Not a number: " + sample;
123
+ throw new OperationError(
124
+ "Invalid ingredient value. Not a number: " + sample,
125
+ );
123
126
  }
124
127
  return number;
125
128
  default:
@@ -5,6 +5,7 @@
5
5
  */
6
6
 
7
7
  import Dish from "./Dish.mjs";
8
+ import OperationError from "./errors/OperationError.mjs";
8
9
  import Ingredient from "./Ingredient.mjs";
9
10
 
10
11
  /**
@@ -223,7 +224,11 @@ class Operation {
223
224
  */
224
225
  set ingValues(ingValues) {
225
226
  ingValues.forEach((val, i) => {
226
- this._ingList[i].value = val;
227
+ try {
228
+ this._ingList[i].value = val;
229
+ } catch (err) {
230
+ throw new OperationError(`Failed to set value of ingredient '${this._ingList[i].name}': ${err}`);
231
+ }
227
232
  });
228
233
  }
229
234
 
@@ -70,11 +70,15 @@ class Recipe {
70
70
  if (o instanceof Operation) {
71
71
  return o;
72
72
  } else {
73
- const op = new modules[o.module][o.name]();
74
- op.ingValues = o.ingValues;
75
- op.breakpoint = o.breakpoint;
76
- op.disabled = o.disabled;
77
- return op;
73
+ try {
74
+ const op = new modules[o.module][o.name]();
75
+ op.ingValues = o.ingValues;
76
+ op.breakpoint = o.breakpoint;
77
+ op.disabled = o.disabled;
78
+ return op;
79
+ } catch (err) {
80
+ throw new Error(`Failed to hydrate operation '${o.name}': ${err}`);
81
+ }
78
82
  }
79
83
  });
80
84
  }
@@ -229,6 +233,7 @@ class Recipe {
229
233
  }
230
234
  this.lastRunOp = op;
231
235
  } catch (err) {
236
+ log.error(err);
232
237
  // Return expected errors as output
233
238
  if (err instanceof OperationError || err?.type === "OperationError") {
234
239
  // Cannot rely on `err instanceof OperationError` here as extending
@@ -41,6 +41,7 @@
41
41
  "From Base",
42
42
  "To BCD",
43
43
  "From BCD",
44
+ "Text-Integer Conversion",
44
45
  "To HTML Entity",
45
46
  "From HTML Entity",
46
47
  "URL Encode",
@@ -109,6 +110,8 @@
109
110
  "Rabbit",
110
111
  "SM4 Encrypt",
111
112
  "SM4 Decrypt",
113
+ "RC6 Encrypt",
114
+ "RC6 Decrypt",
112
115
  "GOST Encrypt",
113
116
  "GOST Decrypt",
114
117
  "GOST Sign",
@@ -164,7 +167,10 @@
164
167
  "Typex",
165
168
  "Lorenz",
166
169
  "Colossus",
167
- "SIGABA"
170
+ "SIGABA",
171
+ "Flask Session Decode",
172
+ "Flask Session Sign",
173
+ "Flask Session Verify"
168
174
  ]
169
175
  },
170
176
  {
@@ -222,6 +228,9 @@
222
228
  "Subtract",
223
229
  "Multiply",
224
230
  "Divide",
231
+ "Modular Exponentiation",
232
+ "Modular Inverse",
233
+ "Extended GCD",
225
234
  "Mean",
226
235
  "Median",
227
236
  "Standard Deviation",
@@ -240,6 +249,7 @@
240
249
  "DNS over HTTPS",
241
250
  "Strip HTTP headers",
242
251
  "Dechunk HTTP response",
252
+ "Parse Ethernet frame",
243
253
  "Parse User Agent",
244
254
  "Parse IP range",
245
255
  "Parse IPv6 address",
@@ -376,6 +386,7 @@
376
386
  "CSS selector",
377
387
  "Extract EXIF",
378
388
  "Extract ID3",
389
+ "Extract Audio Metadata",
379
390
  "Extract Files",
380
391
  "RAKE",
381
392
  "Template"
@@ -505,7 +516,8 @@
505
516
  "View Bit Plane",
506
517
  "Randomize Colour Palette",
507
518
  "Extract LSB",
508
- "ELF Info"
519
+ "ELF Info",
520
+ "Extract Audio Metadata"
509
521
  ]
510
522
  },
511
523
  {
@@ -538,7 +550,8 @@
538
550
  "Hex Density chart",
539
551
  "Scatter chart",
540
552
  "Series chart",
541
- "Heatmap chart"
553
+ "Heatmap chart",
554
+ "Extract Audio Metadata"
542
555
  ]
543
556
  },
544
557
  {
@@ -550,7 +563,9 @@
550
563
  "Chi Square",
551
564
  "P-list Viewer",
552
565
  "Disassemble x86",
566
+ "Disassemble ARM",
553
567
  "Pseudo-Random Number Generator",
568
+ "Pseudo-Random Integer Generator",
554
569
  "Generate De Bruijn Sequence",
555
570
  "Generate UUID",
556
571
  "Analyse UUID",