CyberChef/test/tests/operations/TextEncodingBruteForce.mjs

36 lines
1,023 B
JavaScript
Raw Normal View History

/**
* Text Encoding Brute Force tests.
*
* @author Cynser
*
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/
import TestRegister from "../../TestRegister";
TestRegister.addTests([
{
2018-12-17 20:39:12 +01:00
name: "Text Encoding Brute Force - Encode",
input: "Булкі праз ляніва сабаку.",
expectedMatch: /Windows-1251 Cyrillic \(1251\).{1,10}Булкі праз ляніва сабаку\./,
recipeConfig: [
{
op: "Text Encoding Brute Force",
2018-12-17 20:39:12 +01:00
args: ["Encode"],
},
],
},
{
name: "Text Encoding Brute Force - Decode",
input: "Áóëê³ ïðàç ëÿí³âà ñàáàêó.",
expectedMatch: /Windows-1251 Cyrillic \(1251\).{1,10}Булкі праз ляніва сабаку\./,
2018-12-17 20:39:12 +01:00
recipeConfig: [
{
op: "Text Encoding Brute Force",
args: ["Decode"],
},
],
}
]);