mirror of
https://github.com/zoriya/AnonymousGoose.git
synced 2026-06-05 06:59:13 +00:00
Adding a run async
This commit is contained in:
@@ -7,3 +7,8 @@ class CommandHelper:
|
|||||||
def run(cmd):
|
def run(cmd):
|
||||||
with open(os.devnull, 'wb') as devnull:
|
with open(os.devnull, 'wb') as devnull:
|
||||||
return subprocess.call(cmd.split(' '), stdout=devnull, stderr=subprocess.STDOUT)
|
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)
|
||||||
@@ -18,7 +18,6 @@ class AnonymousGoose:
|
|||||||
# print(DetectTerm.find_terminal())
|
# print(DetectTerm.find_terminal())
|
||||||
# time.sleep(1)
|
# time.sleep(1)
|
||||||
Term.print_all("YOU HAVE BEEN HACKED.\n")
|
Term.print_all("YOU HAVE BEEN HACKED.\n")
|
||||||
self.run()
|
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
if not self.stopped:
|
if not self.stopped:
|
||||||
@@ -46,4 +45,5 @@ class AnonymousGoose:
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
goose = AnonymousGoose()
|
goose = AnonymousGoose()
|
||||||
|
goose.run()
|
||||||
goose.stop()
|
goose.stop()
|
||||||
|
|||||||
Reference in New Issue
Block a user