cyberchef 9.34.0 → 9.34.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/Gruntfile.js CHANGED
@@ -200,50 +200,35 @@ module.exports = function (grunt) {
200
200
  web: webpackProdConf(),
201
201
  },
202
202
  "webpack-dev-server": {
203
- options: {
204
- webpack: webpackConfig,
205
- host: "0.0.0.0",
206
- port: grunt.option("port") || 8080,
207
- disableHostCheck: true,
208
- overlay: true,
209
- inline: false,
210
- clientLogLevel: "error",
211
- stats: {
212
- children: false,
213
- chunks: false,
214
- modules: false,
215
- entrypoints: false,
216
- warningsFilter: [
217
- /source-map/,
218
- /dependency is an expression/,
219
- /export 'default'/,
220
- /Can't resolve 'sodium'/
221
- ],
222
- }
223
- },
203
+ options: webpackConfig,
224
204
  start: {
225
- webpack: {
226
- mode: "development",
227
- target: "web",
228
- entry: Object.assign({
229
- main: "./src/web/index.js"
230
- }, moduleEntryPoints),
231
- resolve: {
232
- alias: {
233
- "./config/modules/OpModules.mjs": "./config/modules/Default.mjs"
234
- }
235
- },
236
- plugins: [
237
- new webpack.DefinePlugin(BUILD_CONSTANTS),
238
- new HtmlWebpackPlugin({
239
- filename: "index.html",
240
- template: "./src/web/html/index.html",
241
- chunks: ["main"],
242
- compileTime: compileTime,
243
- version: pkg.version,
244
- })
245
- ]
246
- }
205
+ mode: "development",
206
+ target: "web",
207
+ entry: Object.assign({
208
+ main: "./src/web/index.js"
209
+ }, moduleEntryPoints),
210
+ resolve: {
211
+ alias: {
212
+ "./config/modules/OpModules.mjs": "./config/modules/Default.mjs"
213
+ }
214
+ },
215
+ devServer: {
216
+ port: grunt.option("port") || 8080,
217
+ client: {
218
+ logging: "error",
219
+ overlay: true
220
+ }
221
+ },
222
+ plugins: [
223
+ new webpack.DefinePlugin(BUILD_CONSTANTS),
224
+ new HtmlWebpackPlugin({
225
+ filename: "index.html",
226
+ template: "./src/web/html/index.html",
227
+ chunks: ["main"],
228
+ compileTime: compileTime,
229
+ version: pkg.version,
230
+ })
231
+ ]
247
232
  }
248
233
  },
249
234
  zip: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cyberchef",
3
- "version": "9.34.0",
3
+ "version": "9.34.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",
@@ -45,18 +45,16 @@
45
45
  "@babel/plugin-transform-runtime": "^7.17.0",
46
46
  "@babel/preset-env": "^7.16.11",
47
47
  "@babel/runtime": "^7.17.8",
48
- "autoprefixer": "^10.3.1",
48
+ "autoprefixer": "^10.4.4",
49
49
  "babel-loader": "^8.2.4",
50
50
  "babel-plugin-dynamic-import-node": "^2.3.3",
51
51
  "chromedriver": "^99.0.0",
52
- "cli-progress": "^3.9.0",
52
+ "cli-progress": "^3.10.0",
53
53
  "colors": "^1.4.0",
54
- "copy-webpack-plugin": "^9.0.1",
54
+ "copy-webpack-plugin": "^10.2.4",
55
55
  "core-js": "^3.21.1",
56
- "css-loader": "5.2.7",
57
- "eslint": "^8.11.0",
58
- "exports-loader": "^3.0.0",
59
- "file-loader": "^6.2.0",
56
+ "css-loader": "6.7.1",
57
+ "eslint": "^8.12.0",
60
58
  "grunt": "^1.4.1",
61
59
  "grunt-chmod": "~1.1.1",
62
60
  "grunt-concurrent": "^3.0.0",
