227 lines
		
	
	
		
			5.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			227 lines
		
	
	
		
			5.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/*!
 | 
						|
 * The buffer module from node.js, for the browser.
 | 
						|
 *
 | 
						|
 * @author   Feross Aboukhadijeh <https://feross.org>
 | 
						|
 * @license  MIT
 | 
						|
 */
 | 
						|
 | 
						|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
 | 
						|
 | 
						|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
 | 
						|
 | 
						|
/**
 | 
						|
 * @author d98762625 [d98762625@gmail.com]
 | 
						|
 * @copyright Crown Copyright 2019
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * @author n1474335 [n1474335@gmail.com]
 | 
						|
 * @author Matt C [matt@artemisbot.uk]
 | 
						|
 * @copyright Crown Copyright 2016
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * @author n1474335 [n1474335@gmail.com]
 | 
						|
 * @copyright Crown Copyright 2016
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Base64 functions.
 | 
						|
 *
 | 
						|
 * @author n1474335 [n1474335@gmail.com]
 | 
						|
 * @copyright Crown Copyright 2016
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Custom error type for handling Dish type errors.
 | 
						|
 * i.e. where the Dish cannot be successfully translated between types
 | 
						|
 *
 | 
						|
 * @author n1474335 [n1474335@gmail.com]
 | 
						|
 * @copyright Crown Copyright 2018
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Custom error type for handling operation input errors.
 | 
						|
 * i.e. where the operation can handle the error and print a message to the screen.
 | 
						|
 *
 | 
						|
 * @author d98762625 [d98762625@gmail.com]
 | 
						|
 * @copyright Crown Copyright 2018
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * CyberChef - The Cyber Swiss Army Knife
 | 
						|
 *
 | 
						|
 * @copyright Crown Copyright 2016-2025
 | 
						|
 * @license Apache-2.0
 | 
						|
 *
 | 
						|
 *   Copyright 2016-2025 Crown Copyright
 | 
						|
 *
 | 
						|
 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
						|
 * you may not use this file except in compliance with the License.
 | 
						|
 * You may obtain a copy of the License at
 | 
						|
 *
 | 
						|
 *     http://www.apache.org/licenses/LICENSE-2.0
 | 
						|
 *
 | 
						|
 * Unless required by applicable law or agreed to in writing, software
 | 
						|
 * distributed under the License is distributed on an "AS IS" BASIS,
 | 
						|
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
						|
 * See the License for the specific language governing permissions and
 | 
						|
 * limitations under the License.
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Decimal functions.
 | 
						|
 *
 | 
						|
 * @author n1474335 [n1474335@gmail.com]
 | 
						|
 * @copyright Crown Copyright 2018
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Emulation of Colossus.
 | 
						|
 *
 | 
						|
 * Tested against the Colossus Rebuild at Bletchley Park's TNMOC
 | 
						|
 * using a variety of inputs and settings to confirm correctness.
 | 
						|
 *
 | 
						|
 * @author VirtualColossus [martin@virtualcolossus.co.uk]
 | 
						|
 * @copyright Crown Copyright 2019
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Emulation of the Bombe machine.
 | 
						|
 *
 | 
						|
 * @author s2224834
 | 
						|
 * @author The National Museum of Computing - Bombe Rebuild Project
 | 
						|
 * @copyright Crown Copyright 2019
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Emulation of the Bombe machine.
 | 
						|
 *
 | 
						|
 * Tested against the Bombe Rebuild at Bletchley Park's TNMOC
 | 
						|
 * using a variety of inputs and settings to confirm correctness.
 | 
						|
 *
 | 
						|
 * @author s2224834
 | 
						|
 * @copyright Crown Copyright 2019
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Emulation of the Bombe machine.
 | 
						|
 * This version carries out multiple Bombe runs to handle unknown rotor configurations.
 | 
						|
 *
 | 
						|
 * @author s2224834
 | 
						|
 * @copyright Crown Copyright 2019
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Emulation of the Enigma machine.
 | 
						|
 *
 | 
						|
 * @author s2224834
 | 
						|
 * @copyright Crown Copyright 2019
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Emulation of the Enigma machine.
 | 
						|
 *
 | 
						|
 * Tested against various genuine Enigma machines using a variety of inputs
 | 
						|
 * and settings to confirm correctness.
 | 
						|
 *
 | 
						|
 * @author s2224834
 | 
						|
 * @copyright Crown Copyright 2019
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Emulation of the Lorenz SZ40/42a/42b cipher attachment.
 | 
						|
 *
 | 
						|
 * Tested against the Colossus Rebuild at Bletchley Park's TNMOC
 | 
						|
 * using a variety of inputs and settings to confirm correctness.
 | 
						|
 *
 | 
						|
 * @author VirtualColossus [martin@virtualcolossus.co.uk]
 | 
						|
 * @copyright Crown Copyright 2019
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Emulation of the SIGABA machine
 | 
						|
 *
 | 
						|
 * @author hettysymes
 | 
						|
 * @copyright hettysymes 2020
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Emulation of the SIGABA machine.
 | 
						|
 *
 | 
						|
 * @author hettysymes
 | 
						|
 * @copyright hettysymes 2020
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Emulation of the Typex machine.
 | 
						|
 *
 | 
						|
 * @author s2224834
 | 
						|
 * @author The National Museum of Computing - Bombe Rebuild Project
 | 
						|
 * @copyright Crown Copyright 2019
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Emulation of the Typex machine.
 | 
						|
 *
 | 
						|
 * Tested against a genuine Typex machine using a variety of inputs
 | 
						|
 * and settings to confirm correctness.
 | 
						|
 *
 | 
						|
 * @author s2224834
 | 
						|
 * @copyright Crown Copyright 2019
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * File signatures and extractor functions
 | 
						|
 *
 | 
						|
 * @author n1474335 [n1474335@gmail.com]
 | 
						|
 * @copyright Crown Copyright 2018
 | 
						|
 * @license Apache-2.0
 | 
						|
 *
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * File type functions
 | 
						|
 *
 | 
						|
 * @author n1474335 [n1474335@gmail.com]
 | 
						|
 * @copyright Crown Copyright 2018
 | 
						|
 * @license Apache-2.0
 | 
						|
 *
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Resources required by the Lorenz SZ40/42 and Colossus
 | 
						|
 *
 | 
						|
 * @author VirtualColossus [martin@virtualcolossus.co.uk]
 | 
						|
 * @copyright Crown Copyright 2019
 | 
						|
 * @license Apache-2.0
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Stream class for parsing binary protocols.
 | 
						|
 *
 | 
						|
 * @author n1474335 [n1474335@gmail.com]
 | 
						|
 * @author tlwr [toby@toby.codes]
 | 
						|
 * @copyright Crown Copyright 2018
 | 
						|
 * @license Apache-2.0
 | 
						|
 *
 | 
						|
 */
 |