ScreenshotBOF/bin/BOF/screenshotBOF.cna

21 lines
648 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('$barch $handle $data $args $target_pid');
println(@_);
# figure out the arch of this session
$barch = barch($1);
# 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($1, "Running screenshot BOF by (@codex_tf2)");
# execute it.
beacon_inline_execute($1, $data, "go", $args);
}