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
|
#! /usr/bin/env python
'''Start the program. Load segments of the program that need to be started and
run them.'''
import time
import libs.globals
print(libs.globals.global_vars['anon+']['banner'] %
(libs.globals.global_vars['anon+']['VERSION'],
libs.globals.global_vars['anon+']['BUILD']))
import libs.threadmanager
import libs.browser
import libs.events
import libs.logs
import libs.config
print('''
== Warning! ==
This is an insecure beta!
This software has various
known weaknesses. Please,
do not depend on it to be
secure! Thank you, ~~Devs
''')
## Startup
if __name__ == '__main__':
# Create the API Server. Used by external Applications.
#import api.server
#api.server.start()
import libs.morado.morado
libs.morado.morado.start()
# Create the console. Later to be replaced with an extenal app
#from libs.console import console
#consoleO = console()
#libs.threadmanager.register(consoleO)
#consoleO.start()
# Load and prepare our list of friends
import libs.friends as friends
friends.load_friends()
# Load connection handlers and start
import tunnels.directudp
tunnels.directudp.start()
# Start the web interface
import uis.web.manager
uis.web.manager.start()
libs.browser.open('http://localhost:7777/')
# Start the API
## main loop
while libs.globals.global_vars['running']:
time.sleep(1)
## cleanup
libs.threadmanager.killall()
libs.threadmanager.close_sockets()
friends.save_friends()
libs.config.save_config()
exit()
|