fix: save comment

This commit is contained in:
Dobin
2024-03-23 18:36:22 +00:00
parent 11ec4a785b
commit cf927e22e0
2 changed files with 5 additions and 1 deletions
+2 -1
View File
@@ -14,7 +14,8 @@
<div class="row">
<div class="col-3">
<input type="text" name="comment" class="hidden form-control" placeholder="Comment" value="{{project.comment}}"
<input type="text" name="comment" class="hidden form-control"
placeholder="Comment" value="{{project.comment}}"
placeholder="" aria-label="PROJECTNAME" aria-describedby="basic-addon1">
<select class="form-select" name="shellcode" aria-label="SHELLCODE">
+3
View File
@@ -78,6 +78,7 @@ def add_project():
settings = Settings()
project_name = request.form['project_name']
comment = request.form['comment']
settings.payload_path = "app/upload/shellcode/" + request.form['shellcode']
if request.form['shellcode'] == "createfile.bin":
@@ -106,6 +107,7 @@ def add_project():
# overwrite project
project = storage.get_project(project_name)
project.settings = settings
project.comment = comment
else:
# add new project
project = Project(project_name, settings)
@@ -113,6 +115,7 @@ def add_project():
project.project_exe = request.form['exe'].replace(".exe", ".infected.exe")
project.settings = settings
settings.project_name = project_name
project.comment = comment
storage.add_project(project)
storage.save_data()
return redirect("/project/{}".format(project_name), code=302)