-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.py
More file actions
31 lines (27 loc) · 861 Bytes
/
Main.py
File metadata and controls
31 lines (27 loc) · 861 Bytes
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
import queue
from Exceptions.CommandException import CommandException
from Listener import Listener
from TargetManager import TargetManager
from Dispacher import Dispacher
from Gui import Gui
from Commands import CommandHandler
if __name__ == "__main__":
pkt_queue = queue.Queue()
cmd_queue = queue.Queue()
manager = TargetManager(cmd_queue)
listener = Listener(pkt_queue)
dispacher = Dispacher(manager, pkt_queue, cmd_queue)
command_handler = CommandHandler(manager)
gui = Gui(cmd_queue)
listener.start()
dispacher.start()
gui.start()
''' Todo add CLI ALL ELSE IS ADDED'''
while True:
cmd = input("> ")
cmd = cmd.split(" ")
try:
result = command_handler.execute_command(cmd[0], cmd[1:])
print(result)
except CommandException as e:
print(e)