UNPKG

r2papi

Version:

r2api on top of r2pipe for typescript and js

48 lines (47 loc) 1.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.newAsyncR2PipeFromSync = exports.R2PipeSyncFromSync = void 0; class R2PipeSyncFromSync { constructor(r2p) { this.r2p = r2p; } /** * Run a command in the associated instance of radare2 and return the output as a string * * @param {string} command to be executed inside radare2. * @returns {string} The output of the command execution */ cmd(command) { return this.r2p.cmd(command); } cmdAt(command, address) { return this.r2p.cmdAt(command, address); } cmdj(cmd) { return this.r2p.cmdj(cmd); } call(command) { return this.r2p.call(command); } callj(cmd) { return this.r2p.cmdj(cmd); } callAt(command, address) { return this.r2p.cmdAt(command, address); } log(msg) { return this.r2p.log(msg); } plugin(type, maker) { return this.r2p.plugin(type, maker); } unload(type, name) { return this.r2p.unload(type, name); } } exports.R2PipeSyncFromSync = R2PipeSyncFromSync; function newAsyncR2PipeFromSync(r2p) { const asyncR2Pipe = new R2PipeSyncFromSync(r2p); return asyncR2Pipe; } exports.newAsyncR2PipeFromSync = newAsyncR2PipeFromSync;