mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-16 17:08:31 +01:00
commit
6bb6363b0f
1 changed files with 20 additions and 2 deletions
|
@ -65,6 +65,24 @@ var MorseCode = {
|
|||
"8": "<dash><dash><dash><dot><dot>",
|
||||
"9": "<dash><dash><dash><dash><dot>",
|
||||
"0": "<dash><dash><dash><dash><dash>",
|
||||
".": "<dot><dash><dot><dash><dot><dash>",
|
||||
",": "<dash><dash><dot><dot><dash><dash>",
|
||||
":": "<dash><dash><dash><dot><dot><dot>",
|
||||
";": "<dash><dot><dash><dot><dash><dot>",
|
||||
"!": "<dash><dot><dash><dot><dash><dash>",
|
||||
"?": "<dot><dot><dash><dash><dot><dot>",
|
||||
"'": "<dot><dash><dash><dash><dash><dot>",
|
||||
"\"": "<dot><dash><dot><dot><dash><dot>",
|
||||
"/": "<dash><dot><dot><dash><dot>",
|
||||
"-": "<dash><dot><dot><dot><dot><dash>",
|
||||
"+": "<dot><dash><dot><dash><dot>",
|
||||
"(": "<dash><dot><dash><dash><dot>",
|
||||
")": "<dash><dot><dash><dash><dot><dash>",
|
||||
"@": "<dot><dash><dash><dot><dash><dot>",
|
||||
"=": "<dash><dot><dot><dot><dash>",
|
||||
"&": "<dot><dash><dot><dot><dot>",
|
||||
"_": "<dot><dot><dash><dash><dot><dash>",
|
||||
"$": "<dot><dot><dot><dash><dot><dot><dash>"
|
||||
},
|
||||
|
||||
|
||||
|
@ -145,8 +163,8 @@ var MorseCode = {
|
|||
var letterDelim = Utils.charRep[args[0]];
|
||||
var wordDelim = Utils.charRep[args[1]];
|
||||
|
||||
input = input.replace(/-|_|dash/ig, "<dash>");
|
||||
input = input.replace(/\.|dot/ig, "<dot>");
|
||||
input = input.replace(/-|‐|−|_|–|—|dash/ig, "<dash>"); //hyphen-minus|hyphen|minus-sign|undersore|en-dash|em-dash
|
||||
input = input.replace(/\.|·|dot/ig, "<dot>");
|
||||
|
||||
var words = input.split(wordDelim);
|
||||
words = Array.prototype.map.call(words, function(word) {
|
||||
|
|
Loading…
Reference in a new issue