-
Notifications
You must be signed in to change notification settings - Fork 0
/
L3V1ATH0N.py
61 lines (56 loc) · 1.2 KB
/
L3V1ATH0N.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#! /usr/bin/python3
import subprocess
import os
import time
login = os.getlogin()
node = os.uname()[1]
def banner():
print('''\t\t\t=========================
\t\t\t+--|\tL3V1ATH0N |--+
\t\t\t=========================\n\n''')
os.system('clear')
banner()
while True:
try:
try:
try:
if login == 'root':
print('['+login+'@'+node+']'+os.pathsep+'#',end=' ')
comm = input()
if comm == 'exit':
time.sleep(1)
print('\n[!] Exited this terminal !')
time.sleep(1)
os.system('clear')
break
if comm == 'clear':
os.system('clear')
banner()
else:
print()
subprocess.call([comm],shell=True)
print()
else:
print('['+login+'@'+node+']'+os.pathsep+'$',end=' ')
comm = input()
if comm == 'exit':
time.sleep(1)
print('\n[!] Exited this terminal !')
time.sleep(1)
os.system('clear')
break
if comm == 'clear':
os.system('clear')
banner()
else:
print()
subprocess.call([comm],shell=True)
print()
except FileNotFoundError:
print('Cannot find that file !')
except KeyboardInterrupt:
print()
pass
except EOFError:
print()
pass