Codebase list python-faraday / upstream/3.1.1
New upstream version 3.1.1 Sophie Brun 5 years ago
5 changed file(s) with 26 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
66
77 New features in the latest update
88 =====================================
9
10 September 21, 2018:
11 * Fix bug: manage.py status_check
12 * Fix bug: manage.py initdb
913
1014 September 17, 2018:
1115 ---
0 3.1
0 3.1.1
11 <faraday>
22
33 <appname>Faraday - Penetration Test IDE</appname>
4 <version>3.1</version>
4 <version>3.1.1</version>
55 <debug_status>0</debug_status>
66 <font>-Misc-Fixed-medium-r-normal-*-12-100-100-100-c-70-iso8859-1</font>
77 <home_path>~/</home_path>
162162 app = Flask(__name__)
163163
164164 try:
165 app.config['SECRET_KEY'] = server.config.faraday_server.secret_key
165 secret_key = server.config.faraday_server.secret_key
166166 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
167169 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
168177
169178 login_failed_message = ("Invalid username or password", 'error')
170179
2727
2828
2929 def check_server_running():
30 pid = is_server_running()
30 port = int(server.config.faraday_server.port)
31 pid = is_server_running(port)
3132 return pid
32
33
3334
3435 def check_open_ports():
3536 address = server.config.faraday_server.bind_address
4041 return True
4142 else:
4243 return False
43
44
4445
4546 def check_postgres():
4647 with app.app_context():
5152 return False
5253 except sqlalchemy.exc.ArgumentError:
5354 return None
54
55
56
5557 def check_locks_postgresql():
5658 with app.app_context():
5759 psql_status = check_postgres()
8688
8789 else:
8890 return None
89
91
9092
9193 def check_client():
9294
191193 exit_code = 1
192194 return exit_code
193195
196
194197 def print_postgresql_locks_status():
195198 """Prints the status of locks in Postgresql using check_locks_postgresql()"""
196199 lock_status = check_locks_postgresql()
253256 else:
254257 print('[{green}+{white}] Client dependencies met'\
255258 .format(green=Fore.GREEN, white=Fore.WHITE))
256
259
257260
258261 def print_config_status():
259262 """Prints Status of the configuration using check_credentials(), check_storage_permission() and check_open_ports()"""
260
263
261264 pid = check_server_running()
262265 result = check_postgres()
263266 if pid and result: