(project_name)
| 251 | |
| 252 | @views_project.route("/project/<project_name>/build", methods=['POST', 'GET']) |
| 253 | def build_project(project_name): |
| 254 | global thread_running |
| 255 | |
| 256 | project_settings = storage.get_project_setting(project_name) |
| 257 | if project_settings == None: |
| 258 | logger.error("Project {} not found".format(project_name)) |
| 259 | return redirect("/projects", code=302) |
| 260 | |
| 261 | pathlib.Path(project_settings.get_inject_exe_out()).unlink(missing_ok=True) |
| 262 | |
| 263 | #if project.settings.get_inject_exe_in().endswith(".dll"): |
| 264 | # if project.settings.dllfunc == "": |
| 265 | # logger.error("DLL injection requires a DLL function name") |
| 266 | # return redirect("/project/{}".format(project_name), code=302) |
| 267 | |
| 268 | project_settings.try_start_final_infected_exe = False |
| 269 | project_settings.cleanup_files_on_start = True # cleanup, or it will be confusing if failed |
| 270 | |
| 271 | project = Project(project_settings) |
| 272 | prepare_project(project_name) |
| 273 | thread = Thread(target=supermega_thread, args=(project.settings, )) |
| 274 | thread.start() |
| 275 | thread_running = True |
| 276 | |
| 277 | return redirect("/project/{}/status".format(project_name), code=302) |
| 278 | |
| 279 | |
| 280 | @views_project.route("/project/<project_name>/status") |
nothing calls this directly
no test coverage detected