forked from StormWorld0/storm-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsmfstart
More file actions
executable file
·42 lines (32 loc) · 1.06 KB
/
Copy pathsmfstart
File metadata and controls
executable file
·42 lines (32 loc) · 1.06 KB
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
#!/usr/bin/env python3
import readline # noqa: F401
import sys
try:
from apps.utility.colors import *
from lib.smf.core.booting.boot import *
from lib.ui.banner import *
from lib.smf.core.console.engine import Context
except ImportError as e:
print(f"Import error smfstart => {e}")
sys.exit(100)
def main():
boot()
banner()
core = Context()
while not core.exit:
p_mod = core.current_module_name if core.current_module else "~"
try:
print(f"{CC.CYAN}┌─({CC.BLUE}storm{CC.YELLOW}<⚡>{CC.BLUE}framework{CC.CYAN}){CC.RESET}-{CC.RED}[{p_mod}]{CC.RESET}")
promp = f"{CC.CYAN}└─{CC.BLUE}➤ {CC.RESET}"
user_input = input(promp).strip().split()
except KeyboardInterrupt: return
except EOFError: break
if not user_input:
continue
# parsing input
cmd = user_input[0].lower()
args = user_input[1:]
# Send input data to the console
core.dispatch(cmd, args)
if __name__ == "__main__":
main()