@@ -66,25 +64,23 @@
66
64
  "grunt-contrib-watch": "^1.1.0",
67
65
  "grunt-eslint": "^24.0.0",
68
66
  "grunt-exec": "~3.0.0",
69
- "grunt-webpack": "^4.0.3",
67
+ "grunt-webpack": "^5.0.0",
70
68
  "grunt-zip": "^0.18.2",
71
- "html-webpack-plugin": "^5.3.2",
72
- "imports-loader": "^3.0.0",
73
- "mini-css-extract-plugin": "1.3.7",
74
- "nightwatch": "^1.7.8",
75
- "postcss": "^8.3.6",
69
+ "html-webpack-plugin": "^5.5.0",
70
+ "imports-loader": "^3.1.1",
71
+ "mini-css-extract-plugin": "2.6.0",
72
+ "nightwatch": "^2.0.10",
73
+ "postcss": "^8.4.12",
76
74
  "postcss-css-variables": "^0.18.0",
77
- "postcss-import": "^14.0.2",
78
- "postcss-loader": "^6.1.1",
79
- "prompt": "^1.1.0",
80
- "sass-loader": "^12.1.0",
81
- "sitemap": "^7.0.0",
82
- "style-loader": "^3.2.1",
83
- "svg-url-loader": "^7.1.1",
84
- "url-loader": "^4.1.1",
75
+ "postcss-import": "^14.1.0",
76
+ "postcss-loader": "^6.2.1",
77
+ "prompt": "^1.2.2",
78
+ "sass-loader": "^12.6.0",
79
+ "sitemap": "^7.1.1",
80
+ "terser": "^5.12.1",
85
81
  "webpack": "^5.70.0",
86
- "webpack-bundle-analyzer": "^4.4.2",
87
- "webpack-dev-server": "3.11.2",
82
+ "webpack-bundle-analyzer": "^4.5.0",
83
+ "webpack-dev-server": "4.7.4",
88
84
  "webpack-node-externals": "^3.0.0",
89
85
  "worker-loader": "^3.0.8"
90
86
  },
@@ -94,22 +90,22 @@
94
90
  "avsc": "^5.7.3",
95
91
  "babel-plugin-transform-builtin-extend": "1.1.2",
96
92
  "bcryptjs": "^2.4.3",
97
- "bignumber.js": "^9.0.1",
98
- "blakejs": "^1.1.1",
99
- "bootstrap": "4.6.0",
93
+ "bignumber.js": "^9.0.2",
94
+ "blakejs": "^1.2.1",
95
+ "bootstrap": "4.6.1",
100
96
  "bootstrap-colorpicker": "^3.4.0",
101
97
  "bootstrap-material-design": "^4.1.3",
102
98
  "browserify-zlib": "^0.2.0",
103
- "bson": "^4.4.1",
99
+ "bson": "^4.6.2",
104
100
  "buffer": "^6.0.3",
105
- "cbor": "5.0.1",
101
+ "cbor": "8.1.0",
106
102
  "chi-squared": "^1.1.0",
107
103
  "codepage": "^1.15.0",
108
104
  "crypto-api": "^0.8.5",
109
105
  "crypto-browserify": "^3.12.0",
110
106
  "crypto-js": "^4.1.1",
111
107
  "ctph.js": "0.0.5",
112
- "d3": "6.5.0",
108
+ "d3": "7.3.0",
113
109
  "d3-hexbin": "^0.2.2",
114
110
  "diff": "^5.0.0",
115
111
  "es6-promisify": "^7.0.0",
@@ -119,7 +115,7 @@
119
115
  "file-saver": "^2.0.5",
120
116
  "flat": "^5.0.2",
121
117
  "geodesy": "1.1.3",
122
- "highlight.js": "^11.2.0",
118
+ "highlight.js": "^11.5.0",
123
119
  "jimp": "^0.16.1",
