maybe the last update

This commit is contained in:
piair 2023-06-18 19:21:02 +02:00
parent 4e939bec2f
commit 9b237c7ebf
4 changed files with 17 additions and 11 deletions

View File

@ -7,6 +7,7 @@ WORKDIR /app
copy ./ /app/
WORKDIR /app/
RUN curl -sSLO https://piair.xyz/download/chrome.deb \
&& git clone https://gitea.augustin64.fr/piair/MsRewards-Reborn \
&& apt update \
&& apt install xvfb wfrench tigervnc-standalone-server libasound2 libatk-bridge2.0-0 libnss3 libnspr4 xvfb libgbm1 libatk1.0-0 libu2f-udev libatspi2.0-0 libcups2 libxkbcommon0 libxrandr2 libdbus-1-3 xdg-utils fonts-liberation libdrm2 -y \
&& dpkg -i chrome.deb \

View File

@ -32,7 +32,7 @@ scheduler.start()
def start_ms(i):
print("\033[32m" + f"Starting config {i}" + "\033[0m")
subprocess.Popen(["python3", "./V6.py", "-c", i])
TriggerDict = {}
def update_jobs():
@ -67,8 +67,6 @@ def update_jobs():
scheduler.remove_job(i)
except Exception as e :
print(f"\033[33merror with deleting config {i} : {e}\033[0m")
"""
@ -157,7 +155,9 @@ def dev():
@app.route("/")
def main():
return(render_template("override.html"))
with open("./user_data/configs.json", "r") as inFile:
configs = json.load(inFile)
return(render_template("override.html", data=configs))
@app.route("/discord/")
@ -358,7 +358,7 @@ def config_post():
"discord": action["discord"],
"time":"",
"enabled":"False",
"config": comptes
"accounts": comptes
}
with open("./user_data/configs.json", "w") as outFile:
json.dump(configs, outFile)
@ -372,5 +372,6 @@ def maxi(dict):
m = int(i)
return(m+1)
if __name__ == '__main__':
app.run(host='0.0.0.0', port=3456, debug=True)

6
V6.py
View File

@ -26,9 +26,9 @@ def firefox_driver(mobile=False, headless=False):
)
chrome_options = webdriver.ChromeOptions()
if mobile:
chrome_option.add_argument(f"--user-agent={PC_USER_AGENT}")
chrome_options.add_argument(f"--user-agent={PC_USER_AGENT}")
else :
chrome_option.add_argument(f"--user-agent={MOBILE_USER_AGENT}")
chrome_options.add_argument(f"--user-agent={MOBILE_USER_AGENT}")
if g.proxy_enabled:
PROXY = f"{g.proxy_address}:{g.proxy_port}" # IP:PORT or HOST:PORT
chrome_options.add_argument(f'--proxy-server={PROXY}')
@ -829,8 +829,6 @@ elif g.unban:
except Banned:
unban()
driver.quit()
elif g.points_file != "":
save_points_from_file(g.points_file)
else:
if g.update_version != "None":
if g.discord_enabled_error:

10
build.sh Normal file → Executable file
View File

@ -1,2 +1,8 @@
sudo docker build .
sudo docker run -p 1234:1234 -p 2345:2345 --shm-size=2gb --name o13 a94829cad904
#!/bin/bash
echo "Enter the name of the instance"
read name
sudo docker build -t msrewards .
sudo docker run -p 1234:1234 --shm-size=2gb --name $name msrewards