cyberchef 9.46.0 → 9.46.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -13,6 +13,9 @@ All major and minor version changes will be documented in this file. Details of
13
13
 
14
14
  ## Details
15
15
 
16
+ ### [9.46.0] - 2022-07-08
17
+ - Added 'Cetacean Cipher Encode' and 'Cetacean Cipher Decode' operations [@valdelaseras] | [#1308]
18
+
16
19
  ### [9.45.0] - 2022-07-08
17
20
  - Added 'ROT8000' operation [@thomasleplus] | [#1250]
18
21
 
@@ -312,6 +315,7 @@ All major and minor version changes will be documented in this file. Details of
312
315
 
313
316
 
314
317
 
318
+ [9.46.0]: https://github.com/gchq/CyberChef/releases/tag/v9.46.0
315
319
  [9.45.0]: https://github.com/gchq/CyberChef/releases/tag/v9.45.0
316
320
  [9.44.0]: https://github.com/gchq/CyberChef/releases/tag/v9.44.0
317
321
  [9.43.0]: https://github.com/gchq/CyberChef/releases/tag/v9.43.0
@@ -445,6 +449,7 @@ All major and minor version changes will be documented in this file. Details of
445
449
  [@mikecat]: https://github.com/mikecat
446
450
  [@crespyl]: https://github.com/crespyl
447
451
  [@thomasleplus]: https://github.com/thomasleplus
452
+ [@valdelaseras]: https://github.com/valdelaseras
448
453
 
449
454
  [8ad18b]: https://github.com/gchq/CyberChef/commit/8ad18bc7db6d9ff184ba3518686293a7685bf7b7
450
455
  [9a33498]: https://github.com/gchq/CyberChef/commit/9a33498fed26a8df9c9f35f39a78a174bf50a513
@@ -546,4 +551,5 @@ All major and minor version changes will be documented in this file. Details of
546
551
  [#1264]: https://github.com/gchq/CyberChef/pull/1264
547
552
  [#1266]: https://github.com/gchq/CyberChef/pull/1266
548
553
  [#1250]: https://github.com/gchq/CyberChef/pull/1250
554
+ [#1308]: https://github.com/gchq/CyberChef/pull/1308
549
555
 
package/README.md CHANGED
@@ -54,7 +54,7 @@ You can use as many operations as you like in simple or complex ways. Some examp
54
54
  - Whenever you modify the input or the recipe, CyberChef will automatically "bake" for you and produce the output immediately.
55
55
  - This can be turned off and operated manually if it is affecting performance (if the input is very large, for instance).
56
56
  - Automated encoding detection
57
- - CyberChef uses [a number of techniques](https://github.com/gchq/CyberChef/wiki/Automatic-detection-of-encoded-data-using-CyberChef-Magic) to attempt to automatically detect which encodings your data is under. If it finds a suitable operation which can make sense of your data, it displays the 'magic' icon in the Output field which you can click to decode your data.
57
+ - CyberChef uses [a number of techniques](https://github.com/gchq/CyberChef/wiki/Automatic-detection-of-encoded-data-using-CyberChef-Magic) to attempt to automatically detect which encodings your data is under. If it finds a suitable operation that make sense of your data, it displays the 'magic' icon in the Output field which you can click to decode your data.
58
58
  - Breakpoints
59
59
  - You can set breakpoints on any operation in your recipe to pause execution before running it.
60
60
  - You can also step through the recipe one operation at a time to see what the data looks like at each stage.
@@ -66,7 +66,7 @@ You can use as many operations as you like in simple or complex ways. Some examp
66
66
  - Highlighting
67
67
  - When you highlight text in the input or output, the offset and length values will be displayed and, if possible, the corresponding data will be highlighted in the output or input respectively (example: [highlight the word 'question' in the input to see where it appears in the output][11]).
68
68
  - Save to file and load from file
69
- - You can save the output to a file at any time or load a file by dragging and dropping it into the input field. Files up to around 2GB are supported (depending on your browser), however some operations may take a very long time to run over this much data.
69
+ - You can save the output to a file at any time or load a file by dragging and dropping it into the input field. Files up to around 2GB are supported (depending on your browser), however, some operations may take a very long time to run over this much data.
70
70
  - CyberChef is entirely client-side
71
71
  - It should be noted that none of your recipe configuration or input (either text or files) is ever sent to the CyberChef web server - all processing is carried out within your browser, on your own computer.
72
72
  - Due to this feature, CyberChef can be downloaded and run locally. You can use the link in the top left corner of the app to download a full copy of CyberChef and drop it into a virtual machine, share it with other people, or host it in a closed network.
@@ -74,10 +74,10 @@ You can use as many operations as you like in simple or complex ways. Some examp
74
74
 
75
75
  ## Deep linking
76
76
 
77
- By manipulation of CyberChef's URL hash, you can change the initial settings with which the page opens.
77
+ By manipulating CyberChef's URL hash, you can change the initial settings with which the page opens.
78
78
  The format is `https://gchq.github.io/CyberChef/#recipe=Operation()&input=...`
79
79
 
80
- Supported arguments are `recipe`, `input` (encoded in Base64), and `theme`.
80
+ Supported arguments are `recipe`, `input` (encoded in Base64), and `theme`.
81
81
 
82
82
 
83
83
  ## Browser support
@@ -90,12 +90,12 @@ CyberChef is built to support
90
90
 
91
91
  ## Node.js support
92
92
 
93
- CyberChef is built to fully support Node.js `v10` and partially supports `v12`. Named imports using a deep import specifier does not work in `v12`. For more information, see the Node API page in the project [wiki pages](https://github.com/gchq/CyberChef/wiki)
93
+ CyberChef is built to fully support Node.js `v16`. For more information, see the Node API page in the project [wiki pages](https://github.com/gchq/CyberChef/wiki)
94
94
 
95
95
 
96
96
  ## Contributing
97
97
 
98
- Contributing a new operation to CyberChef is super easy! There is a quickstart script which will walk you through the process. If you can write basic JavaScript, you can write a CyberChef operation.
98
+ Contributing a new operation to CyberChef is super easy! The quickstart script will walk you through the process. If you can write basic JavaScript, you can write a CyberChef operation.
99
99
 
100
100
  An installation walkthrough, how-to guides for adding new operations and themes, descriptions of the repository structure, available data types and coding conventions can all be found in the project [wiki pages](https://github.com/gchq/CyberChef/wiki).
101
101
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cyberchef",
3
- "version": "9.46.0",
3
+ "version": "9.46.1",
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",
@@ -114,8 +114,11 @@ class JSONToCSV extends Operation {
114
114
  * @returns {string}
115
115
  */
116
116
  escapeCellContents(data, force=false) {
117
- if (typeof data === "number") data = data.toString();
118
- if (force && typeof data !== "string") data = JSON.stringify(data);
117
+ if (data !== "string") {
118
+ const isPrimitive = data == null || typeof data !== "object";
119
+ if (isPrimitive) data = `${data}`;
120
+ else if (force) data = JSON.stringify(data);
121
+ }
119
122
 
120
123
  // Double quotes should be doubled up
121
124
  data = data.replace(/"/g, '""');
@@ -82,7 +82,17 @@ a:focus {
82
82
  border-color: var(--btn-success-hover-border-colour);
83
83
  }
84
84
 
85
- select.form-control:not([size]):not([multiple]), select.custom-file-control:not([size]):not([multiple]) {
85
+ select.form-control,
86
+ select.form-control:focus {
87
+ background-color: var(--primary-background-colour) !important;
88
+ }
89
+
90
+ select.form-control:focus {
91
+ transition: none !important;
92
+ }
93
+
94
+ select.form-control:not([size]):not([multiple]),
95
+ select.custom-file-control:not([size]):not([multiple]) {
86
96
  height: unset !important;
87
97
  }
88
98
 
@@ -145,7 +155,8 @@ optgroup {
145
155
  color: var(--primary-font-colour);
146
156
  }
147
157
 
148
- .table-bordered th, .table-bordered td {
158
+ .table-bordered th,
159
+ .table-bordered td {
149
160
  border: 1px solid var(--table-border-colour);
150
161
  }
151
162
 
@@ -172,7 +183,9 @@ optgroup {
172
183
  color: var(--subtext-font-colour);
173
184
  }
174
185
 
175
- .nav-tabs>li>a.nav-link.active, .nav-tabs>li>a.nav-link.active:focus, .nav-tabs>li>a.nav-link.active:hover {
186
+ .nav-tabs>li>a.nav-link.active,
187
+ .nav-tabs>li>a.nav-link.active:focus,
188
+ .nav-tabs>li>a.nav-link.active:hover {
176
189
  background-color: var(--secondary-background-colour);
177
190
  border-color: var(--secondary-border-colour);
178
191
  border-bottom-color: transparent;
@@ -183,7 +196,8 @@ optgroup {
183
196
  border-color: var(--primary-border-colour);
184
197
  }
185
198
 
186
- .nav a.nav-link:focus, .nav a.nav-link:hover {
199
+ .nav a.nav-link:focus,
200
+ .nav a.nav-link:hover {
187
201
  background-color: var(--secondary-border-colour);
188
202
  }
189
203
 
@@ -199,7 +213,8 @@ optgroup {
199
213
  color: var(--primary-font-colour);
200
214
  }
201
215
 
202
- .dropdown-menu a:focus, .dropdown-menu a:hover {
216
+ .dropdown-menu a:focus,
217
+ .dropdown-menu a:hover {
203
218
  background-color: var(--secondary-background-colour);
204
219
  color: var(--primary-font-colour);
205
220
  }
@@ -46,6 +46,17 @@ TestRegister.addTests([
46
46
  },
47
47
  ],
48
48
  },
49
+ {
50
+ name: "JSON to CSV: boolean and null as values",
51
+ input: JSON.stringify({a: false, b: null, c: 3}),
52
+ expectedOutput: "a,b,c\r\nfalse,null,3\r\n",
53
+ recipeConfig: [
54
+ {
55
+ op: "JSON to CSV",
56
+ args: [",", "\\r\\n"]
57
+ },
58
+ ],
59
+ },
49
60
  {
50
61
  name: "JSON to CSV: JSON as an array",
51
62
  input: JSON.stringify([{a: 1, b: "2", c: 3}]),