cyberchef 11.0.0 → 11.1.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 (63) hide show
  1. package/CHANGELOG.md +144 -0
  2. package/Dockerfile +2 -2
  3. package/Gruntfile.js +10 -5
  4. package/README.md +3 -1
  5. package/SECURITY.md +8 -18
  6. package/package.json +35 -34
  7. package/src/core/config/Categories.json +6 -0
  8. package/src/core/config/OperationConfig.json +140 -16
  9. package/src/core/config/modules/Default.mjs +8 -0
  10. package/src/core/config/modules/PGP.mjs +2 -0
  11. package/src/core/config/scripts/generateOpsIndex.mjs +63 -0
  12. package/src/core/config/scripts/newOperation.mjs +31 -4
  13. package/src/core/operations/AESDecrypt.mjs +61 -16
  14. package/src/core/operations/AESEncrypt.mjs +26 -11
  15. package/src/core/operations/BLAKE3.mjs +13 -7
  16. package/src/core/operations/BSONDeserialise.mjs +2 -2
  17. package/src/core/operations/BSONSerialise.mjs +3 -2
  18. package/src/core/operations/Bcrypt.mjs +1 -1
  19. package/src/core/operations/BcryptCompare.mjs +1 -1
  20. package/src/core/operations/DecodeText.mjs +4 -0
  21. package/src/core/operations/EncodeText.mjs +4 -0
  22. package/src/core/operations/EscapeSmartCharacters.mjs +129 -0
  23. package/src/core/operations/GenerateLoremIpsum.mjs +34 -3
  24. package/src/core/operations/GeneratePGPKeyPair.mjs +8 -7
  25. package/src/core/operations/PGPSign.mjs +83 -0
  26. package/src/core/operations/ParseEthernetFrame.mjs +1 -1
  27. package/src/core/operations/ParseIPv4Header.mjs +1 -1
  28. package/src/core/operations/ParseObjectIDTimestamp.mjs +2 -2
  29. package/src/core/operations/ParseUserAgent.mjs +1 -1
  30. package/src/core/operations/ROR13.mjs +83 -0
  31. package/src/core/operations/RemoveANSIEscapeCodes.mjs +41 -0
  32. package/src/core/operations/SeriesChart.mjs +16 -0
  33. package/src/core/operations/Wrap.mjs +47 -0
  34. package/src/core/operations/index.mjs +10 -0
  35. package/src/node/index.mjs +25 -0
  36. package/src/web/App.mjs +19 -1
  37. package/src/web/HTMLIngredient.mjs +1 -0
  38. package/src/web/html/index.html +3 -3
  39. package/src/web/static/sitemap.mjs +3 -3
  40. package/src/web/waiters/RecipeWaiter.mjs +9 -1
  41. package/tests/browser/02_ops.js +7 -7
  42. package/tests/browser/03_recipe_load.js +48 -0
  43. package/tests/browser/browserUtils.js +6 -3
  44. package/tests/node/index.mjs +1 -0
  45. package/tests/node/tests/PGP.mjs +69 -0
  46. package/tests/node/tests/operations.mjs +41 -2
  47. package/tests/operations/index.mjs +71 -66
  48. package/tests/operations/tests/BLAKE3.mjs +18 -0
  49. package/tests/operations/tests/CharEnc.mjs +26 -0
  50. package/tests/operations/tests/Charts.mjs +11 -0
  51. package/tests/operations/tests/Crypt.mjs +288 -62
  52. package/tests/operations/tests/EscapeSmartCharacters.mjs +132 -0
  53. package/tests/operations/tests/FlaskSession.mjs +11 -8
  54. package/tests/operations/tests/GenerateLoremIpsum.mjs +80 -0
  55. package/tests/operations/tests/IPv6Transition.mjs +4 -4
  56. package/tests/operations/tests/PGP.mjs +178 -154
  57. package/tests/operations/tests/ParseEthernetFrame.mjs +11 -0
  58. package/tests/operations/tests/ParseIPv4Header.mjs +23 -0
  59. package/tests/operations/tests/ParseX509CRL.mjs +16 -16
  60. package/tests/operations/tests/ROR13.mjs +45 -0
  61. package/tests/operations/tests/Register.mjs +3 -1
  62. package/tests/operations/tests/RemoveANSIEscapeCodes.mjs +62 -0
  63. package/tests/operations/tests/Wrap.mjs +44 -0
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @author 0xff1ce [github.com/0xff1ce]
3
+ * @copyright Crown Copyright 2024
4
+ * @license Apache-2.0
5
+ */
6
+
7
+ import TestRegister from "../../lib/TestRegister.mjs";
8
+
9
+ TestRegister.addTests([
10
+ // Add tests specific to the Wrap operation
11
+ {
12
+ name: "Wrap text at 64 characters",
13
+ input: "A".repeat(128), // Generate an input string of 128 'A' characters
14
+ expectedOutput: "A".repeat(64) + "\n" + "A".repeat(64), // Expected output with a line break after 64 characters
15
+ recipeConfig: [
16
+ {
17
+ "op": "Wrap",
18
+ "args": [64]
19
+ },
20
+ ],
21
+ },
22
+ {
23
+ name: "Wrap text at 32 characters",
24
+ input: "B".repeat(96), // Generate an input string of 96 'B' characters
25
+ expectedOutput: "B".repeat(32) + "\n" + "B".repeat(32) + "\n" + "B".repeat(32), // Expected output with line breaks after every 32 characters
26
+ recipeConfig: [
27
+ {
28
+ "op": "Wrap",
29
+ "args": [32]
30
+ },
31
+ ],
32
+ },
33
+ {
34
+ name: "Wrap text at 10 characters",
35
+ input: "1234567890".repeat(10), // Generate an input string by repeating '1234567890'
36
+ expectedOutput: Array(10).fill("1234567890").join("\n"), // Expected output with line breaks every 10 characters
37
+ recipeConfig: [
38
+ {
39
+ "op": "Wrap",
40
+ "args": [10]
41
+ },
42
+ ],
43
+ }
44
+ ]);