mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-25 09:16:17 -04:00
Rotate module converted to ESM
4 Ops: - ROT-13 - ROT-47 - Rotate left - Rotate right + module containing common functions
This commit is contained in:
parent
083d2d1cc4
commit
4988ead918
9 changed files with 578 additions and 11 deletions
|
@ -84,8 +84,8 @@ const Categories = [
|
|||
// "RC2 Decrypt",
|
||||
// "RC4",
|
||||
// "RC4 Drop",
|
||||
// "ROT13",
|
||||
// "ROT47",
|
||||
"ROT13",
|
||||
"ROT47",
|
||||
// "XOR",
|
||||
// "XOR Brute Force",
|
||||
// "Vigenère Encode",
|
||||
|
@ -116,9 +116,9 @@ const Categories = [
|
|||
// "Object Identifier to Hex",
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// name: "Arithmetic / Logic",
|
||||
// ops: [
|
||||
{
|
||||
name: "Arithmetic / Logic",
|
||||
ops: [
|
||||
// "XOR",
|
||||
// "XOR Brute Force",
|
||||
// "OR",
|
||||
|
@ -135,11 +135,11 @@ const Categories = [
|
|||
// "Standard Deviation",
|
||||
// "Bit shift left",
|
||||
// "Bit shift right",
|
||||
// "Rotate left",
|
||||
// "Rotate right",
|
||||
// "ROT13",
|
||||
// ]
|
||||
// },
|
||||
"Rotate left",
|
||||
"Rotate right",
|
||||
"ROT13"
|
||||
]
|
||||
},
|
||||
// {
|
||||
// name: "Networking",
|
||||
// ops: [
|
||||
|
|
|
@ -155,6 +155,44 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"ROT13": {
|
||||
"module": "Default",
|
||||
"description": "A simple caesar substitution cipher which rotates alphabet characters by the specified amount (default 13).",
|
||||
"inputType": "byteArray",
|
||||
"outputType": "byteArray",
|
||||
"flowControl": false,
|
||||
"args": [
|
||||
{
|
||||
"name": "Rotate lower case chars",
|
||||
"type": "boolean",
|
||||
"value": true
|
||||
},
|
||||
{
|
||||
"name": "Rotate upper case chars",
|
||||
"type": "boolean",
|
||||
"value": true
|
||||
},
|
||||
{
|
||||
"name": "Amount",
|
||||
"type": "number",
|
||||
"value": 13
|
||||
}
|
||||
]
|
||||
},
|
||||
"ROT47": {
|
||||
"module": "Default",
|
||||
"description": "A slightly more complex variation of a caesar cipher, which includes ASCII characters from 33 '!' to 126 '~'. Default rotation: 47.",
|
||||
"inputType": "byteArray",
|
||||
"outputType": "byteArray",
|
||||
"flowControl": false,
|
||||
"args": [
|
||||
{
|
||||
"name": "Amount",
|
||||
"type": "number",
|
||||
"value": 47
|
||||
}
|
||||
]
|
||||
},
|
||||
"Raw Deflate": {
|
||||
"module": "Compression",
|
||||
"description": "Compresses data using the deflate algorithm with no headers.",
|
||||
|
@ -210,6 +248,44 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"Rotate left": {
|
||||
"module": "Default",
|
||||
"description": "Rotates each byte to the left by the number of bits specified, optionally carrying the excess bits over to the next byte. Currently only supports 8-bit values.",
|
||||
"inputType": "byteArray",
|
||||
"outputType": "byteArray",
|
||||
"flowControl": false,
|
||||
"args": [
|
||||
{
|
||||
"name": "Amount",
|
||||
"type": "number",
|
||||
"value": 1
|
||||
},
|
||||
{
|
||||
"name": "Carry through",
|
||||
"type": "boolean",
|
||||
"value": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"Rotate right": {
|
||||
"module": "Default",
|
||||
"description": "Rotates each byte to the right by the number of bits specified, optionally carrying the excess bits over to the next byte. Currently only supports 8-bit values.",
|
||||
"inputType": "byteArray",
|
||||
"outputType": "byteArray",
|
||||
"flowControl": false,
|
||||
"args": [
|
||||
{
|
||||
"name": "Amount",
|
||||
"type": "number",
|
||||
"value": 1
|
||||
},
|
||||
{
|
||||
"name": "Carry through",
|
||||
"type": "boolean",
|
||||
"value": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"Show Base64 offsets": {
|
||||
"module": "Default",
|
||||
"description": "When a string is within a block of data and the whole block is Base64'd, the string itself could be represented in Base64 in three distinct ways depending on its offset within the block.<br><br>This operation shows all possible offsets for a given string so that each possible encoding can be considered.",
|
||||
|
@ -338,7 +414,7 @@
|
|||
"module": "Compression",
|
||||
"description": "Decompresses data using the PKZIP algorithm and displays it per file, with support for passwords.",
|
||||
"inputType": "byteArray",
|
||||
"outputType": "byteArray",
|
||||
"outputType": "html",
|
||||
"flowControl": false,
|
||||
"args": [
|
||||
{
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
import FromBase32 from "../../operations/FromBase32";
|
||||
import FromBase64 from "../../operations/FromBase64";
|
||||
import FromHex from "../../operations/FromHex";
|
||||
import ROT13 from "../../operations/ROT13";
|
||||
import ROT47 from "../../operations/ROT47";
|
||||
import RotateLeft from "../../operations/RotateLeft";
|
||||
import RotateRight from "../../operations/RotateRight";
|
||||
import ShowBase64Offsets from "../../operations/ShowBase64Offsets";
|
||||
import ToBase32 from "../../operations/ToBase32";
|
||||
import ToBase64 from "../../operations/ToBase64";
|
||||
|
@ -19,6 +23,10 @@ OpModules.Default = {
|
|||
"From Base32": FromBase32,
|
||||
"From Base64": FromBase64,
|
||||
"From Hex": FromHex,
|
||||
"ROT13": ROT13,
|
||||
"ROT47": ROT47,
|
||||
"Rotate left": RotateLeft,
|
||||
"Rotate right": RotateRight,
|
||||
"Show Base64 offsets": ShowBase64Offsets,
|
||||
"To Base32": ToBase32,
|
||||
"To Base64": ToBase64,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue