From b151af1fa5959b30f5d66c53fa36d62ffc6d0554 Mon Sep 17 00:00:00 2001 From: Alextibtab <14alexcockburn@gmail.com> Date: Wed, 24 Jan 2024 00:20:17 +0000 Subject: [PATCH 1/2] Issue #485 Kill Process Tome Added tome for killing process by specifying PID. --- tavern/tomes/kill_process/main.eldritch | 3 +++ tavern/tomes/kill_process/metadata.yml | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 tavern/tomes/kill_process/main.eldritch create mode 100644 tavern/tomes/kill_process/metadata.yml diff --git a/tavern/tomes/kill_process/main.eldritch b/tavern/tomes/kill_process/main.eldritch new file mode 100644 index 000000000..704486914 --- /dev/null +++ b/tavern/tomes/kill_process/main.eldritch @@ -0,0 +1,3 @@ +process.kill(input_params['pid']) +print("\n") +print("\n") \ No newline at end of file diff --git a/tavern/tomes/kill_process/metadata.yml b/tavern/tomes/kill_process/metadata.yml new file mode 100644 index 000000000..a67b7a76c --- /dev/null +++ b/tavern/tomes/kill_process/metadata.yml @@ -0,0 +1,10 @@ +name: Kill process +description: Kill a process by PID +author: Alextibtab +support_model: FIRST_PARTY +tactic: IMPACT +paramdefs: +- name: pid + label: Process ID + type: int + placeholder: process id eg. 245 From 8d88abdf0d1cdd9028b69f4517466e6a18db024d Mon Sep 17 00:00:00 2001 From: Alextibtab <14alexcockburn@gmail.com> Date: Wed, 24 Jan 2024 00:24:00 +0000 Subject: [PATCH 2/2] convert string to int --- tavern/tomes/kill_process/main.eldritch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tavern/tomes/kill_process/main.eldritch b/tavern/tomes/kill_process/main.eldritch index 704486914..7fa0c088d 100644 --- a/tavern/tomes/kill_process/main.eldritch +++ b/tavern/tomes/kill_process/main.eldritch @@ -1,3 +1,3 @@ -process.kill(input_params['pid']) +process.kill(int(input_params['pid'])) print("\n") print("\n") \ No newline at end of file