il commence a y avoir beaucoup de modifs
This commit is contained in:
parent
90a87d19c7
commit
8ec5aa52ba
|
@ -9,7 +9,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="20%" height="90%"><iframe id="iframe" src="{{url_for('static', filename='logs/dev.txt')}}" width="100%" height="100%"></iframe></td>
|
<td width="20%" height="90%"><iframe id="iframe" src="{{url_for('static', filename='logs/custom.txt')}}" width="100%" height="100%"></iframe></td>
|
||||||
<td width="80%"><iframe src="/novnc/vnc.html?resize=scale&path=novnc/websockify&view_only" width="100%" height="100%" frameborder="0"></iframe></td>
|
<td width="80%"><iframe src="/novnc/vnc.html?resize=scale&path=novnc/websockify&view_only" width="100%" height="100%" frameborder="0"></iframe></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
105
V6.py
105
V6.py
|
@ -867,57 +867,62 @@ def very_custom_start(json):
|
||||||
|
|
||||||
driver.close()
|
driver.close()
|
||||||
display.stop()
|
display.stop()
|
||||||
if g.vnc_enabled or g.dev:
|
|
||||||
display = SmartDisplay(backend="xvnc", size=(1920, 1080), rfbport=g.vnc_port, color_depth=24)
|
if g.very_custom :
|
||||||
|
very_custom_start(dict(g.very_custom))
|
||||||
|
|
||||||
else :
|
else :
|
||||||
display = SmartDisplay(size=(1920, 1080))
|
if g.vnc_enabled or g.dev:
|
||||||
display.start()
|
display = SmartDisplay(backend="xvnc", size=(1920, 1080), rfbport=g.vnc_port, color_depth=24)
|
||||||
|
else :
|
||||||
|
display = SmartDisplay(size=(1920, 1080))
|
||||||
|
display.start()
|
||||||
|
|
||||||
#webhookFailure.send(f"Starting on this config", username="Check de lancement", avatar_url="https://cdn-icons-png.flaticon.com/512/1688/1688988.png")
|
#webhookFailure.send(f"Starting on this config", username="Check de lancement", avatar_url="https://cdn-icons-png.flaticon.com/512/1688/1688988.png")
|
||||||
|
|
||||||
if g.dev :
|
if g.dev :
|
||||||
driver = firefox_driver()
|
driver = firefox_driver()
|
||||||
#input("kill ?")
|
#input("kill ?")
|
||||||
driver.quit()
|
driver.quit()
|
||||||
elif g.custom_start:
|
elif g.custom_start:
|
||||||
CustomStart()
|
CustomStart()
|
||||||
elif g.unban:
|
elif g.unban:
|
||||||
g._mail, g._password = select_accounts(False)[0]
|
g._mail, g._password = select_accounts(False)[0]
|
||||||
driver = firefox_driver()
|
driver = firefox_driver()
|
||||||
try :
|
try :
|
||||||
login(driver)
|
login(driver)
|
||||||
except Banned:
|
except Banned:
|
||||||
unban()
|
unban()
|
||||||
driver.quit()
|
driver.quit()
|
||||||
else:
|
else:
|
||||||
if g.update_version != "None":
|
if g.update_version != "None":
|
||||||
if g.discord_enabled_error:
|
if g.discord_enabled_error:
|
||||||
webhookFailure.send(f"Updated to {g.update_version}", username="UPDATE", avatar_url="https://cdn-icons-png.flaticon.com/512/1688/1688988.png")
|
webhookFailure.send(f"Updated to {g.update_version}", username="UPDATE", avatar_url="https://cdn-icons-png.flaticon.com/512/1688/1688988.png")
|
||||||
for cred in g._cred:
|
for cred in g._cred:
|
||||||
if cred[0] != "":
|
if cred[0] != "":
|
||||||
g._mail = cred[0]
|
g._mail = cred[0]
|
||||||
g._password = cred[1]
|
g._password = cred[1]
|
||||||
if cred[2] != '':
|
if cred[2] != '':
|
||||||
g._otp = TOTP(cred[2])
|
g._otp = TOTP(cred[2])
|
||||||
custom_sleep(1)
|
custom_sleep(1)
|
||||||
printf("Début du driver.")
|
printf("Début du driver.")
|
||||||
driver = firefox_driver()
|
driver = firefox_driver()
|
||||||
printf("Driver demarré.")
|
printf("Driver demarré.")
|
||||||
driver.implicitly_wait(3)
|
driver.implicitly_wait(3)
|
||||||
try:
|
try:
|
||||||
daily_routine()
|
daily_routine()
|
||||||
driver.quit()
|
driver.quit()
|
||||||
attente = uniform(1200, 3600)
|
attente = uniform(1200, 3600)
|
||||||
printf(f"finis. attente de {round(attente/60)}min")
|
printf(f"finis. attente de {round(attente/60)}min")
|
||||||
custom_sleep(attente)
|
custom_sleep(attente)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
printf("Canceled. Closing driver and display.")
|
printf("Canceled. Closing driver and display.")
|
||||||
driver.quit()
|
driver.quit()
|
||||||
display.stop()
|
display.stop()
|
||||||
break
|
break
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log_error(f"Error not catched. Skipping this account. " + format_error(e), driver)
|
log_error(f"Error not catched. Skipping this account. " + format_error(e), driver)
|
||||||
printf(f"Error not catched. Skipping this account. {e}")
|
printf(f"Error not catched. Skipping this account. {e}")
|
||||||
driver.quit()
|
driver.quit()
|
||||||
|
|
||||||
display.stop()
|
display.stop()
|
||||||
|
|
|
@ -55,8 +55,7 @@ parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--vnc",
|
"--vnc",
|
||||||
help="enable VNC",
|
help="enable VNC",
|
||||||
dest="vnc",
|
dest="vnc"
|
||||||
default="2345"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
@ -116,7 +115,7 @@ g.discord_enabled_success = discord[discord_conf]["successT"] == "True"
|
||||||
|
|
||||||
g.avatar_url = settings["avatarlink"]
|
g.avatar_url = settings["avatarlink"]
|
||||||
|
|
||||||
if not very_custom :
|
if not g.very_custom :
|
||||||
if g.discord_enabled_error:
|
if g.discord_enabled_error:
|
||||||
webhookFailure = Webhook.from_url(g.discord_error_link, adapter=RequestsWebhookAdapter())
|
webhookFailure = Webhook.from_url(g.discord_error_link, adapter=RequestsWebhookAdapter())
|
||||||
if g.discord_enabled_success:
|
if g.discord_enabled_success:
|
||||||
|
|
|
@ -36,3 +36,4 @@ dev = False
|
||||||
norvege = False
|
norvege = False
|
||||||
database_error_override = False
|
database_error_override = False
|
||||||
fast = False
|
fast = False
|
||||||
|
very_custom=""
|
Loading…
Reference in New Issue