CyberChef/tests/operations/index.mjs

167 lines
4.9 KiB
JavaScript
Raw Normal View History

/* eslint no-console: 0 */
/**
* Test Runner
*
* For running the tests in the test register.
*
* @author tlwr [toby@toby.codes]
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2017
* @license Apache-2.0
*/
import {
setLongTestFailure,
logTestReport,
2019-09-04 18:13:05 +02:00
} from "../lib/utils.mjs";
import TestRegister from "../lib/TestRegister.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/AESKeyWrap.mjs";
import "./tests/AvroToJSON.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/BaconCipher.mjs";
import "./tests/Base45.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/Base58.mjs";
import "./tests/Base62.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/Base64.mjs";
2022-06-14 11:23:13 +02:00
import "./tests/Base85.mjs";
2023-04-12 07:07:16 +02:00
import "./tests/Base92.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/BCD.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/BitwiseOp.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/BLAKE2b.mjs";
import "./tests/BLAKE2s.mjs";
import "./tests/Bombe.mjs";
import "./tests/BSON.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/ByteRepr.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/CaesarBoxCipher.mjs";
2024-02-13 10:22:54 +01:00
import "./tests/CaretMdecode.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/CartesianProduct.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/CBORDecode.mjs";
import "./tests/CBOREncode.mjs";
import "./tests/CetaceanCipherDecode.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/CetaceanCipherEncode.mjs";
2022-11-03 14:47:40 +01:00
import "./tests/ChaCha.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/ChangeIPFormat.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/CharEnc.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/Charts.mjs";
import "./tests/Checksum.mjs";
import "./tests/Ciphers.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/CipherSaber2.mjs";
import "./tests/CMAC.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/Code.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/Colossus.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/Comment.mjs";
import "./tests/Compress.mjs";
import "./tests/ConditionalJump.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/ConvertCoordinateFormat.mjs";
import "./tests/ConvertToNATOAlphabet.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/Crypt.mjs";
import "./tests/CSV.mjs";
import "./tests/DateTime.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/DefangIP.mjs";
import "./tests/ELFInfo.mjs";
import "./tests/Enigma.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/ExtractEmailAddresses.mjs";
2024-04-02 04:22:43 +02:00
import "./tests/ExtractHashes.mjs";
import "./tests/Float.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/FileTree.mjs";
import "./tests/FletcherChecksum.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/Fork.mjs";
import "./tests/FromDecimal.mjs";
2022-09-22 17:30:36 +02:00
import "./tests/GenerateAllHashes.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/GenerateDeBruijnSequence.mjs";
import "./tests/GetAllCasings.mjs";
import "./tests/GOST.mjs";
2019-12-17 13:28:09 +01:00
import "./tests/Gunzip.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/Gzip.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/Hash.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/HASSH.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/HaversineDistance.mjs";
2020-01-18 01:21:15 +01:00
import "./tests/Hex.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/Hexdump.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/HKDF.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/Image.mjs";
import "./tests/IndexOfCoincidence.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/JA3Fingerprint.mjs";
2024-03-27 19:02:17 +01:00
import "./tests/JA4Fingerprint.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/JA3SFingerprint.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/JSONBeautify.mjs";
import "./tests/JSONMinify.mjs";
import "./tests/JSONtoCSV.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/Jump.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/JWTDecode.mjs";
import "./tests/JWTSign.mjs";
import "./tests/JWTVerify.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/LevenshteinDistance.mjs";
import "./tests/Lorenz.mjs";
import "./tests/LS47.mjs";
import "./tests/LuhnChecksum.mjs";
2023-12-25 01:17:16 +01:00
import "./tests/LZNT1Decompress.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/LZString.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/Magic.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/Media.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/MorseCode.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/MS.mjs";
import "./tests/MultipleBombe.mjs";
import "./tests/MurmurHash3.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/NetBIOS.mjs";
2019-11-25 22:53:31 +01:00
import "./tests/NormaliseUnicode.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/NTLM.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/OTP.mjs";
import "./tests/ParseIPRange.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/ParseObjectIDTimestamp.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/ParseQRCode.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/ParseSSHHostKey.mjs";
import "./tests/ParseTCP.mjs";
import "./tests/ParseTLV.mjs";
import "./tests/ParseUDP.mjs";
import "./tests/PEMtoHex.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/PGP.mjs";
import "./tests/PHP.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/PowerSet.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/Protobuf.mjs";
import "./tests/Rabbit.mjs";
import "./tests/RAKE.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/Regex.mjs";
import "./tests/Register.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/RisonEncodeDecode.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/Rotate.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/RSA.mjs";
2024-03-10 16:42:33 +01:00
import "./tests/Salsa20.mjs";
import "./tests/XSalsa20.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/SeqUtils.mjs";
import "./tests/SetDifference.mjs";
import "./tests/SetIntersection.mjs";
import "./tests/SetUnion.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/Shuffle.mjs";
import "./tests/SIGABA.mjs";
import "./tests/SM4.mjs";
2024-02-12 17:52:43 +01:00
// import "./tests/SplitColourChannels.mjs"; // Cannot test operations that use the File type yet
2019-09-04 18:13:05 +02:00
import "./tests/StrUtils.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/Subsection.mjs";
import "./tests/SwapCase.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/SymmetricDifference.mjs";
import "./tests/TextEncodingBruteForce.mjs";
import "./tests/ToFromInsensitiveRegex.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/TranslateDateTimeFormat.mjs";
2019-09-04 18:13:05 +02:00
import "./tests/Typex.mjs";
import "./tests/UnescapeString.mjs";
2024-02-12 17:52:43 +01:00
import "./tests/Unicode.mjs";
import "./tests/YARA.mjs";
const testStatus = {
allTestsPassing: true,
counts: {
total: 0,
}
2017-05-03 01:40:39 +02:00
};
setLongTestFailure();
const logOpsTestReport = logTestReport.bind(null, testStatus);
(async function() {
const results = await TestRegister.runTests();
logOpsTestReport(results);
})();