From 8d04941c74f19a2b8dbe45c0f66d9359fcda4cee Mon Sep 17 00:00:00 2001
From: Anonymus Raccoon
Date: Sat, 25 Apr 2020 12:20:33 +0200
Subject: [PATCH] Adding a run async
---
command_helper.py | 5 +++++
main.py | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/command_helper.py b/command_helper.py
index 92f1b7d..90b8f94 100644
--- a/command_helper.py
+++ b/command_helper.py
@@ -7,3 +7,8 @@ class CommandHelper:
def run(cmd):
with open(os.devnull, 'wb') as devnull:
return subprocess.call(cmd.split(' '), stdout=devnull, stderr=subprocess.STDOUT)
+
+ @staticmethod
+ def run_async(cmd):
+ with open(os.devnull, 'wb') as devnull:
+ return subprocess.Popen(cmd.split(' '), stdout=devnull, stderr=subprocess.STDOUT)
\ No newline at end of file
diff --git a/main.py b/main.py
index 8883090..4c15636 100755
--- a/main.py
+++ b/main.py
@@ -18,7 +18,6 @@ class AnonymousGoose:
# print(DetectTerm.find_terminal())
# time.sleep(1)
Term.print_all("YOU HAVE BEEN HACKED.\n")
- self.run()
def __del__(self):
if not self.stopped:
@@ -46,4 +45,5 @@ class AnonymousGoose:
if __name__ == "__main__":
goose = AnonymousGoose()
+ goose.run()
goose.stop()