diff --git a/V4.py b/V4.py index 0fed2a5..a7c1267 100755 --- a/V4.py +++ b/V4.py @@ -82,12 +82,12 @@ LogPath = config["PATH"]["logpath"] """ discord configuration """ + SuccessLink = config["DISCORD"]["successlink"] ErrorLink = config["DISCORD"]["errorlink"] discord_enabled = config["DISCORD"]["enabled"] webhookFailure = Webhook.from_url(ErrorLink, adapter=RequestsWebhookAdapter()) - if discord_enabled: webhookSuccess = Webhook.from_url(SuccessLink, adapter=RequestsWebhookAdapter()) @@ -121,6 +121,13 @@ def Timer(text="undefined"): return(f"[{timedelta(seconds = round(float(time() - start_time)))}] : " + str(text)) +def check_ipv4(): + driver.get("https://api64.ipify.org") + if len(driver.page_source.split('.')) == 4 : + return True + return False + + def setup_proxy(ip, port) : PROXY = f"{ip}:{port}" webdriver.DesiredCapabilities.FIREFOX['proxy'] = { @@ -1002,8 +1009,8 @@ def close(): def dev(): - printf("rien en cours de dev") - + print(check_ipv4()) + def CustomStart(Credentials): if not IsLinux :