From b7f7ffb3f03d954285759d734794256ede262c60 Mon Sep 17 00:00:00 2001 From: greko17 Date: Fri, 29 Nov 2019 14:43:15 +0100 Subject: [PATCH] fix: resolverdns modificata la posizione della chiamata, ora in launcher riattivato il checkdns --- core/httptools.py | 7 +------ platformcode/launcher.py | 7 ++++--- specials/resolverdns.py | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/core/httptools.py b/core/httptools.py index d190507d..d733ae31 100644 --- a/core/httptools.py +++ b/core/httptools.py @@ -384,9 +384,6 @@ def proxy_post_processing(url, proxy_data, response, opt): def downloadpage(url, **opt): logger.info() - - - """ Open a url and return the data obtained @@ -428,9 +425,7 @@ def downloadpage(url, **opt): """ load_cookies() - #import requests - ### Raggiunge i siti con i DNS dopati... ### - from specials import resolverdns + import requests from lib import cloudscraper # Headers by default, if nothing is specified diff --git a/platformcode/launcher.py b/platformcode/launcher.py index 1efa5ccb..8fdb2890 100644 --- a/platformcode/launcher.py +++ b/platformcode/launcher.py @@ -7,6 +7,7 @@ import os import sys import updater +from specials import resolverdns import urllib2 from core import channeltools @@ -34,9 +35,9 @@ def start(): # se lo ha: non lo fa entrare nell'addon # se ha problemi di DNS avvia ma lascia entrare # se tutto ok: entra nell'addon -## from specials.checkhost import test_conn -## import threading -## threading.Thread(target=test_conn, args=(True, True, True, [], [], True)).start() + from specials.checkhost import test_conn + import threading + threading.Thread(target=test_conn, args=(True, True, True, [], [], True)).start() # check_adsl = test_conn(is_exit = True, check_dns = True, view_msg = True, # lst_urls = [], lst_site_check_dns = [], in_addon = True) diff --git a/specials/resolverdns.py b/specials/resolverdns.py index e7c904cf..5c7477ee 100644 --- a/specials/resolverdns.py +++ b/specials/resolverdns.py @@ -23,7 +23,7 @@ import dns.name import socket import requests -res = dns.resolver.Resolver(configure=False) +res = dns.resolver.Resolver(configure=True) res.nameservers = ['1.1.1.1', '2606:4700:4700::1111', '1.0.0.1', '2606:4700:4700::1001' ]