예제 #1
0
파일: engine.py 프로젝트: ktg-123/Nettacker
def index():
    """
    index page for WebUI

    Returns:
        rendered HTML page
    """
    filename = _builder(_core_config(), _core_default_config())["log_in_file"]

    if version() == 2:
        return render_template("index.html",
                               scan_method=__scan_methods(),
                               profile=__profiles(),
                               graphs=__graphs(),
                               languages=__languages(),
                               filename=filename,
                               method_args_list=load_all_method_args(
                                   __language(), API=True).decode('utf-8'))

    return render_template("index.html",
                           scan_method=__scan_methods(),
                           profile=__profiles(),
                           graphs=__graphs(),
                           languages=__languages(),
                           filename=filename,
                           method_args_list=load_all_method_args(__language(),
                                                                 API=True))
예제 #2
0
def index():
    filename = _builder(_core_config(), _core_default_config())["log_in_file"]
    return render_template("index.html",
                           scan_method=__scan_methods(),
                           profile=__profiles(),
                           graphs=__graphs(),
                           languages=__languages(),
                           filename=filename,
                           method_args_list=load_all_method_args(__language(),
                                                                 API=True))
예제 #3
0
def index():
    language = app.config["OWASP_NETTACKER_CONFIG"]["language"]
    filename = "results/results_{0}_{1}.html".format(
        now(model="%Y_%m_%d_%H_%M_%S"),
        "".join(random.choice(string.ascii_lowercase) for x in range(10)))
    return render_template("index.html",
                           scan_methods=__scan_methods(),
                           profiles=__profiles(),
                           graphs=__graphs(),
                           languages=__languages(),
                           filename=filename,
                           method_args_list=load_all_method_args(language,
                                                                 API=True))