Skip to content

Commit

Permalink
Process info tome (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alextibtab authored Jan 28, 2024
1 parent 0bafde7 commit dee0692
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tavern/tomes/process_info/main.eldritch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
def process_info(pid):
info = process.info(sys.get_pid() if pid == -1 else pid)
for key, value in info.items():
if key == "cmd":
print("cmd_args=\n")
for nested_value in value.split(" "):
print("\t- {}\n".format(nested_value))
elif key == "environ":
print("env_variables=\n")
for nested_value in value.split(","):
print("\t- {}\n".format(nested_value))
else:
print("{}={}\n".format(key, value))

process_info(int(input_params['pid']))
print("\n")
print("\n")
10 changes: 10 additions & 0 deletions tavern/tomes/process_info/metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Process info
description: Get information about process with specified PID or -1 for current process
author: Alextibtab
support_model: FIRST_PARTY
tactic: DISCOVERY
paramdefs:
- name: pid
label: Process ID
type: int
placeholder: process id eg. 245

0 comments on commit dee0692

Please sign in to comment.