mirror of https://github.com/MISP/misp-dashboard
commit
3c1125083a
|
@ -40,6 +40,8 @@ Steps:
|
||||||
- check log dynamic endpoint
|
- check log dynamic endpoint
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
MISP_USER = 'admin@admin.test'
|
||||||
|
MISP_PASSWD = 'Password1234'
|
||||||
HOST = 'http://127.0.0.1'
|
HOST = 'http://127.0.0.1'
|
||||||
PORT = 8001 # overriden by configuration file
|
PORT = 8001 # overriden by configuration file
|
||||||
configuration_file = {}
|
configuration_file = {}
|
||||||
|
@ -121,7 +123,7 @@ def check_virtual_environment_and_packages(spinner):
|
||||||
|
|
||||||
@add_spinner
|
@add_spinner
|
||||||
def check_configuration(spinner):
|
def check_configuration(spinner):
|
||||||
global configuration_file, port
|
global configuration_file, PORT, HOST
|
||||||
configfile = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'config/config.cfg')
|
configfile = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'config/config.cfg')
|
||||||
cfg = configparser.ConfigParser()
|
cfg = configparser.ConfigParser()
|
||||||
cfg.read(configfile)
|
cfg.read(configfile)
|
||||||
|
@ -135,7 +137,14 @@ def check_configuration(spinner):
|
||||||
# Check if all fields from config.default exists in config
|
# Check if all fields from config.default exists in config
|
||||||
result, faulties = diagnostic_util.dict_compare(cfg_default, cfg)
|
result, faulties = diagnostic_util.dict_compare(cfg_default, cfg)
|
||||||
if result:
|
if result:
|
||||||
port = configuration_file.get("Server", "port")
|
PORT = configuration_file.get("Server", "port")
|
||||||
|
host = configuration_file.get("Server", "host")
|
||||||
|
if not (host == "localhost" or host == "127.0.0.1"):
|
||||||
|
if configuration_file.getboolean("Server", "ssl"):
|
||||||
|
http = "https://"
|
||||||
|
else:
|
||||||
|
http = "http://"
|
||||||
|
HOST = http+host
|
||||||
return (True, '')
|
return (True, '')
|
||||||
else:
|
else:
|
||||||
return_text = '''Configuration incomplete.
|
return_text = '''Configuration incomplete.
|
||||||
|
@ -410,8 +419,8 @@ def check_server_listening(spinner):
|
||||||
@add_spinner
|
@add_spinner
|
||||||
def check_server_dynamic_enpoint(spinner):
|
def check_server_dynamic_enpoint(spinner):
|
||||||
payload = {
|
payload = {
|
||||||
'username': 'admin@admin.test',
|
'username': MISP_USER,
|
||||||
'password': 'Password1234',
|
'password': MISP_PASSWD,
|
||||||
'submit': 'Sign In'
|
'submit': 'Sign In'
|
||||||
}
|
}
|
||||||
sleep_max = 15
|
sleep_max = 15
|
||||||
|
|
Loading…
Reference in New Issue