New upstream version 3.1.1
Sophie Brun
5 years ago
6 | 6 |
|
7 | 7 |
New features in the latest update
|
8 | 8 |
=====================================
|
|
9 |
|
|
10 |
September 21, 2018:
|
|
11 |
* Fix bug: manage.py status_check
|
|
12 |
* Fix bug: manage.py initdb
|
9 | 13 |
|
10 | 14 |
September 17, 2018:
|
11 | 15 |
---
|
1 | 1 |
<faraday>
|
2 | 2 |
|
3 | 3 |
<appname>Faraday - Penetration Test IDE</appname>
|
4 | |
<version>3.1</version>
|
|
4 |
<version>3.1.1</version>
|
5 | 5 |
<debug_status>0</debug_status>
|
6 | 6 |
<font>-Misc-Fixed-medium-r-normal-*-12-100-100-100-c-70-iso8859-1</font>
|
7 | 7 |
<home_path>~/</home_path>
|
162 | 162 |
app = Flask(__name__)
|
163 | 163 |
|
164 | 164 |
try:
|
165 | |
app.config['SECRET_KEY'] = server.config.faraday_server.secret_key
|
|
165 |
secret_key = server.config.faraday_server.secret_key
|
166 | 166 |
except Exception:
|
|
167 |
# Now when the config file does not exist it doesn't enter in this
|
|
168 |
# condition, but it could happen in the future. TODO check
|
167 | 169 |
save_new_secret_key(app)
|
|
170 |
else:
|
|
171 |
if secret_key is None:
|
|
172 |
# This is what happens now when the config file doesn't exist.
|
|
173 |
# TODO check
|
|
174 |
save_new_secret_key(app)
|
|
175 |
else:
|
|
176 |
app.config['SECRET_KEY'] = secret_key
|
168 | 177 |
|
169 | 178 |
login_failed_message = ("Invalid username or password", 'error')
|
170 | 179 |
|
27 | 27 |
|
28 | 28 |
|
29 | 29 |
def check_server_running():
|
30 | |
pid = is_server_running()
|
|
30 |
port = int(server.config.faraday_server.port)
|
|
31 |
pid = is_server_running(port)
|
31 | 32 |
return pid
|
32 | |
|
|
33 |
|
33 | 34 |
|
34 | 35 |
def check_open_ports():
|
35 | 36 |
address = server.config.faraday_server.bind_address
|
|
40 | 41 |
return True
|
41 | 42 |
else:
|
42 | 43 |
return False
|
43 | |
|
|
44 |
|
44 | 45 |
|
45 | 46 |
def check_postgres():
|
46 | 47 |
with app.app_context():
|
|
51 | 52 |
return False
|
52 | 53 |
except sqlalchemy.exc.ArgumentError:
|
53 | 54 |
return None
|
54 | |
|
|
55 |
|
|
56 |
|
55 | 57 |
def check_locks_postgresql():
|
56 | 58 |
with app.app_context():
|
57 | 59 |
psql_status = check_postgres()
|
|
86 | 88 |
|
87 | 89 |
else:
|
88 | 90 |
return None
|
89 | |
|
|
91 |
|
90 | 92 |
|
91 | 93 |
def check_client():
|
92 | 94 |
|
|
191 | 193 |
exit_code = 1
|
192 | 194 |
return exit_code
|
193 | 195 |
|
|
196 |
|
194 | 197 |
def print_postgresql_locks_status():
|
195 | 198 |
"""Prints the status of locks in Postgresql using check_locks_postgresql()"""
|
196 | 199 |
lock_status = check_locks_postgresql()
|
|
253 | 256 |
else:
|
254 | 257 |
print('[{green}+{white}] Client dependencies met'\
|
255 | 258 |
.format(green=Fore.GREEN, white=Fore.WHITE))
|
256 | |
|
|
259 |
|
257 | 260 |
|
258 | 261 |
def print_config_status():
|
259 | 262 |
"""Prints Status of the configuration using check_credentials(), check_storage_permission() and check_open_ports()"""
|
260 | |
|
|
263 |
|
261 | 264 |
pid = check_server_running()
|
262 | 265 |
result = check_postgres()
|
263 | 266 |
if pid and result:
|