-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
66 lines (50 loc) · 2.75 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
import lib.connection as connection
import lib.utils as utils
from colorama import Fore
header = """
██╗ ██╗███████╗███████╗██████╗ ██████╗ ███████╗ ██████╗ ██████╗ ███╗ ██╗
██║ ██║██╔════╝██╔════╝██╔══██╗██╔══██╗██╔════╝██╔════╝██╔═══██╗████╗ ██║
██║ ██║███████╗█████╗ ██████╔╝██████╔╝█████╗ ██║ ██║ ██║██╔██╗ ██║
██║ ██║╚════██║██╔══╝ ██╔══██╗██╔══██╗██╔══╝ ██║ ██║ ██║██║╚██╗██║
╚██████╔╝███████║███████╗██║ ██║██║ ██║███████╗╚██████╗╚██████╔╝██║ ╚████║
╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝
"""
def main():
utils.clear()
if utils.isNew():
print(Fore.GREEN+header)
print("\t\tAuthor: @fabrisoftware | Fabriziodeveloper")
print("\t\tGitHub: https://github.com/FabriSoftware/UserRecon/")
print("\t\tTwitter: @Fabritutoriale_\n")
utils.configure()
else:
utils.clear()
print("["+Fore.YELLOW+"*"+Fore.RESET+"] loading config saved...")
connected()
def connected():
config = utils.getCnf()
result = connection.connection(config["host"], config["port"], config["password"])
if not result:
print("["+Fore.RED+"X"+Fore.RESET+"] incorrect password")
exit(1)
while True:
request = user_input("> ")
if request == "exit" or request == "quit":
print("["+Fore.GREEN+"~"+Fore.RESET+"] bye, bye")
result.close()
break
if request == "stop":
connection.send_command(result, "stop")
print("["+Fore.GREEN+"~"+Fore.RESET+"] the remote server has been stopped")
result.close()
break
response = connection.send_command(result, request)
print(response)
def user_input(prompt):
try:
return input(prompt)
except KeyboardInterrupt:
print("["+Fore.GREEN+"-"+Fore.RESET+"] press control-c again to quit")
return input(prompt)
if __name__ == '__main__':
main()