mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-24 16:56:15 -04:00
Add "{To,From} EBCDIC" operations
This adds operations + "To EBCDIC" + "From EBCDIC" This makes use of the npm codepage package but it is not installed as a dependency. Instead I used the `make.sh` script to export pages 37 and 500. To my knowledge there is no way currently to only import individual code pages from the npm package (hence the included script). If we were to import the package directly it increases the build size by 2.7MB.
This commit is contained in:
parent
31e5d785fe
commit
3c15bd9e29
5 changed files with 662 additions and 0 deletions
|
@ -3249,6 +3249,44 @@ const OperationConfig = {
|
|||
},
|
||||
]
|
||||
},
|
||||
"To EBCDIC": {
|
||||
description: [
|
||||
"This operation converts ASCII text to EBCDIC.",
|
||||
"<br>",
|
||||
"You can choose between a few versions of EBCDIC.",
|
||||
"<br>",
|
||||
"EBCDIC is a proprietary encoding pre-dating ASCII that originated at IBM.",
|
||||
].join("\n"),
|
||||
run: CharEnc.runToEBCDIC,
|
||||
inputType: "string",
|
||||
outputType: "byteArray",
|
||||
args: [
|
||||
{
|
||||
name: "EBCDIC version",
|
||||
type: "option",
|
||||
value: Object.keys(CharEnc.EBCDIC_CODEPAGES_MAPPING),
|
||||
},
|
||||
]
|
||||
},
|
||||
"From EBCDIC": {
|
||||
description: [
|
||||
"This operation converts ASCII text from EBCDIC.",
|
||||
"<br>",
|
||||
"You can choose between a few versions of EBCDIC.",
|
||||
"<br>",
|
||||
"EBCDIC is a proprietary encoding pre-dating ASCII that originated at IBM.",
|
||||
].join("\n"),
|
||||
run: CharEnc.runFromEBCDIC,
|
||||
inputType: "byteArray",
|
||||
outputType: "string",
|
||||
args: [
|
||||
{
|
||||
name: "EBCDIC version",
|
||||
type: "option",
|
||||
value: Object.keys(CharEnc.EBCDIC_CODEPAGES_MAPPING),
|
||||
},
|
||||
]
|
||||
},
|
||||
};
|
||||
|
||||
export default OperationConfig;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue