MCPcopy Create free account
hub / github.com/dobin/SuperMega / build_project

Function build_project

app/views_project.py:253–277  ·  view source on GitHub ↗
(project_name)

Source from the content-addressed store, hash-verified

251
252@views_project.route("/project/<project_name>/build", methods=['POST', 'GET'])
253def 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")

Callers

nothing calls this directly

Calls 5

ProjectClass · 0.90
prepare_projectFunction · 0.90
get_project_settingMethod · 0.80
formatMethod · 0.80
get_inject_exe_outMethod · 0.80

Tested by

no test coverage detected