2
0
mirror of https://github.com/gchq/CyberChef synced 2026-01-29 15:53:36 +00:00

Compare commits

..

53 Commits

Author SHA1 Message Date
C85297
2092e5b20c 10.20.0 2026-01-28 16:11:57 +00:00
C85297
621331b03e Update CHANGELOG for v10.20.0 2026-01-28 16:10:51 +00:00
jg42526
2a1294f1c0 Merge pull request #1978 from mikecat/use-bigint-for-varint
Use BigInt for encoding/decoding VarInt
2025-08-06 09:46:48 +01:00
jg42526
fb968da64f Merge branch 'master' into use-bigint-for-varint 2025-08-06 08:54:59 +01:00
jg42526
314a14a45b Merge pull request #1545 from starplanet/master
Fixed ToDecimal signed logic
2025-07-23 11:25:15 +01:00
jg42526
dc8121e7fc Merge branch 'master' into master 2025-07-23 10:29:17 +01:00
jg42526
554a3b071e Merge pull request #1884 from 0xff1ce/fix(ShowOnMap)
Show On Map updated to use leaflet over WikiMedia
2025-07-16 08:21:47 +01:00
jg42526
9fc91b3fc6 Merge pull request #1873 from remingtr/enhance-README
Add more clear build instructions
2025-07-16 07:11:41 +01:00
jg42526
6dd651a4df Removed colon
Colon not required on heading, minor change to force rebuild
2025-07-16 07:00:12 +01:00
jg42526
c57556f49f Merge pull request #2021 from kendallgoto/kgoto/add-handlebar
Add new operation: Template
2025-05-16 11:22:50 +01:00
jg42526
18e5b9f6ec Merge branch 'master' into kgoto/add-handlebar 2025-05-16 11:03:44 +01:00
a3957273
411f78d27a Merge pull request #2011 from bartvanandel/feat/1216-1531-upgrade-uuid 2025-05-12 16:44:22 +01:00
a3957273
7ed7fca3ad Merge branch 'master' into feat/1216-1531-upgrade-uuid 2025-05-12 16:24:53 +01:00
a3957273
5d3353189b Merge pull request #2015 from bartvanandel/fix/use-default-index-in-option-transform 2025-05-12 16:24:35 +01:00
a3957273
f92238bf04 Merge pull request #2023 from xumptex/feature/add-BLAKE3 2025-05-12 16:14:00 +01:00
a3957273
2b1ceef6a3 Merge pull request #2025 from ericli-splunk/patch-1 2025-05-12 16:06:53 +01:00
a3957273
f4e73eef54 Merge pull request #1986 from Odyhibit/master 2025-05-12 16:05:42 +01:00
gchqdev364
d751117219 Merge pull request #2041 from gchq/octal-ip-addresses
Addresses bug report #2008
Added explicit support for octal IP addresses.
Changed approach to IPv4 regex to be string manipulation generated.
Added some unit tests for IP address parsing - probably not full coverage.
Added lookahead and lookbehind tricks to resolve warned issue that 1.2.3.256 would still be extracted as 1.2.3.25. Now only accepts valid IP addresses. Warning replaced with clause about infinite length dotted decimal forms.
2025-05-12 15:51:03 +01:00
a3957273
a55075fdb6 Merge pull request #2042 from Sma-Das/patch-1 2025-05-12 15:45:26 +01:00
Sma Das
a7443778b8 update: dockerfile
Updated Dockerfile to correctly build on ARM64 platforms. The previous version failed.
2025-05-12 10:22:22 -04:00
a3957273
06f1982acf Merge pull request #2038 from GCHQDeveloper94872/Issue-2036-Safari-load-bug 2025-05-12 15:04:14 +01:00
es45411
761173bce7 Merge pull request #2040 from gchq/feature/add-toggle-plus-to-urldecode
Add toggle "+" character to URLDecode operation
2025-05-12 14:42:15 +01:00
es45411
3a55b34214 Add tests for URLDecode and URLEncode 2025-05-12 13:09:59 +00:00
es45411
95d5fd1789 Add treat space as plus URLDecode option 2025-05-12 13:09:49 +00:00
GCHQDeveloper94872
f24bd92e34 Merge branch 'master' into Issue-2036-Safari-load-bug 2025-05-12 13:51:00 +01:00
GCHQDeveloper94872
e4f4d9c1c5 Workaround for Safari load bug 2025-05-12 12:15:41 +00:00
Josh Bloom
0a94c4a7c9 Merge branch 'master' into master 2025-04-22 23:33:28 -05:00
ericli-splunk
64355c9dde Fix email regex 2025-04-17 15:46:37 -07:00
Jeremy Giudicelli
bd8906f46b fix : add Categories and index 2025-04-17 13:40:01 +02:00
Jeremy Giudicelli
26d8fa51b0 fix : delete space and add new line 2025-04-17 13:27:45 +02:00
Jeremy Giudicelli
ad91099d5e feat : add Blake3 hashing
import hash-wasm to hash inputs in utf-8 with optional key also in utf-8 and outputs in Hex
2025-04-17 11:37:35 +02:00
Kendall Goto
361a3b2929 Add Template operation for basic JSON rendering 2025-04-09 15:54:39 -07:00
Bart van Andel
b9ed1fde62 fix: use defaultIndex instead of 0 in transformArgs 2025-04-05 23:01:52 +02:00
Bart van Andel
a0ade26505 fix: improve UUID description
- Link to uuid package at npmjs
- Briefly explain supported UUID versions for generation
2025-04-05 22:59:03 +02:00
Bart van Andel
575eade84d fix: simplify UUID argument names, use hint for more info 2025-04-05 22:51:59 +02:00
Bart van Andel
2cf3642493 fix: use UUID v4 by default, for backward compatibility 2025-04-05 22:49:54 +02:00
Bart van Andel
de5b03f854 chore: fix class name for analyse UUID operation 2025-04-04 10:24:46 +02:00
Bart van Andel
457d28fc55 feat: support UUID v1, v3, v4, v5, v6, v7
- Add v6 and v7 as valid options
- Add unit tests for generating and analyzing all supported versions
2025-04-04 10:24:46 +02:00
victorlpgazolli
e0bdde89c4 testing only class default value 2025-04-04 10:24:46 +02:00
victorlpgazolli
68db8e93b7 ref assert validation uuid tests 2025-04-04 10:24:46 +02:00
victorlpgazolli
9069d8e3ec ref uuid tests 2025-04-04 10:24:46 +02:00
victorlpgazolli
e146636250 add more uuid tests 2025-04-04 10:24:45 +02:00
victorlpgazolli
c0af2a9eb5 add analyse uuid category 2025-04-04 10:24:45 +02:00
victorlpgazolli
ae5648ede1 add analyse uuid version 2025-04-04 10:24:45 +02:00
victorlpgazolli
197d6735d2 ref generate uuid versions v1, v3, v4 and v5 2025-04-04 10:24:45 +02:00
victorlpgazolli
75b52bef6d add uuid dependency 2025-04-04 10:24:45 +02:00
Odyhibit
2c32a64bfe Remove trim from rail fence. 2025-02-21 20:40:37 -06:00
MikeCAT
54a63b37bd Use BigInt for encoding/decoding VarInt 2025-02-16 19:54:55 +00:00
a3957273
3aed784ce2 Merge branch 'master' into fix(ShowOnMap) 2025-02-12 20:06:26 +00:00
Niall
77a43b4f78 Merge branch 'master' into fix(ShowOnMap) 2024-11-14 18:29:37 +00:00
Niall
d58e162bfa Fixes an issue with ShowOnMap where previous tileUrl would result in 403 errors when pulling images, also bumped to leaflet 1.9.4 as the latest stable version
Changed tileUrl provider to openstreetmap directly and updated tileAttribution, as well as infoURL
2024-08-23 19:37:00 +00:00
remingtr
77c2b7923d Add more clear build instructions
Added more clear build instructions to the README.
2024-08-09 16:20:38 -07:00
starplanet
73a39fa3ce fix: fix ToDecimal signed logic 2023-04-05 18:25:37 +08:00
27 changed files with 761 additions and 107 deletions

