-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0bafde7
commit dee0692
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |