Fix multiple tracking domains binary tree lookup
This commit is contained in:
@@ -135,7 +135,11 @@ def combine_all(changes=['_']):
|
||||
continue # added by exodus, not a tracker per se
|
||||
res.add(dom[::-1]) # reverse for bintree lookup
|
||||
with open(final, 'w') as fp:
|
||||
prev_dom = ''
|
||||
for domain in sorted(res):
|
||||
if domain.startswith(prev_dom + '.'):
|
||||
continue # parent is tracker already
|
||||
prev_dom = domain
|
||||
fp.write(domain + '\n')
|
||||
|
||||
|
||||
|
||||
@@ -65,8 +65,8 @@ def gen_html_top_10(path, subset, total, title):
|
||||
|
||||
|
||||
def gen_html_trinity(idx_dir, app_count, json, title, symlink):
|
||||
list1 = [(dom, len(ids) - 1) for dom, ids in json['subdom'].items()]
|
||||
list2 = [(dom, len(ids) - 1) for dom, ids in json['pardom'].items()]
|
||||
list1 = [(dom, len(ids)) for dom, ids in json['subdom'].items()]
|
||||
list2 = [(dom, len(ids)) for dom, ids in json['pardom'].items()]
|
||||
|
||||
def write_index(fname, title, button):
|
||||
HTML.write(idx_dir, '<h2>{}</h2>{}{}'.format(
|
||||
@@ -132,6 +132,9 @@ def process():
|
||||
title='Subdomain Lookup')
|
||||
|
||||
print(' All Domains')
|
||||
for key in ['subdom', 'pardom']:
|
||||
for x in json[key].keys():
|
||||
json[key][x] = json[key][x][1:]
|
||||
gen_html_trinity(mylib.path_out('index', 'domains', 'all'), app_count,
|
||||
json=json, title='Requested Domains',
|
||||
symlink=index_domains.fname_all())
|
||||
|
||||
Reference in New Issue
Block a user