a
This commit is contained in:
parent
2253506f80
commit
0d9c128a2c
35
Flask/app.py
35
Flask/app.py
@ -368,7 +368,6 @@ def config_get():
|
||||
@app.route("/config/", methods=["POST"])
|
||||
def config_post():
|
||||
action = request.form
|
||||
print(action)
|
||||
with open("/app/MsRewards-Reborn/user_data/proxy.json", "r") as inFile:
|
||||
proxys = json.load(inFile)
|
||||
with open("/app/MsRewards-Reborn/user_data/discord.json", "r") as inFile:
|
||||
@ -376,22 +375,26 @@ def config_post():
|
||||
with open("/app/MsRewards-Reborn/user_data/configs.json", "r") as inFile:
|
||||
configs = json.load(inFile)
|
||||
|
||||
comptes = {
|
||||
"1":{"mail": action["mail1"], "pwd": action["pwd1"], "2fa": action["2fa1"]},
|
||||
"2":{"mail": action["mail2"], "pwd": action["pwd2"], "2fa": action["2fa2"]},
|
||||
"3":{"mail": action["mail3"], "pwd": action["pwd3"], "2fa": action["2fa3"]},
|
||||
"4":{"mail": action["mail4"], "pwd": action["pwd4"], "2fa": action["2fa4"]},
|
||||
"5":{"mail": action["mail5"], "pwd": action["pwd5"], "2fa": action["2fa5"]}
|
||||
}
|
||||
|
||||
configs[action["config"]] = {
|
||||
"name" : action["name"] if action["name"] != "" else f"unnamed{action['config']}",
|
||||
"proxy": action["proxy"],
|
||||
"discord": action["discord"],
|
||||
"time":"",
|
||||
"enabled":"False",
|
||||
"accounts": comptes
|
||||
if action["data"] == "delete":
|
||||
print(action["config"])
|
||||
configs.pop(action["config"])
|
||||
else :
|
||||
comptes = {
|
||||
"1":{"mail": action["mail1"], "pwd": action["pwd1"], "2fa": action["2fa1"]},
|
||||
"2":{"mail": action["mail2"], "pwd": action["pwd2"], "2fa": action["2fa2"]},
|
||||
"3":{"mail": action["mail3"], "pwd": action["pwd3"], "2fa": action["2fa3"]},
|
||||
"4":{"mail": action["mail4"], "pwd": action["pwd4"], "2fa": action["2fa4"]},
|
||||
"5":{"mail": action["mail5"], "pwd": action["pwd5"], "2fa": action["2fa5"]}
|
||||
}
|
||||
|
||||
configs[action["config"]] = {
|
||||
"name" : action["name"] if action["name"] != "" else f"unnamed{action['config']}",
|
||||
"proxy": action["proxy"],
|
||||
"discord": action["discord"],
|
||||
"time":"",
|
||||
"enabled":"False",
|
||||
"accounts": comptes
|
||||
}
|
||||
with open("/app/MsRewards-Reborn/user_data/configs.json", "w") as outFile:
|
||||
json.dump(configs, outFile)
|
||||
return(render_template("config.html", data=configs, discords=discords, proxys=proxys, configs=configs, len=maxi(configs)))
|
||||
|
@ -128,7 +128,7 @@
|
||||
<input type="submit" class="confirm" name="data" id="submit" value="Create !" class="button"/>
|
||||
</td>
|
||||
<td class="left-button">
|
||||
<input type="submit" name="config" id="submit" value="delete" class="ban"/>
|
||||
<input type="submit" name="data" id="submit" value="delete" class="ban"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user