mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
UNIX Format Added for ToHexdump
This commit is contained in:
parent
53a579028c
commit
30bc8dfbe9
1 changed files with 6 additions and 1 deletions
|
@ -39,6 +39,11 @@ class ToHexdump extends Operation {
|
||||||
"name": "Include final length",
|
"name": "Include final length",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"value": false
|
"value": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UNIX Format",
|
||||||
|
"type": "boolean",
|
||||||
|
"value": false
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -70,7 +75,7 @@ class ToHexdump extends Operation {
|
||||||
|
|
||||||
output += lineNo + " " +
|
output += lineNo + " " +
|
||||||
hexa.padEnd(length*(padding+1), " ") +
|
hexa.padEnd(length*(padding+1), " ") +
|
||||||
" |" + Utils.printable(Utils.byteArrayToChars(buff), false, true).padEnd(buff.length, " ") + "|\n";
|
" |" + Utils.printable(Utils.byteArrayToChars(buff), false, args[3]).padEnd(buff.length, " ") + "|\n";
|
||||||
|
|
||||||
if (includeFinalLength && i+buff.length === data.length) {
|
if (includeFinalLength && i+buff.length === data.length) {
|
||||||
output += Utils.hex(i+buff.length, 8) + "\n";
|
output += Utils.hex(i+buff.length, 8) + "\n";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue