padding-oracle-attacker
Version:
CLI tool and library to execute padding oracle attacks easily
67 lines (66 loc) • 2.15 kB
TypeScript
/// <reference types="node" />
import { OracleResult } from './types';
interface NetworkStats {
count: number;
lastDownloadTime: number;
bytesDown: number;
bytesUp: number;
}
interface LogProgressOptions {
plaintext: Buffer;
ciphertext: Buffer;
foundOffsets: Set<number>;
blockSize: number;
blockI: number;
byteI: number;
byte: number;
decryptionSuccess: boolean;
networkStats: NetworkStats;
startFromFirstBlock?: boolean;
isCacheEnabled?: boolean;
}
export declare function logProgress({ plaintext, ciphertext, foundOffsets, blockSize, blockI, byteI, byte, decryptionSuccess, networkStats, startFromFirstBlock, isCacheEnabled }: LogProgressOptions): void;
export declare function logWarning(txt: string): void;
interface LogStart {
blockCount: number;
totalSize: number;
initialRequest?: Promise<OracleResult>;
decryptionSuccess?: Promise<boolean>;
}
export declare const decryption: {
logStart({ blockCount, totalSize, initialRequest: initialRequestPromise, decryptionSuccess }: LogStart): Promise<void>;
logCompletion({ foundBytes, interBytes }: {
foundBytes: Buffer;
interBytes: Buffer;
}): void;
};
export declare const encryption: {
logStart({ blockCount, totalSize }: LogStart): void;
logCompletion({ foundBytes, interBytes, finalRequest }: {
foundBytes: Buffer;
interBytes: Buffer;
finalRequest?: OracleResult | undefined;
}): void;
};
interface AnalysisLogCompletion {
responsesTable: string[][];
statusCodeFreq: {
[key: string]: number;
};
bodyLengthFreq: {
[key: string]: number;
};
tmpDirPath?: string;
networkStats: NetworkStats;
isCacheEnabled: boolean;
}
export declare const analysis: {
logStart({ url, blockSize, tmpDirPath }: {
url: string;
blockSize: number;
tmpDirPath?: string | undefined;
}): void;
logCompletion({ responsesTable, statusCodeFreq, bodyLengthFreq, tmpDirPath, networkStats, isCacheEnabled }: AnalysisLogCompletion): void;
};
export declare function logError(err: Error): void;
export {};