View File

@@ -13,6 +13,75 @@ All major and minor version changes will be documented in this file. Details of
## Details
### [10.20.0] - 2026-01-28
- Fixed Optical Character Recognition and added tests [@n1474335] | [ab37c1e]
- Fixed JA4 version fallback value [@n1474335] | [7a5225c]
- Updated chromedriver [@n1474335] | [0e82e4b]
- Fixed RSA Sign and Verify character encodings [@n1474335] | [895a929]
- Updated chromedriver [@n1474335] | [d3adfc7]
- Added message format arg to RSA Verify operation [@n1474335] | [47c85a1]
- Add operation for parsing X.509 CRLs [@robinsandhu] | [#1887]
- Fix typo in description of JWT Sign recipe [@GuilhermoReadonly] | [#1961]
- Corrected path to generateNodeIndex.mjs [@simonarnell] | [#1959]
- Add 'header' ingredient to JWT Sign operation [@RandomByte] | [#1957]
- Add Parse TLS record operation [@c65722] | [#1936]
- Automatically detect chrome driver version [@gchq] | [#1972]
- Add Strip UDP header operation [@c65722] | [#1900]
- Add Strip TCP header operation [@c65722] | [#1898]
- Webpack compress with gzip and brotli [@max0x53] | [#1955]
- add offset field to 'Add Line Numbers' operation [@Adamkadaban] | [#1866]
- Disable flakey URL test [@a3957273] | [#1973]
- Add Strip IPv4 header operation [@c65722] | [#1899]
- IPv6 Transition Operation [@jb30795] | [#1780]
- fix: Blowfish - ignore IV length in ECB mode [@FranciscoPombal] | [#1902]
- Add 'Drop nth bytes' operation [@Oshawk] | [#1914]
- Add 'Take nth bytes' operation [@Oshawk] | [#1915]
- Add Leet Speak [@bartblaze] | [#1971]
- Fix Generate TOTP & HOPT [@exactlyaron] | [#1966]
- Updated luhn checksum operation to work with different bases [@k3ach] | [#1933]
- automatically theme mode based on user preference [@vs4vijay] | [#1921]
- fix: DES/Triple DES - misleading error messages [@FranciscoPombal] | [#1904]
- fix: ROT13 - shifting numbers by negative amounts [@FranciscoPombal] | [#1903]
- Introduce Yubico's Modhex for Conversion [@linuxgemini] | [#1105]
- Feature: MIME RFC2047 Decoding [@MShwed] | [#630]
- CC-1889 add _ option [@depperm] | [#1977]
- chore(root): add cspell [@evenstensberg] | [#1976]
- Preserve uppercase for Leet Speak [@bartblaze] | [#1981]
- Load the user's preferred color scheme if the URL contains an invalid theme [@0xh3xa] | [#2007]
- Add SM2 Encrypt and Decrypt Operations [@flakjacket95] | [#1909]
- Support jq as an operation. [@zhzy0077] | [#1604]
- Add fingerprints to the 'Parse X.509 certificate' operation [@JSCU-CNI] | [#1863]
- Added a JSON to YAML and a YAML to JSON operation [@ccarpo] | [#1286]
- Add CRC Operation [@r4mos] | [#1993]
- Bug Fix: selected theme not loading when refreshing [@0xh3xa] | [#2006]
- Fix(RecipeWaiter): sanitize user input in addOperation to prevent XSS [@0xh3xa] | [#2014]
- Docker multiplatform build support [@PathToLife] | [#1974]
- Add Base32 Hex Extended Alphabet and Base32 Tests. [@peterc-s] | [#1991]
- Add ECB/NoPadding and CBC/NoPadding support to AES encryption [@plvie] | [#2013]
- Add new operation: PHP Serialize [@brun0ne] | [#1548]
- Push input through postmessage [@kenduguay1] | [#1992]
- Add jsonata query operation [@jonking-ajar] | [#1587]
- Re-enable Npm Release in github workflows [@PathToLife] | [#2031]
- Add to ECDSA Verify the message format [@r4mos] | [#2027]
- Added alternating caps functionality [@sw5678] | [#1897]
- XOR Checksum operation added [@jg42526] | [#2035]
- Add GenerateAllChecksums operation * Remove checksums from GenerateAllHashes operation [@es45411] | [66d445c]
- Update GenerateAllChecksums infoURL [@es45411] | [#2037]
- Add toggle "+" character to URLDecode operation [@es45411] | [#2040]
- Workaround for Safari load bug [@GCHQDeveloper94872] | [#2038]
- Updated Dockerfile to correctly build on ARM64 platforms [@Sma-Das] | [#2042]
- Addresses bug report #2008 Added explicit support for octal IP addresses. Changed approach to IPv4 regex to be string manipulation generated. Added some unit tests for IP address parsing - probably not full coverage. Added lookahead and lookbehind tricks to resolve warned issue that 1.2.3.256 would still be extracted as 1.2.3.25. Now only accepts valid IP addresses. Warning replaced with clause about infinite length dotted decimal forms. [@gchqdev364] | [#2041]
- Remove trim from rail fence [@Odyhibit] | [#1986]
- Fix email regex [@ericli-splunk] | [#2025]
- Add Blake3 hashing [@xumptex] | [#2023]
- Use defaultIndex instead of 0 in transformArgs [@bartvanandel] | [#2015]
- Add "Generate UUID" and "Analyse UUID" operations [@bartvanandel] | [#2011]
- Add new operation: Template [@kendallgoto] | [#2021]
- Add more clear build instructions [@remingtr] | [#1873]
- Show On Map updated to use leaflet over WikiMedia [@0xff1ce] | [#1884]
- Fixed ToDecimal signed logic [@starplanet] | [#1545]
- Use BigInt for encoding/decoding VarInt [@mikecat] | [#1978]
### [10.19.0] - 2024-06-21
- Add support for ECDSA and DSA in 'Parse CSR' [@robinsandhu] | [#1828]
- Fix typos in SIGABA.mjs [@eltociear] | [#1834]
@@ -440,6 +509,7 @@ All major and minor version changes will be documented in this file. Details of
## [4.0.0] - 2016-11-28
- Initial open source commit [@n1474335] | [b1d73a72](https://github.com/gchq/CyberChef/commit/b1d73a725dc7ab9fb7eb789296efd2b7e4b08306)
[10.20.0]: https://github.com/gchq/CyberChef/releases/tag/v10.20.0
[10.19.0]: https://github.com/gchq/CyberChef/releases/tag/v10.19.0
[10.18.0]: https://github.com/gchq/CyberChef/releases/tag/v10.18.0
[10.17.0]: https://github.com/gchq/CyberChef/releases/tag/v10.17.0
@@ -630,6 +700,60 @@ All major and minor version changes will be documented in this file. Details of
[@cplussharp]: https://github.com/cplussharp
[@robinsandhu]: https://github.com/robinsandhu
[@eltociear]: https://github.com/eltociear
[@GuilhermoReadonly]: https://github.com/GuilhermoReadonly
[@simonarnell]: https://github.com/simonarnell
[@RandomByte]: https://github.com/RandomByte
[@c65722]: https://github.com/c65722
[@c65722]: https://github.com/c65722
[@c65722]: https://github.com/c65722
[@max0x53]: https://github.com/max0x53
[@Adamkadaban]: https://github.com/Adamkadaban
[@c65722]: https://github.com/c65722
[@jb30795]: https://github.com/jb30795
[@FranciscoPombal]: https://github.com/FranciscoPombal
[@Oshawk]: https://github.com/Oshawk
[@Oshawk]: https://github.com/Oshawk
[@bartblaze]: https://github.com/bartblaze
[@exactlyaron]: https://github.com/exactlyaron
[@k3ach]: https://github.com/k3ach
[@vs4vijay]: https://github.com/vs4vijay
[@FranciscoPombal]: https://github.com/FranciscoPombal
[@FranciscoPombal]: https://github.com/FranciscoPombal
[@linuxgemini]: https://github.com/linuxgemini
[@depperm]: https://github.com/depperm
[@evenstensberg]: https://github.com/evenstensberg
[@bartblaze]: https://github.com/bartblaze
[@0xh3xa]: https://github.com/0xh3xa
[@flakjacket95]: https://github.com/flakjacket95
[@zhzy0077]: https://github.com/zhzy0077
[@JSCU-CNI]: https://github.com/JSCU-CNI
[@ccarpo]: https://github.com/ccarpo
[@r4mos]: https://github.com/r4mos
[@0xh3xa]: https://github.com/0xh3xa
[@0xh3xa]: https://github.com/0xh3xa
[@PathToLife]: https://github.com/PathToLife
[@peterc-s]: https://github.com/peterc-s
[@plvie]: https://github.com/plvie
[@kenduguay1]: https://github.com/kenduguay1
[@jonking-ajar]: https://github.com/jonking-ajar
[@PathToLife]: https://github.com/PathToLife
[@r4mos]: https://github.com/r4mos
[@jg42526]: https://github.com/jg42526
[@es45411]: https://github.com/es45411
[@gchq]: https://github.com/gchq
[@gchqdev364]: https://github.com/gchqdev364
[@GCHQDeveloper94872]: https://github.com/GCHQDeveloper94872
[@Sma-Das]: https://github.com/Sma-Das
[@gchq]: https://github.com/gchq
[@Odyhibit]: https://github.com/Odyhibit
[@ericli-splunk]: https://github.com/ericli-splunk
[@xumptex]: https://github.com/xumptex
[@bartvanandel]: https://github.com/bartvanandel
[@bartvanandel]: https://github.com/bartvanandel
[@kendallgoto]: https://github.com/kendallgoto
[@remingtr]: https://github.com/remingtr
[@0xff1ce]: https://github.com/0xff1ce
[@starplanet]: https://github.com/starplanet
[8ad18b]: https://github.com/gchq/CyberChef/commit/8ad18bc7db6d9ff184ba3518686293a7685bf7b7
@@ -642,6 +766,46 @@ All major and minor version changes will be documented in this file. Details of
[760eff4]: https://github.com/gchq/CyberChef/commit/760eff49b5307aaa3104c5e5b437ffe62299acd1
[65ffd8d]: https://github.com/gchq/CyberChef/commit/65ffd8d65d88eb369f6f61a5d1d0f807179bffb7
[0a353ee]: https://github.com/gchq/CyberChef/commit/0a353eeb378b9ca5d49e23c7dfc175ae07107b08
[66d445c]: https://github.com/gchq/CyberChef/commit/66d445c5ef4e8bd896fd15396e3ce2d660d8ace1
[ab37c1e]: https://github.com/gchq/CyberChef/commit/ab37c1e562dbee0495ed32876ecbb8225282af25
[965570d]: https://github.com/gchq/CyberChef/commit/965570d2504c17ee1f96211a1dc10ed40cd2b332
[a477f47]: https://github.com/gchq/CyberChef/commit/a477f47aecd01d78b11fe186ed4b20d9c487cfac
[7a5225c]: https://github.com/gchq/CyberChef/commit/7a5225c961a5e0d192b03152117cd10a761f73d6
[5f88ae4]: https://github.com/gchq/CyberChef/commit/5f88ae44ec77228d9bed8f11e8cc8e7dcfb36914
[0e82e4b]: https://github.com/gchq/CyberChef/commit/0e82e4b7c6c77cadb8be61cb145e081d6ecfdc88
[d635cca]: https://github.com/gchq/CyberChef/commit/d635cca2106aae2a59caf0e5d7e3633ee1ea3155
[895a929]: https://github.com/gchq/CyberChef/commit/895a9299255525cb57886deb9d9fd4ba17ae9548
[270a333]: https://github.com/gchq/CyberChef/commit/270a33317944612d27ea1cc15275ad6b0ed097e5
[d3adfc7]: https://github.com/gchq/CyberChef/commit/d3adfc7c3e5719279524356bce5261bd8350c0f8
[47c85a1]: https://github.com/gchq/CyberChef/commit/47c85a105ddbdd4cabfa44ddddbc56e3907a8c33
[3822c6c]: https://github.com/gchq/CyberChef/commit/3822c6c520a0b4200abc675c33f46082f5b9efc6
[66d445c]: https://github.com/gchq/CyberChef/commit/66d445c5ef4e8bd896fd15396e3ce2d660d8ace1
[ab37c1e]: https://github.com/gchq/CyberChef/commit/ab37c1e562dbee0495ed32876ecbb8225282af25
[965570d]: https://github.com/gchq/CyberChef/commit/965570d2504c17ee1f96211a1dc10ed40cd2b332
[a477f47]: https://github.com/gchq/CyberChef/commit/a477f47aecd01d78b11fe186ed4b20d9c487cfac
[7a5225c]: https://github.com/gchq/CyberChef/commit/7a5225c961a5e0d192b03152117cd10a761f73d6
[5f88ae4]: https://github.com/gchq/CyberChef/commit/5f88ae44ec77228d9bed8f11e8cc8e7dcfb36914
[0e82e4b]: https://github.com/gchq/CyberChef/commit/0e82e4b7c6c77cadb8be61cb145e081d6ecfdc88
[d635cca]: https://github.com/gchq/CyberChef/commit/d635cca2106aae2a59caf0e5d7e3633ee1ea3155
[895a929]: https://github.com/gchq/CyberChef/commit/895a9299255525cb57886deb9d9fd4ba17ae9548
[270a333]: https://github.com/gchq/CyberChef/commit/270a33317944612d27ea1cc15275ad6b0ed097e5
[d3adfc7]: https://github.com/gchq/CyberChef/commit/d3adfc7c3e5719279524356bce5261bd8350c0f8
[47c85a1]: https://github.com/gchq/CyberChef/commit/47c85a105ddbdd4cabfa44ddddbc56e3907a8c33
[3822c6c]: https://github.com/gchq/CyberChef/commit/3822c6c520a0b4200abc675c33f46082f5b9efc6
[66d445c]: https://github.com/gchq/CyberChef/commit/66d445c5ef4e8bd896fd15396e3ce2d660d8ace1
[ab37c1e]: https://github.com/gchq/CyberChef/commit/ab37c1e562dbee0495ed32876ecbb8225282af25
[965570d]: https://github.com/gchq/CyberChef/commit/965570d2504c17ee1f96211a1dc10ed40cd2b332
[a477f47]: https://github.com/gchq/CyberChef/commit/a477f47aecd01d78b11fe186ed4b20d9c487cfac
[7a5225c]: https://github.com/gchq/CyberChef/commit/7a5225c961a5e0d192b03152117cd10a761f73d6
[5f88ae4]: https://github.com/gchq/CyberChef/commit/5f88ae44ec77228d9bed8f11e8cc8e7dcfb36914
[0e82e4b]: https://github.com/gchq/CyberChef/commit/0e82e4b7c6c77cadb8be61cb145e081d6ecfdc88
[d635cca]: https://github.com/gchq/CyberChef/commit/d635cca2106aae2a59caf0e5d7e3633ee1ea3155
[895a929]: https://github.com/gchq/CyberChef/commit/895a9299255525cb57886deb9d9fd4ba17ae9548
[270a333]: https://github.com/gchq/CyberChef/commit/270a33317944612d27ea1cc15275ad6b0ed097e5
[d3adfc7]: https://github.com/gchq/CyberChef/commit/d3adfc7c3e5719279524356bce5261bd8350c0f8
[47c85a1]: https://github.com/gchq/CyberChef/commit/47c85a105ddbdd4cabfa44ddddbc56e3907a8c33
[3822c6c]: https://github.com/gchq/CyberChef/commit/3822c6c520a0b4200abc675c33f46082f5b9efc6
[66d445c]: https://github.com/gchq/CyberChef/commit/66d445c5ef4e8bd896fd15396e3ce2d660d8ace1
[#95]: https://github.com/gchq/CyberChef/pull/299
[#173]: https://github.com/gchq/CyberChef/pull/173
@@ -778,4 +942,3 @@ All major and minor version changes will be documented in this file. Details of
[#512]: https://github.com/gchq/CyberChef/issues/512
[#1732]: https://github.com/gchq/CyberChef/issues/1732
[#1789]: https://github.com/gchq/CyberChef/issues/1789

View File

@@ -29,8 +29,7 @@ RUN npm run build
#########################################
# We are using Github Actions: redhat-actions/buildah-build@v2 which needs manual selection of arch in base image
# Remove TARGETARCH if docker buildx is supported in the CI release as --platform=$TARGETPLATFORM will be automatically set
ARG TARGETARCH
ARG TARGETPLATFORM
FROM ${TARGETARCH}/nginx:stable-alpine AS cyberchef
FROM --platform=${TARGETPLATFORM} nginx:stable-alpine AS cyberchef
COPY --from=builder /app/build/prod /usr/share/nginx/html/

View File

@@ -20,21 +20,36 @@ Cryptographic operations in CyberChef should not be relied upon to provide secur
[A live demo can be found here][1] - have fun!
## Containers
## Running Locally with Docker
If you would like to try out CyberChef locally you can either build it yourself:
**Prerequisites**
- [Docker](hhttps://www.docker.com/products/docker-desktop/)
- Docker Desktop must be open and running on your machine
#### Option 1: Build the Docker Image Yourself
1. Build the docker image
```bash
docker build --tag cyberchef --ulimit nofile=10000 .
```
2. Run the docker container
```bash
docker run -it -p 8080:80 cyberchef
```
3. Navigate to `http://localhost:8080` in your browser
Or you can use our image directly:
#### Option 2: Use the pre-built Docker Image
If you prefer to skip the build process, you can use the pre-built image
```bash
docker run -it -p 8080:80 ghcr.io/gchq/cyberchef:latest
```
Just like before, navigate to `http://localhost:8080` in your browser.
This image is built and published through our [GitHub Workflows](.github/workflows/releases.yml)
## How it works

73
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "cyberchef",
"version": "10.19.4",
"version": "10.20.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "cyberchef",
"version": "10.19.4",
"version": "10.20.0",
"hasInstallScript": true,
"license": "Apache-2.0",
"dependencies": {
@@ -46,6 +46,8 @@
"file-saver": "^2.0.5",
"flat": "^6.0.1",
"geodesy": "1.1.3",
"handlebars": "^4.7.8",
"hash-wasm": "^4.12.0",
"highlight.js": "^11.9.0",
"ieee754": "^1.2.1",
"jimp": "^0.22.12",
@@ -95,6 +97,7 @@
"ua-parser-js": "^1.0.38",
"unorm": "^1.6.0",
"utf8": "^3.0.0",
"uuid": "^11.1.0",
"vkbeautify": "^0.99.3",
"xpath": "0.0.34",
"xregexp": "^5.1.1",
@@ -10843,6 +10846,27 @@
"dev": true,
"license": "MIT"
},
"node_modules/handlebars": {
"version": "4.7.8",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz",
"integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==",
"license": "MIT",
"dependencies": {
"minimist": "^1.2.5",
"neo-async": "^2.6.2",
"source-map": "^0.6.1",
"wordwrap": "^1.0.0"
},
"bin": {
"handlebars": "bin/handlebars"
},
"engines": {
"node": ">=0.4.7"
},
"optionalDependencies": {
"uglify-js": "^3.1.4"
}
},
"node_modules/has-ansi": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
@@ -10941,6 +10965,11 @@
"node": ">= 0.10"
}
},
"node_modules/hash-wasm": {
"version": "4.12.0",
"resolved": "https://registry.npmjs.org/hash-wasm/-/hash-wasm-4.12.0.tgz",
"integrity": "sha512-+/2B2rYLb48I/evdOIhP+K/DD2ca2fgBjp6O+GBEnCDk2e4rpeXIK8GvIyRPjTezgmWn9gmKwkQjjx6BtqDHVQ=="
},
"node_modules/hash.js": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
@@ -13663,7 +13692,6 @@
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
"dev": true,
"license": "MIT"
},
"node_modules/netmask": {
@@ -13885,6 +13913,15 @@
"node": ">=8"
}
},
"node_modules/nightwatch/node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true,
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/nightwatch/node_modules/yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
@@ -16828,6 +16865,15 @@
"node": ">=0.8.0"
}
},
"node_modules/sockjs/node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true,
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/socks": {
"version": "2.8.3",
"resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz",
@@ -16868,7 +16914,6 @@
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"devOptional": true,
"license": "BSD-3-Clause",
"engines": {
"node": ">=0.10.0"
@@ -18115,13 +18160,15 @@
}
},
"node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true,
"license": "MIT",
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz",
"integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"bin": {
"uuid": "dist/bin/uuid"
"uuid": "dist/esm/bin/uuid"
}
},
"node_modules/v8flags": {
@@ -18886,6 +18933,12 @@
"node": ">=0.10.0"
}
},
"node_modules/wordwrap": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
"integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==",
"license": "MIT"
},
"node_modules/worker-loader": {
"version": "3.0.8",
"resolved": "https://registry.npmjs.org/worker-loader/-/worker-loader-3.0.8.tgz",

View File

@@ -1,6 +1,6 @@
{
"name": "cyberchef",
"version": "10.19.4",
"version": "10.20.0",
"description": "The Cyber Swiss Army Knife for encryption, encoding, compression and data analysis.",
"author": "n1474335 <n1474335@gmail.com>",
"homepage": "https://gchq.github.io/CyberChef",
@@ -132,6 +132,8 @@
"file-saver": "^2.0.5",
"flat": "^6.0.1",
"geodesy": "1.1.3",
"handlebars": "^4.7.8",
"hash-wasm": "^4.12.0",
"highlight.js": "^11.9.0",
"ieee754": "^1.2.1",
"jimp": "^0.22.12",
@@ -181,6 +183,7 @@
"ua-parser-js": "^1.0.38",
"unorm": "^1.6.0",
"utf8": "^3.0.0",
"uuid": "^11.1.0",
"vkbeautify": "^0.99.3",
"xpath": "0.0.34",
"xregexp": "^5.1.1",

View File

@@ -375,7 +375,8 @@
"Extract EXIF",
"Extract ID3",
"Extract Files",
"RAKE"
"RAKE",
"Template"
]
},
{
@@ -425,6 +426,7 @@
"Snefru",
"BLAKE2b",
"BLAKE2s",
"BLAKE3",
"GOST Hash",
"Streebog",
"SSDEEP",
@@ -549,6 +551,7 @@
"Pseudo-Random Number Generator",
"Generate De Bruijn Sequence",
"Generate UUID",
"Analyse UUID",
"Generate TOTP",
"Generate HOTP",
"Generate QR Code",

View File

@@ -0,0 +1,48 @@
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2023
* @license Apache-2.0
*/
import * as uuid from "uuid";
import Operation from "../Operation.mjs";
import OperationError from "../errors/OperationError.mjs";
/**
* Analyse UUID operation
*/
class AnalyseUUID extends Operation {
/**
* AnalyseUUID constructor
*/
constructor() {
super();
this.name = "Analyse UUID";
this.module = "Crypto";
this.description = "Tries to determine information about a given UUID and suggests which version may have been used to generate it";
this.infoURL = "https://wikipedia.org/wiki/Universally_unique_identifier";
this.inputType = "string";
this.outputType = "string";
this.args = [];
}
/**
* @param {string} input
* @param {Object[]} args
* @returns {string}
*/
run(input, args) {
try {
const uuidVersion = uuid.version(input);
return "UUID version: " + uuidVersion;
} catch (error) {
throw new OperationError("Invalid UUID");
}
}
}
export default AnalyseUUID;

View File

@@ -0,0 +1,58 @@
/**
* @author xumptex [xumptex@outlook.fr]
* @copyright Crown Copyright 2025
* @license Apache-2.0
*/
import Operation from "../Operation.mjs";
import OperationError from "../errors/OperationError.mjs";
import { blake3 } from "hash-wasm";
/**
* BLAKE3 operation
*/
class BLAKE3 extends Operation {
/**
* BLAKE3 constructor
*/
constructor() {
super();
this.name = "BLAKE3";
this.module = "Hashing";
this.description = "Hashes the input using BLAKE3 (UTF-8 encoded), with an optional key (also UTF-8), and outputs the result in hexadecimal format.";
this.infoURL = "https://en.wikipedia.org/wiki/BLAKE_(hash_function)#BLAKE3";
this.inputType = "string";
this.outputType = "string";
this.args = [
{
"name": "Size (bytes)",
"type": "number"
}, {
"name": "Key",
"type": "string",
"value": ""
}
];
}
/**
* @param {string} input
* @param {Object[]} args
* @returns {string}
*/
run(input, args) {
const key = args[1];
const size = args[0];
// Check if the user want a key hash or not
if (key === "") {
return blake3(input, size*8);
} if (key.length !== 32) {
throw new OperationError("The key must be exactly 32 bytes long");
}
return blake3(input, size*8, key);
}
}
export default BLAKE3;

View File

@@ -51,7 +51,7 @@ class ExtractEmailAddresses extends Operation {
run(input, args) {
const [displayTotal, sort, unique] = args,
// email regex from: https://www.regextester.com/98066
regex = /(?:[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9](?:[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9-]*[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9])?\.)+[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9](?:[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9-]*[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}\])/ig;
regex = /(?:[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9](?:[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9-]*[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9])?\.)+[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9](?:[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9-]*[\u00A0-\uD7FF\uE000-\uFFFFa-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\])/ig;
const results = search(
input,

View File

@@ -5,8 +5,8 @@
*/
import Operation from "../Operation.mjs";
import crypto from "crypto";
import * as uuid from "uuid";
import OperationError from "../errors/OperationError.mjs";
/**
* Generate UUID operation
*/
@@ -20,11 +20,38 @@ class GenerateUUID extends Operation {
this.name = "Generate UUID";
this.module = "Crypto";
this.description = "Generates an RFC 4122 version 4 compliant Universally Unique Identifier (UUID), also known as a Globally Unique Identifier (GUID).<br><br>A version 4 UUID relies on random numbers, in this case generated using <code>window.crypto</code> if available and falling back to <code>Math.random</code> if not.";
this.description =
"Generates an RFC 9562 (formerly RFC 4122) compliant Universally Unique Identifier (UUID), " +
"also known as a Globally Unique Identifier (GUID).<br>" +
"<br>" +
"We currently support generating the following UUID versions:<br>" +
"<ul>" +
"<li><strong>v1</strong>: Timestamp-based</li>" +
"<li><strong>v3</strong>: Namespace w/ MD5</li>" +
"<li><strong>v4</strong>: Random (default)</li>" +
"<li><strong>v5</strong>: Namespace w/ SHA-1</li>" +
"<li><strong>v6</strong>: Timestamp, reordered</li>" +
"<li><strong>v7</strong>: Unix Epoch time-based</li>" +
"</ul>" +
"UUIDs are generated using the <a href='https://npmjs.org/uuid/'><code>uuid</code><a> package.<br>";
this.infoURL = "https://wikipedia.org/wiki/Universally_unique_identifier";
this.inputType = "string";
this.outputType = "string";
this.args = [];
this.args = [
{
name: "Version",
hint: "UUID version",
type: "option",
value: ["v1", "v3", "v4", "v5", "v6", "v7"],
defaultIndex: 2,
},
{
name: "Namespace",
hint: "UUID namespace (UUID; valid for v3 and v5)",
type: "string",
value: "1b671a64-40d5-491e-99b0-da01ff1f3341"
}
];
}
/**
@@ -33,16 +60,17 @@ class GenerateUUID extends Operation {
* @returns {string}
*/
run(input, args) {
const buf = new Uint32Array(4).map(() => {
return crypto.randomBytes(4).readUInt32BE(0, true);
});
let i = 0;
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
const r = (buf[i >> 3] >> ((i % 8) * 4)) & 0xf,
v = c === "x" ? r : (r & 0x3 | 0x8);
i++;
return v.toString(16);
});
const [version, namespace] = args;
const hasDesiredVersion = typeof uuid[version] === "function";
if (!hasDesiredVersion) throw new OperationError("Invalid UUID version");
const requiresNamespace = ["v3", "v5"].includes(version);
if (!requiresNamespace) return uuid[version]();
const hasValidNamespace = typeof namespace === "string" && uuid.validate(namespace);
if (!hasValidNamespace) throw new OperationError("Invalid UUID namespace");
return uuid[version](input, namespace);
}
}

View File

@@ -72,7 +72,7 @@ class RailFenceCipherDecode extends Operation {
}
}
return plaintext.join("").trim();
return plaintext.join("");
}
}

View File

@@ -66,7 +66,7 @@ class RailFenceCipherEncode extends Operation {
rows[rowIdx] += plaintext[pos];
}
return rows.join("").trim();
return rows.join("");
}
}

View File

@@ -1,6 +1,7 @@
/**
* @author j433866 [j433866@gmail.com]
* @copyright Crown Copyright 2019
* @author 0xff1ce [github.com/0xff1ce]
* @copyright Crown Copyright 2024
* @license Apache-2.0
*/
@@ -22,7 +23,7 @@ class ShowOnMap extends Operation {
this.name = "Show on map";
this.module = "Hashing";
this.description = "Displays co-ordinates on a slippy map.<br><br>Co-ordinates will be converted to decimal degrees before being shown on the map.<br><br>Supported formats:<ul><li>Degrees Minutes Seconds (DMS)</li><li>Degrees Decimal Minutes (DDM)</li><li>Decimal Degrees (DD)</li><li>Geohash</li><li>Military Grid Reference System (MGRS)</li><li>Ordnance Survey National Grid (OSNG)</li><li>Universal Transverse Mercator (UTM)</li></ul><br>This operation will not work offline.";
this.infoURL = "https://foundation.wikimedia.org/wiki/Maps_Terms_of_Use";
this.infoURL = "https://osmfoundation.org/wiki/Terms_of_Use";
this.inputType = "string";
this.outputType = "string";
this.presentType = "html";
@@ -85,10 +86,10 @@ class ShowOnMap extends Operation {
data = "0, 0";
}
const zoomLevel = args[0];
const tileUrl = "https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",
tileAttribution = "<a href=\"https://wikimediafoundation.org/wiki/Maps_Terms_of_Use\">Wikimedia maps</a> | &copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors",
leafletUrl = "https://unpkg.com/leaflet@1.5.0/dist/leaflet.js",
leafletCssUrl = "https://unpkg.com/leaflet@1.5.0/dist/leaflet.css";
const tileUrl = "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
tileAttribution = "&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors",
leafletUrl = "https://unpkg.com/leaflet@1.9.4/dist/leaflet.js",
leafletCssUrl = "https://unpkg.com/leaflet@1.9.4/dist/leaflet.css";
return `<link rel="stylesheet" href="${leafletCssUrl}" crossorigin=""/>
<style>
#output-text .cm-content,

View File

@@ -0,0 +1,53 @@
/**
* @author kendallgoto [k@kgo.to]
* @copyright Crown Copyright 2025
* @license Apache-2.0
*/
import Operation from "../Operation.mjs";
import OperationError from "../errors/OperationError.mjs";
import Handlebars from "handlebars";
/**
* Template operation
*/
class Template extends Operation {
/**
* Template constructor
*/
constructor() {
super();
this.name = "Template";
this.module = "Handlebars";
this.description = "Render a template with Handlebars/Mustache substituting variables using JSON input. Templates will be rendered to plain-text only, to prevent XSS.";
this.infoURL = "https://handlebarsjs.com/";
this.inputType = "JSON";
this.outputType = "string";
this.args = [
{
name: "Template definition (.handlebars)",
type: "text",
value: ""
}
];
}
/**
* @param {JSON} input
* @param {Object[]} args
* @returns {string}
*/
run(input, args) {
const [templateStr] = args;
try {
const template = Handlebars.compile(templateStr);
return template(input);
} catch (e) {
throw new OperationError(e);
}
}
}
export default Template;

View File

@@ -45,11 +45,12 @@ class ToDecimal extends Operation {
* @returns {string}
*/
run(input, args) {
input = new Uint8Array(input);
const delim = Utils.charRep(args[0]),
signed = args[1];
if (signed) {
input = input.map(v => v > 0x7F ? v - 0xFF - 1 : v);
input = new Int8Array(input);
} else {
input = new Uint8Array(input);
}
return input.join(delim);
}

View File

@@ -23,7 +23,13 @@ class URLDecode extends Operation {
this.infoURL = "https://wikipedia.org/wiki/Percent-encoding";
this.inputType = "string";
this.outputType = "string";
this.args = [];
this.args = [
{
"name": "Treat \"+\" as space",
"type": "boolean",
"value": true
},
];
this.checks = [
{
pattern: ".*(?:%[\\da-f]{2}.*){4}",
@@ -39,7 +45,8 @@ class URLDecode extends Operation {
* @returns {string}
*/
run(input, args) {
const data = input.replace(/\+/g, "%20");
const plusIsSpace = args[0];
const data = plusIsSpace ? input.replace(/\+/g, "%20") : input;
try {
return decodeURIComponent(data);
} catch (err) {

View File

@@ -24,7 +24,7 @@ class VarIntDecode extends Operation {
this.description = "Decodes a VarInt encoded integer. VarInt is an efficient way of encoding variable length integers and is commonly used with Protobuf.";
this.infoURL = "https://developers.google.com/protocol-buffers/docs/encoding#varints";
this.inputType = "byteArray";
this.outputType = "number";
this.outputType = "string";
this.args = [];
}
@@ -35,7 +35,18 @@ class VarIntDecode extends Operation {
*/
run(input, args) {
try {
return Protobuf.varIntDecode(input);
if (typeof BigInt === "function") {
let result = BigInt(0);
let offset = BigInt(0);
for (let i = 0; i < input.length; i++) {
result |= BigInt(input[i] & 0x7f) << offset;
if (!(input[i] & 0x80)) break;
offset += BigInt(7);
}
return result.toString();
} else {
return Protobuf.varIntDecode(input).toString();
}
} catch (err) {
throw new OperationError(err);
}

View File

@@ -23,19 +23,31 @@ class VarIntEncode extends Operation {
this.module = "Default";
this.description = "Encodes a Vn integer as a VarInt. VarInt is an efficient way of encoding variable length integers and is commonly used with Protobuf.";
this.infoURL = "https://developers.google.com/protocol-buffers/docs/encoding#varints";
this.inputType = "number";
this.inputType = "string";
this.outputType = "byteArray";
this.args = [];
}
/**
* @param {number} input
* @param {string} input
* @param {Object[]} args
* @returns {byteArray}
*/
run(input, args) {
try {
return Protobuf.varIntEncode(input);
if (typeof BigInt === "function") {
let value = BigInt(input);
if (value < 0) throw new OperationError("Negative values cannot be represented as VarInt");
const result = [];
while (value >= 0x80) {
result.push(Number(value & BigInt(0x7f)) | 0x80);
value >>= BigInt(7);
}
result.push(Number(value));
return result;
} else {
return Protobuf.varIntEncode(Number(input));
}
} catch (err) {
throw new OperationError(err);
}

View File

@@ -74,11 +74,11 @@ function transformArgs(opArgsList, newArgs) {
return opArgs.map((arg) => {
if (arg.type === "option") {
// pick default option if not already chosen
return typeof arg.value === "string" ? arg.value : arg.value[0];
return typeof arg.value === "string" ? arg.value : arg.value[arg.defaultIndex ?? 0];
}
if (arg.type === "editableOption") {
return typeof arg.value === "string" ? arg.value : arg.value[0].value;
return typeof arg.value === "string" ? arg.value : arg.value[arg.defaultIndex ?? 0].value;
}
if (arg.type === "toggleString") {

View File

@@ -1,23 +1,26 @@
[
{
"@context": "http://schema.org",
"@type": "Organization",
"url": "https://gchq.github.io/CyberChef/",
"logo": "https://gchq.github.io/CyberChef/images/cyberchef-128x128.png",
"sameAs": [
"https://github.com/gchq/CyberChef",
"https://www.npmjs.com/package/cyberchef"
"@graph": [
{
"@type": "Organization",
"url": "https://gchq.github.io/CyberChef/",
"logo": "https://gchq.github.io/CyberChef/images/cyberchef-128x128.png",
"sameAs": [
"https://github.com/gchq/CyberChef",
"https://www.npmjs.com/package/cyberchef"
]
},
{
"@type": "WebSite",
"url": "https://gchq.github.io/CyberChef/",
"name": "CyberChef",
"potentialAction": {
"@type": "SearchAction",
"target": "https://gchq.github.io/CyberChef/?op={operation_search_term}",
"query-input": "required name=operation_search_term"
}
}
]
},
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "https://gchq.github.io/CyberChef/",
"name": "CyberChef",
"potentialAction": {
"@type": "SearchAction",
"target": "https://gchq.github.io/CyberChef/?op={operation_search_term}",
"query-input": "required name=operation_search_term"
}
}
]
]

View File

@@ -580,10 +580,25 @@ Password: 282760`;
assert.strictEqual(result.toString().substr(0, 37), "-----BEGIN PGP PRIVATE KEY BLOCK-----");
}),
it("Generate UUID", () => {
const result = chef.generateUUID();
assert.ok(result.toString());
assert.strictEqual(result.toString().length, 36);
...[1, 3, 4, 5, 6, 7].map(version => it(`Generate UUID v${version}`, () => {
const result = chef.generateUUID("", { "version": `v${version}` }).toString();
assert.ok(result);
assert.strictEqual(result.length, 36);
})),
...[1, 3, 4, 5, 6, 7].map(version => it(`Analyze UUID v${version}`, () => {
const uuid = chef.generateUUID("", { "version": `v${version}` }).toString();
const result = chef.analyseUUID(uuid).toString();
const expected = `UUID version: ${version}`;
assert.strictEqual(result, expected);
})),
it("Generate UUID using defaults", () => {
const uuid = chef.generateUUID();
assert.ok(uuid);
const analysis = chef.analyseUUID(uuid).toString();
assert.strictEqual(analysis, "UUID version: 4");
}),
it("Gzip, Gunzip", () => {

View File

@@ -29,6 +29,7 @@ import "./tests/BCD.mjs";
import "./tests/BitwiseOp.mjs";
import "./tests/BLAKE2b.mjs";
import "./tests/BLAKE2s.mjs";
import "./tests/BLAKE3.mjs";
import "./tests/Bombe.mjs";
import "./tests/BSON.mjs";
import "./tests/ByteRepr.mjs";
@@ -158,12 +159,14 @@ import "./tests/Subsection.mjs";
import "./tests/SwapCase.mjs";
import "./tests/SymmetricDifference.mjs";
import "./tests/TakeNthBytes.mjs";
import "./tests/Template.mjs";
import "./tests/TextEncodingBruteForce.mjs";
import "./tests/ToFromInsensitiveRegex.mjs";
import "./tests/TranslateDateTimeFormat.mjs";
import "./tests/Typex.mjs";
import "./tests/UnescapeString.mjs";
import "./tests/Unicode.mjs";
import "./tests/URLEncodeDecode.mjs";
import "./tests/RSA.mjs";
import "./tests/CBOREncode.mjs";
import "./tests/CBORDecode.mjs";

View File

@@ -0,0 +1,55 @@
/**
* BLAKE3 tests.
* @author xumptex [xumptex@outlook.fr]
* @copyright Crown Copyright 2025
* @license Apache-2.0
*/
import TestRegister from "../../lib/TestRegister.mjs";
TestRegister.addTests([
{
name: "BLAKE3: 8 - Hello world",
input: "Hello world",
expectedOutput: "e7e6fb7d2869d109",
recipeConfig: [
{ "op": "BLAKE3",
"args": [8, ""] }
]
},
{
name: "BLAKE3: 16 - Hello world 2",
input: "Hello world 2",
expectedOutput: "2a3df5fe5f0d3fcdd995fc203c7f7c52",
recipeConfig: [
{ "op": "BLAKE3",
"args": [16, ""] }
]
},
{
name: "BLAKE3: 32 - Hello world",
input: "Hello world",
expectedOutput: "e7e6fb7d2869d109b62cdb1227208d4016cdaa0af6603d95223c6a698137d945",
recipeConfig: [
{ "op": "BLAKE3",
"args": [32, ""] }
]
},
{
name: "BLAKE3: Key Test",
input: "Hello world",
expectedOutput: "59dd23ac9d025690",
recipeConfig: [
{ "op": "BLAKE3",
"args": [8, "ThiskeyisexactlythirtytwoBytesLo"] }
]
},
{
name: "BLAKE3: Key Test 2",
input: "Hello world",
expectedOutput: "c8302c9634c1da42",
recipeConfig: [
{ "op": "BLAKE3",
"args": [8, "ThiskeyisexactlythirtytwoByteslo"] }
]
}
]);

View File

@@ -528,4 +528,15 @@ TestRegister.addTests([
}
],
},
{
name: "Rail Fence Cipher Encode: Normal with Offset with Spaces",
input: "No one expects the spanish Inquisition.",
expectedOutput: " e n ut.ooeepcstesaihIqiiinNnxthpsnso",
recipeConfig: [
{
"op": "Rail Fence Cipher Encode",
"args": [3, 2]
}
],
},
]);

View File

@@ -129,38 +129,5 @@ TestRegister.addTests([
},
],
},
{
name: "ExtractIPAddress IPv6 full form",
input: "This 2001:0db8:0001:0000:0000:0ab9:C0A8:0102 is a valid address.",
expectedOutput: "2001:0db8:0001:0000:0000:0ab9:C0A8:0102",
recipeConfig: [
{
"op": "Extract IP addresses",
"args": [true, true, false, false, false, false]
},
],
},
{
name: "ExtractIPAddress IPv6 short form",
input: "Another valid style is the short form 2001:db8:1::ab9:C0A8:102 is a valid address.",
expectedOutput: "2001:db8:1::ab9:C0A8:102",
recipeConfig: [
{
"op": "Extract IP addresses",
"args": [true, true, false, false, false, false]
},
],
},
{
name: "ExtractIPAddress IPv6 both forms",
input: "2001:0db8:0001:0000:0000:0ab9:C0A8:0102 can be compressed as follows: 2001:db8:1::ab9:C0A8:102.",
expectedOutput: "2001:0db8:0001:0000:0000:0ab9:C0A8:0102\n2001:db8:1::ab9:C0A8:102",
recipeConfig: [
{
"op": "Extract IP addresses",
"args": [true, true, false, false, false, false]
},
],
},
]);

View File

@@ -0,0 +1,53 @@
/**
* @author kendallgoto [k@kgo.to]
* @copyright Crown Copyright 2025
* @license Apache-2.0
*/
import TestRegister from "../../lib/TestRegister.mjs";
TestRegister.addTests([
{
"name": "Template: Simple Print",
"input": "{}",
"expectedOutput": "Hello, world!",
"recipeConfig": [
{
"op": "Template",
"args": ["Hello, world!"]
}
]
},
{
"name": "Template: Print Basic Variables",
"input": "{\"one\": 1, \"two\": 2}",
"expectedOutput": "1 2",
"recipeConfig": [
{
"op": "Template",
"args": ["{{ one }} {{ two }}"]
}
]
},
{
"name": "Template: Partials",
"input": "{\"users\":[{\"name\":\"Someone\",\"age\":25},{\"name\":\"Someone Else\",\"age\":32}]}",
"expectedOutput": "Name: Someone\nAge: 25\n\nName: Someone Else\nAge: 32\n\n",
"recipeConfig": [
{
"op": "Template",
"args": ["{{#*inline \"user\"}}\nName: {{ name }}\nAge: {{ age }}\n{{/inline}}\n{{#each users}}\n{{> user}}\n\n{{/each}}"]
}
]
},
{
"name": "Template: Disallow XSS",
"input": "{\"test\": \"<script></script>\"}",
"expectedOutput": "<script></script>&lt;script&gt;&lt;/script&gt;",
"recipeConfig": [
{
"op": "Template",
"args": ["<script></script>{{ test }}"]
}
]
}
]);

View File

@@ -0,0 +1,92 @@
/**
* URLEncode and URLDecode tests.
*
* @author es45411 [135977478+es45411@users.noreply.github.com]
*
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/
import TestRegister from "../../lib/TestRegister.mjs";
TestRegister.addTests([
// URL Decode
{
name: "URLDecode: nothing",
input: "",
expectedOutput: "",
recipeConfig: [
{
op: "URL Decode",
args: [],
},
],
},
{
name: "URLDecode: spaces without special chars",
input: "Hello%20world%21",
expectedOutput: "Hello world!",
recipeConfig: [
{
op: "URL Decode",
args: [],
},
],
},
{
name: "URLDecode: spaces with special chars",
input: "Hello%20world!",
expectedOutput: "Hello world!",
recipeConfig: [
{
op: "URL Decode",
args: [],
},
],
},
{
name: "URLDecode: decode plus as space",
input: "Hello%20world!",
expectedOutput: "Hello world!",
recipeConfig: [
{
op: "URL Decode",
args: [],
},
],
},
// URL Encode
{
name: "URLEncode: nothing",
input: "",
expectedOutput: "",
recipeConfig: [
{
op: "URL Encode",
args: [],
},
],
},
{
name: "URLEncode: spaces without special chars",
input: "Hello world!",
expectedOutput: "Hello%20world!",
recipeConfig: [
{
op: "URL Encode",
args: [],
},
],
},
{
name: "URLEncode: spaces with special chars",
input: "Hello world!",
expectedOutput: "Hello%20world%21",
recipeConfig: [
{
op: "URL Encode",
args: [true],
},
],
},
]);