psremote.cna 647 B

123456789101112131415161718192021222324
  1. # author REDMED-X
  2. beacon_command_register(
  3. "psremote", "List all running processes on a remote host.",
  4. "INFO:\nGet a list of all processes running on the remote host.\n\n" .
  5. "USAGE:\npsremote <FQDN or IP remote host>\n\n");
  6. alias psremote {
  7. $bid = $1;
  8. $remotehost = $2;
  9. # read in the right BOF file
  10. $handle = openf(script_resource("psremote.o"));
  11. $data = readb($handle, -1);
  12. closef($handle);
  13. # pack our arguments
  14. $arg_data = bof_pack($bid, "z", $remotehost);
  15. blog($bid, "Tasked to list running processes..");
  16. beacon_inline_execute($bid, $data, "go", $arg_data);
  17. }