Skip to content

Commit 1548b03

Browse files
authored
Merge branch 'master' into feature/add-argon2-operation
2 parents c92e09e + 05e65a7 commit 1548b03

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+300
-541
lines changed

.eslintignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
src/core/vendor/**
2-
src/web/static/clippy_assets/**
1+
src/core/vendor/**

.github/ISSUE_TEMPLATE/bug-report.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ If applicable, add screenshots to help explain your problem.
2626

2727
**Desktop (if relevant, please complete the following information):**
2828
- OS: [e.g. Windows]
29-
- Browser [e.g. chrome, safari]
30-
- Version [e.g. 22]
29+
- Browser: [e.g. chrome 72, firefox 60]
30+
- CyberChef version: [e.g. 9.7.14]
3131

3232
**Additional context**
3333
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/bug_report.md

-34
This file was deleted.

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: node_js
22
node_js:
3-
- lts/*
3+
- lts/dubnium
44
cache: npm
55
addons:
66
chrome: stable

Gruntfile.js

+37-18
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ const path = require("path");
1414
* @license Apache-2.0
1515
*/
1616

17-
1817
module.exports = function (grunt) {
1918
grunt.file.defaultEncoding = "utf8";
2019
grunt.file.preserveBOM = false;
@@ -102,6 +101,26 @@ module.exports = function (grunt) {
102101
return entryModules;
103102
}
104103

104+
/**
105+
* Detects the correct delimiter to use to chain shell commands together
106+
* based on the current OS.
107+
*
108+
* @param {string[]} cmds
109+
* @returns {string}
110+
*/
111+
function chainCommands(cmds) {
112+
const win = process.platform === "win32";
113+
if (!win) {
114+
return cmds.join(";");
115+
}
116+
return cmds
117+
// && means that subsequent commands will not be executed if the
118+
// previous one fails. & would coninue on a fail
119+
.join("&&")
120+
// Windows does not support \n properly
121+
.replace("\n", "\\n");
122+
}
123+
105124
grunt.initConfig({
106125
clean: {
107126
dev: ["build/dev/*"],
@@ -316,10 +335,10 @@ module.exports = function (grunt) {
316335
},
317336
exec: {
318337
repoSize: {
319-
command: [
338+
command: chainCommands([
320339
"git ls-files | wc -l | xargs printf '\n%b\ttracked files\n'",
321340
"du -hs | egrep -o '^[^\t]*' | xargs printf '%b\trepository size\n'"
322-
].join(";"),
341+
]),
323342
stderr: false
324343
},
325344
cleanGit: {
@@ -329,20 +348,20 @@ module.exports = function (grunt) {
329348
command: "node --experimental-modules --no-warnings --no-deprecation src/web/static/sitemap.mjs > build/prod/sitemap.xml"
330349
},
331350
generateConfig: {
332-
command: [
351+
command: chainCommands([
333352
"echo '\n--- Regenerating config files. ---'",
334353
"echo [] > src/core/config/OperationConfig.json",
335354
"node --experimental-modules --no-warnings --no-deprecation src/core/config/scripts/generateOpsIndex.mjs",
336355
"node --experimental-modules --no-warnings --no-deprecation src/core/config/scripts/generateConfig.mjs",
337356
"echo '--- Config scripts finished. ---\n'"
338-
].join(";")
357+
])
339358
},
340359
generateNodeIndex: {
341-
command: [
360+
command: chainCommands([
342361
"echo '\n--- Regenerating node index ---'",
343362
"node --experimental-modules --no-warnings --no-deprecation src/node/config/scripts/generateNodeIndex.mjs",
344363
"echo '--- Node index generated. ---\n'"
345-
].join(";"),
364+
]),
346365
},
347366
opTests: {
348367
command: "node --experimental-modules --no-warnings --no-deprecation tests/operations/index.mjs"
@@ -354,40 +373,40 @@ module.exports = function (grunt) {
354373
command: "node --experimental-modules --no-warnings --no-deprecation tests/node/index.mjs"
355374
},
356375
setupNodeConsumers: {
357-
command: [
358-
"echo '\n--- Testing node conumers ---'",
376+
command: chainCommands([
377+
"echo '\n--- Testing node consumers ---'",
359378
"npm link",
360379
`mkdir ${nodeConsumerTestPath}`,
361380
`cp tests/node/consumers/* ${nodeConsumerTestPath}`,
362381
`cd ${nodeConsumerTestPath}`,
363382
"npm link cyberchef"
364-
].join(";"),
383+
]),
365384
},
366385
teardownNodeConsumers: {
367-
command: [
386+
command: chainCommands([
368387
`rm -rf ${nodeConsumerTestPath}`,
369388
"echo '\n--- Node consumer tests complete ---'"
370-
].join(";"),
389+
]),
371390
},
372391
testCJSNodeConsumer: {
373-
command: [
392+
command: chainCommands([
374393
`cd ${nodeConsumerTestPath}`,
375394
"node --no-warnings cjs-consumer.js",
376-
].join(";"),
395+
]),
377396
stdout: false,
378397
},
379398
testESMNodeConsumer: {
380-
command: [
399+
command: chainCommands([
381400
`cd ${nodeConsumerTestPath}`,
382401
"node --no-warnings --experimental-modules esm-consumer.mjs",
383-
].join(";"),
402+
]),
384403
stdout: false,
385404
},
386405
testESMDeepImportNodeConsumer: {
387-
command: [
406+
command: chainCommands([
388407
`cd ${nodeConsumerTestPath}`,
389408
"node --no-warnings --experimental-modules esm-deep-import-consumer.mjs",
390-
].join(";"),
409+
]),
391410
stdout: false,
392411
},
393412
},

README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,15 @@ You can use as many operations as you like in simple or complex ways. Some examp
6969
- 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.
7070
- CyberChef is entirely client-side
7171
- 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-
- Due to this feature, CyberChef can be compiled into a single HTML file. You can download this file and drop it into a virtual machine, share it with other people, or use it independently on your local machine.
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.
73+
74+
75+
## Deep linking
76+
77+
By manipulation of CyberChef's URL hash, you can change the initial settings with which the page opens.
78+
The format is `https://gchq.github.io/CyberChef/#recipe=Operation()&input=...`
79+
80+
Supported arguments are `recipe`, `input` (encoded in Base64), and `theme`.
7381

7482

7583
## Browser support

0 commit comments

Comments
 (0)