Actually made these ops work

This commit is contained in:
Matt C 2018-05-15 16:04:57 +01:00
parent 2b0c327001
commit 285e512483
8 changed files with 32 additions and 27 deletions

View File

@ -10,9 +10,9 @@
* *
*/ */
import * as kbpgp from "kbpgp"; import kbpgp from "kbpgp";
import { promisify } from "es6-promisify"; import promisifyDefault from "es6-promisify";
const promisify = promisifyDefault.promisify;
/** /**
* Progress callback * Progress callback
* *

View File

@ -5,7 +5,7 @@
*/ */
import Operation from "../Operation"; import Operation from "../Operation";
import disassemble from "../vendor/DisassembleX86-64.js"; import * as disassemble from "../vendor/DisassembleX86-64";
/** /**
* Disassemble x86 operation * Disassemble x86 operation
*/ */

View File

@ -7,9 +7,10 @@
*/ */
import Operation from "../Operation"; import Operation from "../Operation";
import * as kbpgp from "kbpgp"; import kbpgp from "kbpgp";
import { promisify } from "es6-promisify";
import { getSubkeySize, ASP } from "../lib/PGP"; import { getSubkeySize, ASP } from "../lib/PGP";
import promisifyDefault from "es6-promisify";
const promisify = promisifyDefault.promisify;
/** /**
* Generate PGP Key Pair operation * Generate PGP Key Pair operation
*/ */

View File

@ -5,9 +5,10 @@
*/ */
import Operation from "../Operation"; import Operation from "../Operation";
import * as kbpgp from "kbpgp"; import kbpgp from "kbpgp";
import { promisify } from "es6-promisify";
import { ASP, importPrivateKey } from "../lib/PGP"; import { ASP, importPrivateKey } from "../lib/PGP";
import promisifyDefault from "es6-promisify";
const promisify = promisifyDefault.promisify;
/** /**
* PGP Decrypt operation * PGP Decrypt operation

View File

@ -5,9 +5,10 @@
*/ */
import Operation from "../Operation"; import Operation from "../Operation";
import * as kbpgp from "kbpgp"; import kbpgp from "kbpgp";
import { promisify } from "es6-promisify";
import { ASP, importPrivateKey, importPublicKey } from "../lib/PGP"; import { ASP, importPrivateKey, importPublicKey } from "../lib/PGP";
import promisifyDefault from "es6-promisify";
const promisify = promisifyDefault.promisify;
/** /**
* PGP Decrypt and Verify operation * PGP Decrypt and Verify operation

View File

@ -5,9 +5,10 @@
*/ */
import Operation from "../Operation"; import Operation from "../Operation";
import * as kbpgp from "kbpgp"; import kbpgp from "kbpgp";
import { promisify } from "es6-promisify";
import { ASP } from "../lib/PGP"; import { ASP } from "../lib/PGP";
import promisifyDefault from "es6-promisify";
const promisify = promisifyDefault.promisify;
/** /**
* PGP Encrypt operation * PGP Encrypt operation
*/ */

View File

@ -5,9 +5,10 @@
*/ */
import Operation from "../Operation"; import Operation from "../Operation";
import * as kbpgp from "kbpgp"; import kbpgp from "kbpgp";
import { promisify } from "es6-promisify";
import { ASP, importPrivateKey, importPublicKey } from "../lib/PGP"; import { ASP, importPrivateKey, importPublicKey } from "../lib/PGP";
import promisifyDefault from "es6-promisify";
const promisify = promisifyDefault.promisify;
/** /**
* PGP Encrypt and Sign operation * PGP Encrypt and Sign operation

View File

@ -3316,7 +3316,7 @@ If input "type" is set 5 it will adjust the mnemonic array to decode Centaur ins
If input "type" is set 6 it will adjust the mnemonic array to decode instruction for the X86/486 CPU which conflict with the vector unit instructions with UMOV. If input "type" is set 6 it will adjust the mnemonic array to decode instruction for the X86/486 CPU which conflict with the vector unit instructions with UMOV.
-------------------------------------------------------------------------------------------------------------------------*/ -------------------------------------------------------------------------------------------------------------------------*/
function CompatibilityMode( type ) export function CompatibilityMode( type )
{ {
//Reset the changeable sections of the Mnemonics array, and operand encoding array. //Reset the changeable sections of the Mnemonics array, and operand encoding array.
@ -3515,7 +3515,7 @@ The function "GetPosition()" Gives back the current base address in it's proper
If the hex input is invalid returns false. If the hex input is invalid returns false.
-------------------------------------------------------------------------------------------------------------------------*/ -------------------------------------------------------------------------------------------------------------------------*/
function LoadBinCode( HexStr ) export function LoadBinCode( HexStr )
{ {
//Clear BinCode, and Reset Code Position in Bin Code array. //Clear BinCode, and Reset Code Position in Bin Code array.
@ -3605,7 +3605,7 @@ segment, and offset address. Note that the Code Segment is used in 16 bit code.
if set 36, or higher. Effects instruction location in memory when decoding a program. if set 36, or higher. Effects instruction location in memory when decoding a program.
-------------------------------------------------------------------------------------------------------------------------*/ -------------------------------------------------------------------------------------------------------------------------*/
function SetBasePosition( Address ) export function SetBasePosition( Address )
{ {
//Split the Segment:offset. //Split the Segment:offset.
@ -5652,7 +5652,7 @@ function Reset()
do an linear disassemble. do an linear disassemble.
-------------------------------------------------------------------------------------------------------------------------*/ -------------------------------------------------------------------------------------------------------------------------*/
function LDisassemble() export function LDisassemble()
{ {
var Instruction = ""; //Stores the Decoded instruction. var Instruction = ""; //Stores the Decoded instruction.
var Out = ""; //The Disassemble output var Out = ""; //The Disassemble output
@ -5709,13 +5709,13 @@ function LDisassemble()
* The following code has been added to expose public methods for use in CyberChef * The following code has been added to expose public methods for use in CyberChef
*/ */
export default { export function setBitMode (val) {
LoadBinCode: LoadBinCode, BitMode = val;
LDisassemble: LDisassemble,
SetBasePosition: SetBasePosition,
CompatibilityMode: CompatibilityMode,
setBitMode: val => { BitMode = val; },
setShowInstructionHex: val => { ShowInstructionHex = val; },
setShowInstructionPos: val => { ShowInstructionPos = val; },
}; };
export function setShowInstructionHex (val) {
ShowInstructionHex = val;
};
export function setShowInstructionPos (val) {
ShowInstructionPos = val;
};