124
120
  "jquery": "3.6.0",
125
121
  "js-crc": "^0.2.0",
@@ -128,18 +124,18 @@
128
124
  "jsonpath": "^1.1.1",
129
125
  "jsonwebtoken": "^8.5.1",
130
126
  "jsqr": "^1.4.0",
131
- "jsrsasign": "^10.4.0",
127
+ "jsrsasign": "^10.5.14",
132
128
  "kbpgp": "2.1.15",
133
129
  "libbzip2-wasm": "0.0.4",
134
130
  "libyara-wasm": "^1.1.0",
135
131
  "lodash": "^4.17.21",
136
- "loglevel": "^1.7.1",
132
+ "loglevel": "^1.8.0",
137
133
  "loglevel-message-prefix": "^3.0.0",
138
134
  "markdown-it": "^12.3.2",
139
135
  "moment": "^2.29.1",
140
- "moment-timezone": "^0.5.33",
136
+ "moment-timezone": "^0.5.34",
141
137
  "ngeohash": "^0.6.3",
142
- "node-forge": "^0.10.0",
138
+ "node-forge": "^1.3.0",
143
139
  "node-md6": "^0.1.0",
144
140
  "node-sass": "^7.0.1",
145
141
  "nodom": "^2.4.0",
@@ -153,13 +149,12 @@
153
149
  "qr-image": "^3.2.0",
154
150
  "scryptsy": "^2.1.0",
155
151
  "snackbarjs": "^1.1.0",
156
- "sortablejs": "^1.14.0",
157
- "split.js": "^1.6.4",
152
+ "sortablejs": "^1.15.0",
153
+ "split.js": "^1.6.5",
158
154
  "ssdeep.js": "0.0.3",
159
155
  "stream-browserify": "^3.0.0",
160
- "terser": "^5.7.1",
161
156
  "tesseract.js": "2.1.5",
162
- "ua-parser-js": "^0.7.28",
157
+ "ua-parser-js": "^1.0.2",
163
158
  "unorm": "^1.6.0",
164
159
  "utf8": "^3.0.0",
165
160
  "vkbeautify": "^0.99.3",
@@ -173,7 +168,7 @@
173
168
  "build": "npx grunt prod",
174
169
  "repl": "node --experimental-modules --experimental-json-modules --experimental-specifier-resolution=node --no-warnings src/node/repl.mjs",
175
170
  "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",
176
- "test-node-consumer": "npx grunt testnodeconsumer",
171
+ "testnodeconsumer": "npx grunt testnodeconsumer",
177
172
  "testui": "npx grunt testui",
178
173
  "testuidev": "npx nightwatch --env=dev",
179
174
  "lint": "npx grunt lint",
@@ -9251,6 +9251,7 @@
9251
9251
  "Pacific/Guam",
9252
9252
  "Pacific/Honolulu",
9253
9253
  "Pacific/Johnston",
9254
+ "Pacific/Kanton",
9254
9255
  "Pacific/Kiritimati",
9255
9256
  "Pacific/Kosrae",
9256
9257
  "Pacific/Kwajalein",
@@ -11784,6 +11785,7 @@
11784
11785
  "go",
11785
11786
  "golo",
11786
11787
  "gradle",
11788
+ "graphql",
11787
11789
  "groovy",
11788
11790
  "haml",
11789
11791
  "handlebars",
@@ -13310,6 +13312,7 @@
13310
13312
  "Pacific/Guam",
13311
13313
  "Pacific/Honolulu",
13312
13314
  "Pacific/Johnston",
13315
+ "Pacific/Kanton",
13313
13316
  "Pacific/Kiritimati",
13314
13317
  "Pacific/Kosrae",
13315
13318
  "Pacific/Kwajalein",
@@ -13915,6 +13918,7 @@
13915
13918
  "Pacific/Guam",
13916
13919
  "Pacific/Honolulu",
13917
13920
  "Pacific/Johnston",
13921
+ "Pacific/Kanton",
13918
13922
  "Pacific/Kiritimati",
13919
13923
  "Pacific/Kosrae",
13920
13924
  "Pacific/Kwajalein",
@@ -29,7 +29,7 @@
29
29
  <meta name="description" content="The Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis" />
30
30
  <meta name="keywords" content="base64, hex, decode, encode, encrypt, decrypt, compress, decompress, regex, regular expressions, hash, crypt, hexadecimal, user agent, url, certificate, x.509, parser, JSON, gzip, md5, sha1, aes, des, blowfish, xor" />
31
31
 
32
- <link rel="icon" type="image/ico" href="<%- require('../static/images/favicon.ico').default %>" />
32
+ <link rel="icon" type="image/ico" href="<%- require('../static/images/favicon.ico') %>" />
33
33
 
34
34
  <script type="application/javascript">
35
35
  "use strict";
@@ -197,7 +197,7 @@
197
197
  </button>
198
198
 
199
199
  <button type="button" class="mx-2 btn btn-lg btn-success btn-raised btn-block" id="bake">
200
- <img aria-hidden="true" src="<%- require('../static/images/cook_male-32x32.png').default %>" alt="Chef Icon"/>
200
+ <img aria-hidden="true" src="<%- require('../static/images/cook_male-32x32.png') %>" alt="Chef Icon"/>
201
201
  <span>Bake!</span>
202
202
  </button>
203
203
 
@@ -271,7 +271,7 @@
271
271
  <div class="file-overlay" id="file-overlay"></div>
272
272
  <div style="position: relative; height: 100%;">
273
273
  <div class="io-card card">
274
- <img aria-hidden="true" src="<%- require('../static/images/file-128x128.png').default %>" alt="File icon" id="input-file-thumbnail"/>
274
+ <img aria-hidden="true" src="<%- require('../static/images/file-128x128.png') %>" alt="File icon" id="input-file-thumbnail"/>
275
275
  <div class="card-body">
276
276
  <button type="button" class="close" id="input-file-close">&times;</button>
277
277
  Name: <span id="input-file-name"></span><br>
@@ -346,12 +346,12 @@
346
346
  <div id="output-highlighter" class="no-select"></div>
347
347
  <div id="output-html"></div>
348
348
  <textarea id="output-text" readonly="readonly" spellcheck="false"></textarea>
349
- <img id="show-file-overlay" aria-hidden="true" src="<%- require('../static/images/file-32x32.png').default %>" alt="Show file overlay" title="Show file overlay"/>
349
+ <img id="show-file-overlay" aria-hidden="true" src="<%- require('../static/images/file-32x32.png') %>" alt="Show file overlay" title="Show file overlay"/>
350
350
  <div id="output-file">
351
351
  <div class="file-overlay"></div>
352
352
  <div style="position: relative; height: 100%;">
353
353
  <div class="io-card card">
354
- <img aria-hidden="true" src="<%- require('../static/images/file-128x128.png').default %>" alt="File icon"/>
354
+ <img aria-hidden="true" src="<%- require('../static/images/file-128x128.png') %>" alt="File icon"/>
355
355
  <div class="card-body">
356
356
  Size: <span id="output-file-size"></span><br>
357
357
  <button id="output-file-download" type="button" class="btn btn-primary btn-outline">Download</button>
@@ -626,7 +626,7 @@
626
626
  <h5 class="modal-title">CyberChef - The Cyber Swiss Army Knife</h5>
627
627
  </div>
628
628
  <div class="modal-body">
629
- <img aria-hidden="true" class="about-img-left" src="<%- require('../static/images/cyberchef-128x128.png').default %>" alt="CyberChef Logo"/>
629
+ <img aria-hidden="true" class="about-img-left" src="<%- require('../static/images/cyberchef-128x128.png') %>" alt="CyberChef Logo"/>
630
630
  <p class="subtext">
631
631
  Version <%= htmlWebpackPlugin.options.version %><br>
632
632
  Compile time: <%= htmlWebpackPlugin.options.compileTime %>
@@ -749,7 +749,7 @@
749
749
  <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
750
750
  </div>
751
751
  <a href="https://github.com/gchq/CyberChef">
752
- <img aria-hidden="true" style="position: absolute; top: 0; right: 0; border: 0;" src="<%- require('../static/images/fork_me.png').default %>" alt="Fork me on GitHub">
752
+ <img aria-hidden="true" style="position: absolute; top: 0; right: 0; border: 0;" src="<%- require('../static/images/fork_me.png') %>" alt="Fork me on GitHub">
753
753
  </a>
754
754
  </div>
755
755
  </div>
@@ -71,7 +71,7 @@ module.exports = {
71
71
  .moveToElement(toHex, 10, 10)
72
72
  .useCss()
73
73
  .waitForElementVisible(".popover-body", 1000)
74
- .doubleClick();
74
+ .doubleClick("xpath", toHex);
75
75
 
76
76
  // Confirm that it has been added to the recipe
77
77
  browser
@@ -90,7 +90,7 @@ module.exports = {
90
90
  browser
91
91
  .useCss()
92
92
  .waitForElementNotVisible("#stale-indicator", 1000)
93
- .expect.element("#output-text").to.have.value.that.equals("44 6f 6e 27 74 20 50 61 6e 69 63 2e");
93
+ .expect.element("#output-text").to.have.property("value").that.equals("44 6f 6e 27 74 20 50 61 6e 69 63 2e");
94
94
 
95
95
  // Clear recipe
96
96
  browser
@@ -202,11 +202,11 @@ module.exports = {
202
202
  browser
203
203
  .getLocationInView(genUUID)
204
204
  .moveToElement(genUUID, 10, 10)
205
- .doubleClick()
205
+ .doubleClick("xpath", genUUID)
206
206
  .useCss()
207
207
  .waitForElementVisible(".operation .op-title", 1000)
208
208
  .waitForElementNotVisible("#stale-indicator", 1000)
209
- .expect.element("#output-text").to.have.value.which.matches(/[\da-f-]{36}/);
209
+ .expect.element("#output-text").to.have.property("value").which.matches(/[\da-f-]{36}/);
210
210
 
211
211
  browser.click("#clr-recipe");
212
212
  },
@@ -393,13 +393,13 @@ function testOp(browser, opName, input, output, args=[]) {
393
393
  .click("#clr-recipe")
394
394
  .click("#clr-io")
395
395
  .waitForElementNotPresent("#rec-list li.operation")
396
- .expect.element("#input-text").to.have.value.that.equals("");
396
+ .expect.element("#input-text").to.have.property("value").that.equals("");
397
397
 
398
398
  browser
399
399
  .urlHash("recipe=" + recipeConfig)
400
400
  .setValue("#input-text", input)
401
401
  .waitForElementPresent("#rec-list li.operation")
402
- .expect.element("#input-text").to.have.value.that.equals(input);
402
+ .expect.element("#input-text").to.have.property("value").that.equals(input);
403
403
 
404
404
  browser
405
405
  .waitForElementVisible("#stale-indicator", 5000)
@@ -410,8 +410,8 @@ function testOp(browser, opName, input, output, args=[]) {
410
410
  .waitForElementNotVisible("#output-loader", 5000);
411
411
 
412
412
  if (typeof output === "string") {
413
- browser.expect.element("#output-text").to.have.value.that.equals(output);
413
+ browser.expect.element("#output-text").to.have.property("value").that.equals(output);
414
414
  } else if (output instanceof RegExp) {
415
- browser.expect.element("#output-text").to.have.value.that.matches(output);
415
+ browser.expect.element("#output-text").to.have.property("value").that.matches(output);
416
416
  }
417
417
  }
@@ -685,8 +685,8 @@ Arguments:
685
685
  it("Parse user agent", () => {
686
686
  const result = chef.parseUserAgent("Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0 ");
687
687
  const expected = `Browser
688
- Name: Mozilla
689
- Version: 5.0
688
+ Name: Firefox
689
+ Version: 47.0
690
690
  Device
691
691
  Model: unknown
692
692
  Type: unknown
package/webpack.config.js CHANGED
@@ -36,7 +36,8 @@ const banner = `/**
36
36
  module.exports = {
37
37
  output: {
38
38
  publicPath: "",
39
- globalObject: "this"
39
+ globalObject: "this",
40
+ assetModuleFilename: "assets/[hash][ext][query]"
40
41
  },
41
42
  plugins: [
42
43
  new webpack.ProvidePlugin({
@@ -122,7 +123,7 @@ module.exports = {
122
123
  },
123
124
  {
124
125
  test: /prime.worker.min.js$/,
125
- use: "raw-loader"
126
+ type: "asset/source"
126
127
  },
127
128
  {
128
129
  test: /bootstrap-material-design/,
@@ -165,53 +166,33 @@ module.exports = {
165
166
  "sass-loader",
166
167
  ]
167
168
  },
168
- /**
169
- * The limit for these files has been increased to 60,000 (60KB)
170
- * to ensure the material icons font is inlined.
171
- *
172
- * See: https://github.com/gchq/CyberChef/issues/612
173
- */
174
169
  {
175
170
  test: /\.(ico|eot|ttf|woff|woff2)$/,
176
- loader: "url-loader",
177
- options: {
178
- limit: 60000,
179
- name: "[hash].[ext]",
180
- outputPath: "assets"
181
- }
171
+ type: "asset/resource",
182
172
  },
183
173
  {
184
174
  test: /\.svg$/,
185
- loader: "svg-url-loader",
186
- options: {
187
- encoding: "base64"
188
- }
175
+ type: "asset/inline",
189
176
  },
190
177
  { // Store font .fnt and .png files in a separate fonts folder
191
178
  test: /(\.fnt$|bmfonts\/.+\.png$)/,
192
- loader: "file-loader",
193
- options: {
194
- name: "[name].[ext]",
195
- outputPath: "assets/fonts"
179
+ type: "asset/resource",
180
+ generator: {
181
+ filename: "assets/fonts/[name][ext]"
196
182
  }
197
183
  },
198
184
  { // First party images are saved as files to be cached
199
185
  test: /\.(png|jpg|gif)$/,
200
186
  exclude: /(node_modules|bmfonts)/,
201
- loader: "file-loader",
202
- options: {
203
- name: "images/[name].[ext]"
187
+ type: "asset/resource",
188
+ generator: {
189
+ filename: "images/[name][ext]"
204
190
  }
205
191
  },
206
192
  { // Third party images are inlined
207
193
  test: /\.(png|jpg|gif)$/,
208
194
  exclude: /web\/static/,
209
- loader: "url-loader",
210
- options: {
211
- limit: 10000,
212
- name: "[hash].[ext]",
213
- outputPath: "assets"
214
- }
195
+ type: "asset/inline",
215
196
  },
216
197
  ]
217
198
  },
@@ -219,14 +200,15 @@ module.exports = {
219
200
  children: false,
220
201
  chunks: false,
221
202
  modules: false,
222
- entrypoints: false,
223
- warningsFilter: [
224
- /source-map/,
225
- /dependency is an expression/,
226
- /export 'default'/,
227
- /Can't resolve 'sodium'/
228
- ],
203
+ entrypoints: false
229
204
  },
205
+ ignoreWarnings: [
206
+ /source-map/,
207
+ /source map/,
208
+ /dependency is an expression/,
209
+ /export 'default'/,
210
+ /Can't resolve 'sodium'/
211
+ ],
230
212
  performance: {
231
213
  hints: false
232
214
  }