mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Added Print
This commit is contained in:
parent
d635cca210
commit
e8fb73ca6c
2 changed files with 52 additions and 1 deletions
|
@ -537,7 +537,8 @@
|
|||
"HTML To Text",
|
||||
"Generate Lorem Ipsum",
|
||||
"Numberwang",
|
||||
"XKCD Random Number"
|
||||
"XKCD Random Number",
|
||||
"Print"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
50
src/core/operations/Print.mjs
Normal file
50
src/core/operations/Print.mjs
Normal file
|
@ -0,0 +1,50 @@
|
|||
/**
|
||||
* @author Joshua [ebert.joshua@protonmail.com]
|
||||
* @copyright Crown Copyright 2024
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
import Operation from "../Operation.mjs";
|
||||
|
||||
/**
|
||||
* Print operation
|
||||
*/
|
||||
class Print extends Operation {
|
||||
|
||||
/**
|
||||
* Print constructor
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.name = "Print";
|
||||
this.module = "Other";
|
||||
this.description = "Prints a register";
|
||||
this.infoURL = ""; // Usually a Wikipedia link. Remember to remove localisation (i.e. https://wikipedia.org/etc rather than https://en.wikipedia.org/etc)
|
||||
this.inputType = "string";
|
||||
this.outputType = "string";
|
||||
this.args = [
|
||||
{
|
||||
name: "Text to print",
|
||||
type: "string",
|
||||
value: ""
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} input
|
||||
* @param {Object[]} args
|
||||
* @returns {string}
|
||||
*/
|
||||
run(input, args) {
|
||||
console.log(args);
|
||||
|
||||
//input = args[0].value;
|
||||
//return input;
|
||||
return args[0].toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default Print;
|
Loading…
Add table
Add a link
Reference in a new issue