mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 22:21:01 +01:00
Fixed code spacing and formatting
This commit is contained in:
parent
23ddb87c9f
commit
4d39c3bbd2
@ -227,22 +227,9 @@ class Lorenz extends Operation {
|
||||
pattern = args[1],
|
||||
kt = args[2],
|
||||
mode = args[3],
|
||||
format = args[6];
|
||||
|
||||
let intype = args[4],
|
||||
intype = args[4],
|
||||
outtype = args[5],
|
||||
s1 = args[7],
|
||||
s2 = args[8],
|
||||
s3 = args[9],
|
||||
s4 = args[10],
|
||||
s5 = args[11],
|
||||
m37 = args[12],
|
||||
m61 = args[13],
|
||||
x1 = args[14],
|
||||
x2 = args[15],
|
||||
x3 = args[16],
|
||||
x4 = args[17],
|
||||
x5 = args[18],
|
||||
format = args[6],
|
||||
lugs1 = args[19],
|
||||
lugs2 = args[20],
|
||||
lugs3 = args[21],
|
||||
@ -254,7 +241,20 @@ class Lorenz extends Operation {
|
||||
lugx2 = args[27],
|
||||
lugx3 = args[28],
|
||||
lugx4 = args[29],
|
||||
lugx5 = args[30],
|
||||
lugx5 = args[30];
|
||||
|
||||
let s1 = args[7],
|
||||
s2 = args[8],
|
||||
s3 = args[9],
|
||||
s4 = args[10],
|
||||
s5 = args[11],
|
||||
m37 = args[12],
|
||||
m61 = args[13],
|
||||
x1 = args[14],
|
||||
x2 = args[15],
|
||||
x3 = args[16],
|
||||
x4 = args[17],
|
||||
x5 = args[18],
|
||||
figShifted = false;
|
||||
|
||||
this.reverseTable();
|
||||
@ -273,9 +273,9 @@ class Lorenz extends Operation {
|
||||
if (x5<1 || x5>23) throw new OperationError("Χ5 start must be between 1 and 23");
|
||||
|
||||
// Initialise chosen wheel pattern
|
||||
let chosenSetting = '';
|
||||
let chosenSetting = "";
|
||||
if (pattern === "Custom") {
|
||||
let re = new RegExp("^[.xX]*$");
|
||||
const re = new RegExp("^[.xX]*$");
|
||||
if (lugs1.length !== 43 || !re.test(lugs1)) throw new OperationError("Ψ1 custom lugs must be 43 long and can only include . or x ");
|
||||
if (lugs2.length !== 47 || !re.test(lugs2)) throw new OperationError("Ψ2 custom lugs must be 47 long and can only include . or x");
|
||||
if (lugs3.length !== 51 || !re.test(lugs3)) throw new OperationError("Ψ3 custom lugs must be 51 long and can only include . or x");
|
||||
@ -304,21 +304,21 @@ class Lorenz extends Operation {
|
||||
} else {
|
||||
chosenSetting = INIT_PATTERNS[pattern];
|
||||
}
|
||||
var chiSettings = chosenSetting.X; // Pin settings for Chi links (X)
|
||||
var psiSettings = chosenSetting.S; // Pin settings for Psi links (S)
|
||||
var muSettings = chosenSetting.M; // Pin settings for Motor links (M)
|
||||
const chiSettings = chosenSetting.X; // Pin settings for Chi links (X)
|
||||
const psiSettings = chosenSetting.S; // Pin settings for Psi links (S)
|
||||
const muSettings = chosenSetting.M; // Pin settings for Motor links (M)
|
||||
|
||||
let ita2 = "";
|
||||
if (mode === "Send") {
|
||||
|
||||
// Convert input text to ITA2 (including figure/letter shifts)
|
||||
ita2 = Array.prototype.map.call(input, function(character) {
|
||||
let letter = character.toUpperCase();
|
||||
|
||||
const letter = character.toUpperCase();
|
||||
|
||||
if (intype === "Plaintext") {
|
||||
if (validChars.indexOf(letter) === -1) throw new OperationError("Invalid Plaintext character : "+letter);
|
||||
|
||||
if(!figShifted && figShiftedChars.indexOf(letter) !== -1) {
|
||||
if (!figShifted && figShiftedChars.indexOf(letter) !== -1) {
|
||||
// in letters mode and next char needs to be figure shifted
|
||||
figShifted = true;
|
||||
return "55" + figShiftArr[letter];
|
||||
@ -357,11 +357,11 @@ class Lorenz extends Operation {
|
||||
|
||||
// Receive input should always be ITA2
|
||||
ita2 = Array.prototype.map.call(input, function(character) {
|
||||
let letter = character.toUpperCase();
|
||||
const letter = character.toUpperCase();
|
||||
if (validITA2.indexOf(letter) === -1) {
|
||||
var errltr = letter;
|
||||
if (errltr==="\n") errltr = "Carriage Return";
|
||||
if(errltr===" ") errltr = "Space";
|
||||
let errltr = letter;
|
||||
if (errltr==="\n") errltr = "Carriage Return";
|
||||
if (errltr===" ") errltr = "Space";
|
||||
throw new OperationError("Invalid ITA2 character : "+errltr);
|
||||
}
|
||||
return letter;
|
||||
@ -375,7 +375,7 @@ class Lorenz extends Operation {
|
||||
let thisChi = [];
|
||||
let m61lug = muSettings[1][m61-1];
|
||||
let m37lug = muSettings[2][m37-1];
|
||||
let p5 = [0,0,0];
|
||||
const p5 = [0, 0, 0];
|
||||
|
||||
const self = this;
|
||||
const letters = Array.prototype.map.call(ita2Input, function(character) {
|
||||
@ -387,18 +387,18 @@ class Lorenz extends Operation {
|
||||
if (s1bptr===44) s1bptr=1;
|
||||
|
||||
thisChi = [
|
||||
chiSettings[1][x1-1],
|
||||
chiSettings[2][x2-1],
|
||||
chiSettings[3][x3-1],
|
||||
chiSettings[4][x4-1],
|
||||
chiSettings[1][x1-1],
|
||||
chiSettings[2][x2-1],
|
||||
chiSettings[3][x3-1],
|
||||
chiSettings[4][x4-1],
|
||||
chiSettings[5][x5-1]
|
||||
];
|
||||
|
||||
thisPsi = [
|
||||
psiSettings[1][s1-1],
|
||||
psiSettings[2][s2-1],
|
||||
psiSettings[3][s3-1],
|
||||
psiSettings[4][s4-1],
|
||||
psiSettings[1][s1-1],
|
||||
psiSettings[2][s2-1],
|
||||
psiSettings[3][s3-1],
|
||||
psiSettings[4][s4-1],
|
||||
psiSettings[5][s5-1]
|
||||
];
|
||||
|
||||
@ -406,8 +406,8 @@ class Lorenz extends Operation {
|
||||
return "";
|
||||
}
|
||||
|
||||
let xorSum = [];
|
||||
for(var i=0;i<=4;i++) {
|
||||
const xorSum = [];
|
||||
for (let i=0;i<=4;i++) {
|
||||
xorSum[i] = ITA2_TABLE[letter][i] ^ thisPsi[i] ^ thisChi[i];
|
||||
}
|
||||
const resultStr = xorSum.join("");
|
||||
@ -427,7 +427,7 @@ class Lorenz extends Operation {
|
||||
if (--m37 < 1) m37 = 37;
|
||||
}
|
||||
|
||||
let basicmotor = m37lug;
|
||||
const basicmotor = m37lug;
|
||||
let totalmotor = basicmotor;
|
||||
let lim = 0;
|
||||
|
||||
@ -440,28 +440,38 @@ class Lorenz extends Operation {
|
||||
}
|
||||
|
||||
// Limitations here
|
||||
if (model==='SZ42a') {
|
||||
if (model==="SZ42a") {
|
||||
// Chi 2 one back lim - The active character of chi 2 (2nd Chi wheel) in the previous position
|
||||
lim = chiSettings[2][x2bptr-1];
|
||||
if(kt) {
|
||||
if (lim===p5[2]) { lim = 0; } else { lim=1; } //p5 back 2
|
||||
if (kt) {
|
||||
//p5 back 2
|
||||
if (lim===p5[2]) {
|
||||
lim = 0;
|
||||
} else {
|
||||
lim=1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// If basic motor = 0 and limitation = 1, Total motor = 0 [no move], otherwise, total motor = 1 [move]
|
||||
if (basicmotor===0 && lim===1) {
|
||||
totalmotor = 0;
|
||||
} else {
|
||||
totalmotor = 1;
|
||||
}
|
||||
}
|
||||
|
||||
} else if(model=='SZ42b') {
|
||||
} else if (model==="SZ42b") {
|
||||
// Chi 2 one back + Psi 1 one back.
|
||||
const x2b1lug = chiSettings[2][x2bptr-1];
|
||||
const s1b1lug = psiSettings[1][s1bptr-1];
|
||||
lim = 1;
|
||||
if (x2b1lug===s1b1lug) lim=0;
|
||||
if(kt) {
|
||||
if (lim===p5[2]) { lim=0; } else { lim=1; } //p5 back 2
|
||||
if (kt) {
|
||||
//p5 back 2
|
||||
if (lim===p5[2]) {
|
||||
lim=0;
|
||||
} else {
|
||||
lim=1;
|
||||
}
|
||||
}
|
||||
// If basic motor = 0 and limitation = 1, Total motor = 0 [no move], otherwise, total motor = 1 [move]
|
||||
if (basicmotor===0 && lim===1) {
|
||||
@ -479,11 +489,11 @@ class Lorenz extends Operation {
|
||||
|
||||
// increment Psi wheels when current totalmotor active
|
||||
if (totalmotor === 1) {
|
||||
if(--s1 < 1) s1 = 43;
|
||||
if(--s2 < 1) s2 = 47;
|
||||
if(--s3 < 1) s3 = 51;
|
||||
if(--s4 < 1) s4 = 53;
|
||||
if(--s5 < 1) s5 = 59;
|
||||
if (--s1 < 1) s1 = 43;
|
||||
if (--s2 < 1) s2 = 47;
|
||||
if (--s3 < 1) s3 = 51;
|
||||
if (--s4 < 1) s4 = 53;
|
||||
if (--s5 < 1) s5 = 59;
|
||||
}
|
||||
|
||||
m61lug = muSettings[1][m61-1];
|
||||
@ -498,7 +508,7 @@ class Lorenz extends Operation {
|
||||
return rtnstr;
|
||||
});
|
||||
|
||||
let ita2output = letters.join("");
|
||||
const ita2output = letters.join("");
|
||||
let output = "";
|
||||
|
||||
if (mode === "Receive") {
|
||||
@ -507,7 +517,7 @@ class Lorenz extends Operation {
|
||||
|
||||
// Convert output ITA2 to plaintext (including figure/letter shifts)
|
||||
const out = Array.prototype.map.call(ita2output, function(letter) {
|
||||
|
||||
|
||||
if (outtype === "Plaintext") {
|
||||
|
||||
if (letter === "5" || letter === "+") {
|
||||
@ -531,7 +541,7 @@ class Lorenz extends Operation {
|
||||
return letter;
|
||||
}
|
||||
|
||||
} else {
|
||||
} else {
|
||||
return letter;
|
||||
}
|
||||
|
||||
@ -563,13 +573,16 @@ class Lorenz extends Operation {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Read lugs settings - convert to 0|1
|
||||
*/
|
||||
readLugs(lugstr) {
|
||||
let arr = Array.prototype.map.call(lugstr, function(lug) {
|
||||
if(lug==".") {
|
||||
const arr = Array.prototype.map.call(lugstr, function(lug) {
|
||||
if (lug===".") {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
});
|
||||
return arr;
|
||||
}
|
||||
@ -617,121 +630,121 @@ const ITA2_TABLE = {
|
||||
|
||||
const validChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890+-'()/:=?,. \n\r";
|
||||
const validITA2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ34589+-./";
|
||||
const figShiftedChars = "1234567890+-'()/:=?,."
|
||||
const figShiftedChars = "1234567890+-'()/:=?,.";
|
||||
|
||||
const figShiftArr = {
|
||||
"1": "Q",
|
||||
"2": "W",
|
||||
"3": "E",
|
||||
"4": "R",
|
||||
"5": "T",
|
||||
"6": "Y",
|
||||
"7": "U",
|
||||
"8": "I",
|
||||
"9": "O",
|
||||
"0": "P",
|
||||
" ": "9",
|
||||
"-": "A",
|
||||
"?": "B",
|
||||
":": "C",
|
||||
"#": "D",
|
||||
"%": "F",
|
||||
"@": "G",
|
||||
"£": "H",
|
||||
"(": "K",
|
||||
")": "L",
|
||||
".": "M",
|
||||
",": "N",
|
||||
"'": "S",
|
||||
"=": "V",
|
||||
"/": "X",
|
||||
"+": "Z",
|
||||
"\n": "3",
|
||||
"\r": "4"
|
||||
"1": "Q",
|
||||
"2": "W",
|
||||
"3": "E",
|
||||
"4": "R",
|
||||
"5": "T",
|
||||
"6": "Y",
|
||||
"7": "U",
|
||||
"8": "I",
|
||||
"9": "O",
|
||||
"0": "P",
|
||||
" ": "9",
|
||||
"-": "A",
|
||||
"?": "B",
|
||||
":": "C",
|
||||
"#": "D",
|
||||
"%": "F",
|
||||
"@": "G",
|
||||
"£": "H",
|
||||
"(": "K",
|
||||
")": "L",
|
||||
".": "M",
|
||||
",": "N",
|
||||
"'": "S",
|
||||
"=": "V",
|
||||
"/": "X",
|
||||
"+": "Z",
|
||||
"\n": "3",
|
||||
"\r": "4"
|
||||
};
|
||||
|
||||
const INIT_PATTERNS = {
|
||||
"No Pattern": {
|
||||
"X": {
|
||||
1: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
2: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
3: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
4: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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