-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.py
93 lines (83 loc) · 7.53 KB
/
main.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# -*- coding: utf-8 -*-
import os, colorama
from colorama import Fore
import requests, json
from os import system
import commands as commands
import importlib
os.system('title Watson')
def clear():
try:
os.system("cls")
except:
os.system("clear")
clear()
system('mode con: cols=100 lines=30')
def homeban():
print("")
print(f" {Fore.RED}██{Fore.RESET}╗ {Fore.RED}██{Fore.RESET}╗ {Fore.RED}█████{Fore.RESET}╗ {Fore.RED}████████{Fore.RESET}╗{Fore.RED}███████{Fore.RESET}╗ {Fore.RED}██████{Fore.RESET}╗ {Fore.RED}███{Fore.RESET}╗ {Fore.RED}██{Fore.RESET}╗".center(os.get_terminal_size().columns))
print(f" {Fore.RED}██{Fore.RESET}║ {Fore.RED}██{Fore.RESET}║{Fore.RED}██{Fore.RESET}╔══{Fore.RED}██{Fore.RESET}╗╚══{Fore.RED}██{Fore.RESET}╔══╝{Fore.RED}██{Fore.RESET}╔════╝{Fore.RED}██{Fore.RESET}╔═══{Fore.RED}██{Fore.RESET}╗{Fore.RED}████{Fore.RESET}╗ {Fore.RED}██{Fore.RESET}║".center(os.get_terminal_size().columns))
print(f" {Fore.RED}██{Fore.RESET}║ {Fore.RED}█{Fore.RESET}╗ {Fore.RED}██{Fore.RESET}║{Fore.RED}███████{Fore.RESET}║ {Fore.RED}██{Fore.RESET}║ {Fore.RED}███████{Fore.RESET}╗{Fore.RED}██{Fore.RESET}║ {Fore.RED}██{Fore.RESET}║{Fore.RED}██{Fore.RESET}╔{Fore.RED}██{Fore.RESET}╗ {Fore.RED}██{Fore.RESET}║".center(os.get_terminal_size().columns))
print(f" {Fore.RED}██{Fore.RESET}║{Fore.RED}███{Fore.RESET}╗{Fore.RED}██{Fore.RESET}║{Fore.RED}██{Fore.RESET}╔══{Fore.RED}██{Fore.RESET}║ {Fore.RED}██{Fore.RESET}║ ╚════{Fore.RED}██{Fore.RESET}║{Fore.RED}██{Fore.RESET}║ {Fore.RED}██{Fore.RESET}║{Fore.RED}██{Fore.RESET}║╚{Fore.RED}██{Fore.RESET}╗{Fore.RED}██{Fore.RESET}║".center(os.get_terminal_size().columns))
print(f" {Fore.RESET}╚{Fore.RED}███{Fore.RESET}╔{Fore.RED}███{Fore.RESET}╔╝{Fore.RED}██{Fore.RESET}║ {Fore.RED}██{Fore.RESET}║ {Fore.RED}██{Fore.RESET}║ {Fore.RED}███████{Fore.RESET}║╚{Fore.RED}██████{Fore.RESET}╔╝{Fore.RED}██{Fore.RESET}║ ╚{Fore.RED}████{Fore.RESET}║".center(os.get_terminal_size().columns))
print(f"{Fore.RESET} ╚══╝╚══╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═══╝".center(os.get_terminal_size().columns))
print(f"Type Help To See All Commands".center(os.get_terminal_size().columns))
print("────────────────────────────────────────────────────────────────────────────────────────────────────")
print("")
def banner():
print("")
print(f" {Fore.RED}██{Fore.RESET}╗ {Fore.RED}██{Fore.RESET}╗ {Fore.RED}█████{Fore.RESET}╗ {Fore.RED}████████{Fore.RESET}╗{Fore.RED}███████{Fore.RESET}╗ {Fore.RED}██████{Fore.RESET}╗ {Fore.RED}███{Fore.RESET}╗ {Fore.RED}██{Fore.RESET}╗".center(os.get_terminal_size().columns))
print(f" {Fore.RED}██{Fore.RESET}║ {Fore.RED}██{Fore.RESET}║{Fore.RED}██{Fore.RESET}╔══{Fore.RED}██{Fore.RESET}╗╚══{Fore.RED}██{Fore.RESET}╔══╝{Fore.RED}██{Fore.RESET}╔════╝{Fore.RED}██{Fore.RESET}╔═══{Fore.RED}██{Fore.RESET}╗{Fore.RED}████{Fore.RESET}╗ {Fore.RED}██{Fore.RESET}║".center(os.get_terminal_size().columns))
print(f" {Fore.RED}██{Fore.RESET}║ {Fore.RED}█{Fore.RESET}╗ {Fore.RED}██{Fore.RESET}║{Fore.RED}███████{Fore.RESET}║ {Fore.RED}██{Fore.RESET}║ {Fore.RED}███████{Fore.RESET}╗{Fore.RED}██{Fore.RESET}║ {Fore.RED}██{Fore.RESET}║{Fore.RED}██{Fore.RESET}╔{Fore.RED}██{Fore.RESET}╗ {Fore.RED}██{Fore.RESET}║".center(os.get_terminal_size().columns))
print(f" {Fore.RED}██{Fore.RESET}║{Fore.RED}███{Fore.RESET}╗{Fore.RED}██{Fore.RESET}║{Fore.RED}██{Fore.RESET}╔══{Fore.RED}██{Fore.RESET}║ {Fore.RED}██{Fore.RESET}║ ╚════{Fore.RED}██{Fore.RESET}║{Fore.RED}██{Fore.RESET}║ {Fore.RED}██{Fore.RESET}║{Fore.RED}██{Fore.RESET}║╚{Fore.RED}██{Fore.RESET}╗{Fore.RED}██{Fore.RESET}║".center(os.get_terminal_size().columns))
print(f" {Fore.RESET}╚{Fore.RED}███{Fore.RESET}╔{Fore.RED}███{Fore.RESET}╔╝{Fore.RED}██{Fore.RESET}║ {Fore.RED}██{Fore.RESET}║ {Fore.RED}██{Fore.RESET}║ {Fore.RED}███████{Fore.RESET}║╚{Fore.RED}██████{Fore.RESET}╔╝{Fore.RED}██{Fore.RESET}║ ╚{Fore.RED}████{Fore.RESET}║".center(os.get_terminal_size().columns))
print(f"{Fore.RESET} ╚══╝╚══╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═══╝".center(os.get_terminal_size().columns))
print("────────────────────────────────────────────────────────────────────────────────────────────────────")
print("")
homeban()
def delete_module(modname, paranoid=None):
from sys import modules
try:
thismod = modules[modname]
except KeyError:
raise ValueError(modname)
these_symbols = dir(thismod)
if paranoid:
try:
paranoid[:] # sequence support
except:
raise ValueError('must supply a finite list for paranoid')
else:
these_symbols = paranoid[:]
del modules[modname]
for mod in modules.values():
try:
delattr(mod, modname)
except AttributeError:
pass
if paranoid:
for symbol in these_symbols:
if symbol[:2] == '__': # ignore special symbols
continue
try:
delattr(mod, symbol)
except AttributeError:
pass
while True:
maininput = input(f'[{Fore.RED}Watson{Fore.RESET}]~: ')
if maininput == 'HELP' or maininput == 'help' or maininput == '?':
print(f"""Commands:\n=========\nclear""")
for root, dirs, files in os.walk('./commands'):
for file in files:
if file.endswith('.py'):
os.path.basename(file).split('.')[0]
print(os.path.basename(file).split('.')[0])
elif maininput == 'clear' or maininput == 'cls' or maininput == 'Clear' or maininput == 'CLEAR':
clear()
homeban()
else:
try:
importlib.import_module("commands."+maininput, package=None)
delete_module('commands.' +maininput)
except ImportError:
print("Command Not Found In Modules!")