|
|
|
@ -197,30 +197,29 @@ from toxygen_wrapper.tests.support_onions import (
|
|
|
|
|
bAreWeConnected, icheck_torrc, lIntroductionPoints,
|
|
|
|
|
yKNOWN_NODNS, zResolveDomain)
|
|
|
|
|
|
|
|
|
|
from trustor_poc import TrustorError, idns_validate
|
|
|
|
|
try:
|
|
|
|
|
import xxxhttpx
|
|
|
|
|
from exclude_badExits.trustor_poc import TrustorError, idns_validate
|
|
|
|
|
if False:
|
|
|
|
|
import httpx
|
|
|
|
|
import asyncio
|
|
|
|
|
from trustor_poc import oDownloadUrlHttpx
|
|
|
|
|
except:
|
|
|
|
|
from exclude_badExits.trustor_poc import oDownloadUrlHttpx
|
|
|
|
|
else:
|
|
|
|
|
httpx = None
|
|
|
|
|
from trustor_poc import oDownloadUrlUrllib3Socks as oDownloadUrl
|
|
|
|
|
from exclude_badExits.trustor_poc import oDownloadUrlUrllib3Socks as oDownloadUrl
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
from torcontactinfo import TorContactInfoParser
|
|
|
|
|
oPARSER = TorContactInfoParser()
|
|
|
|
|
except ImportError:
|
|
|
|
|
oPARSER = None
|
|
|
|
|
from exclude_badExits.torcontactinfo import TorContactInfoParser
|
|
|
|
|
|
|
|
|
|
from exclude_utils import (aCleanContact, sCleanEmail, aParseContact,
|
|
|
|
|
oStemController, oMainArgparser,
|
|
|
|
|
vwrite_goodnodes, vwrite_badnodes, vwrite_good_contacts,
|
|
|
|
|
vwritefinale, vsetup_logging)
|
|
|
|
|
from exclude_badExits.exclude_utils import (
|
|
|
|
|
aCleanContact, sCleanEmail, aParseContact,
|
|
|
|
|
oStemController, oMainArgparser,
|
|
|
|
|
vwrite_goodnodes, vwrite_badnodes, vwrite_good_contacts,
|
|
|
|
|
vwritefinale, vsetup_logging )
|
|
|
|
|
|
|
|
|
|
warnings.filterwarnings('ignore')
|
|
|
|
|
global LOG
|
|
|
|
|
LOG = logging.getLogger()
|
|
|
|
|
|
|
|
|
|
oPARSER = TorContactInfoParser()
|
|
|
|
|
|
|
|
|
|
aGOOD_CONTACTS_DB = {}
|
|
|
|
|
aGOOD_CONTACTS_FPS = {}
|
|
|
|
|
aBAD_CONTACTS_DB = {}
|
|
|
|
@ -555,10 +554,10 @@ def aContactFps(oargs, a, fp, o, domain):
|
|
|
|
|
if oargs.wellknown_output:
|
|
|
|
|
sdir = os.path.join(oargs.wellknown_output, domain,
|
|
|
|
|
'.well-known', 'tor-relay')
|
|
|
|
|
sfile = os.path.join(sdir, "rsa-fingerprint.txt")
|
|
|
|
|
try:
|
|
|
|
|
if not os.path.isdir(sdir):
|
|
|
|
|
os.makedirs(sdir)
|
|
|
|
|
sfile = os.path.join(sdir, "rsa-fingerprint.txt")
|
|
|
|
|
with open(sfile, 'wt') as oFd:
|
|
|
|
|
oFd.write(data)
|
|
|
|
|
except Exception as e:
|
|
|
|
@ -665,6 +664,7 @@ def bProcessContact(b, texclude_set, aBadContacts, iFakeContact=0):
|
|
|
|
|
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
lNOT_IN_RELAYS_DB = []
|
|
|
|
|
def bCheckFp(relay, sofar, lConds, texclude_set):
|
|
|
|
|
global aGOOD_CONTACTS_DB
|
|
|
|
|
global aGOOD_CONTACTS_FPS
|
|
|
|
@ -853,7 +853,6 @@ def iMain(lArgs):
|
|
|
|
|
iFakeContact = 0
|
|
|
|
|
iTotalContacts = 0
|
|
|
|
|
aBadContacts = {}
|
|
|
|
|
lNOT_IN_RELAYS_DB = []
|
|
|
|
|
iR = 0
|
|
|
|
|
relays = controller.get_server_descriptors()
|
|
|
|
|
lqueue = []
|