1 | | - | |
2 | | - | beacon_command_register( |
3 | | - | "freeBokuLoader", |
4 | | - | "Free/Remove the memory region where the User Defined Reflective Loader is.", |
5 | | - | "Usage: freeBokuLoader"); |
6 | | - | |
7 | | - | alias freeBokuLoader { |
8 | | - | local('$handle $data $barch $username $args'); |
9 | | - | $barch = barch($1); |
10 | | - | |
11 | | - | # pack the arguments |
12 | | - | $args = bof_pack($1, ""); |
13 | | - | |
14 | | - | # read in the BOF file |
15 | | - | $handle = openf(script_resource("dist/freeBokuLoader $+ . $+ $barch $+ .o")); |
16 | | - | $data = readb($handle, -1); |
17 | | - | closef($handle); |
18 | | - | |
19 | | - | if(strlen($data) == 0) |
20 | | - | { |
21 | | - | berror($1, "could not read bof file"); |
22 | | - | return; |
23 | | - | } |
24 | | - | |
25 | | - | # run |
26 | | - | btask($1, "freeBokuLoader BOF"); |
27 | | - | beacon_inline_execute($1, $data, "go", $args); |
28 | | - | } |
29 | | - | |