Files
2026-01-08 20:48:42 +08:00

30 lines
719 B
Plaintext
Executable File

# Register command
beacon_command_register(
"bof",
"BOF desc",
"Use: bof"
);
alias bof {
local('$bid $barch $handle $data $args');
$bid = $1;
# Figure out the arch of this session
$barch = barch($bid);
# Read in the right BOF file from the 'dist' directory
# Note: script_resource looks relative to where this .cna file is loaded
$handle = openf(script_resource("dist/BOF. $+ $barch $+ .o"));
$data = readb($handle, -1);
closef($handle);
# Pack empty arguments since no args are required
$args = bof_pack($1,"");
# Announce what we're doing
btask($bid, "Running BOF");
# Execute it
beacon_inline_execute($bid, $data, "go", $args);
}