add find term

This commit is contained in:
jeremy
2020-04-24 21:14:52 +02:00
parent bf1558e0e5
commit 23bec2699b
2 changed files with 40 additions and 1 deletions
+35
View File
@@ -0,0 +1,35 @@
import os
class DetectTerm:
terminal_list = [
"konsole",
"terminator",
"tilda",
"guake",
"yakuake",
"roxterm",
"eterm",
"Rxvt",
"wterm",
"lxterminal",
"termKit",
"st",
"gnome-terminal",
"final_term",
"finalTerm",
"terminology",
"xfce4_terminal",
"xterm",
"lilyterm",
"sakura",
"rxvt-unicode"
]
@staticmethod
def find_terminal():
for term in DetectTerm.terminal_list:
if not os.system(term + " &"):
return term
+5 -1
View File
@@ -1,4 +1,8 @@
#!/usr/bin/env python3
from term_utils import TermUtils
from detect_term import DetectTerm
import time
TermUtils.print("YOU HAVE BEEN HACKED.\n")
print(DetectTerm.find_terminal())
time.sleep(1)
TermUtils.print("YOU HAVE BEEN HACKED.\n")