diff --git a/out/static/style.css b/out/static/style.css index 5b1e845..2d6621d 100644 --- a/out/static/style.css +++ b/out/static/style.css @@ -230,11 +230,8 @@ p.trckr { font-size: 0.9em; margin-left: 0.5em; } width: 40%; margin-left: 1%; } - #dom-top10 { - margin: 0 auto; - width: max-content; - max-width: 100%; - text-align: right; - } + #dom-top10 { text-align: right; } + #dom-top10 p { margin: 0.4em; } + .div-center { margin: 0 auto; width: max-content; max-width: 100%; } .loadbar { display: inline-block; } } diff --git a/src/README.md b/src/README.md index d589c6b..ba3f7ff 100644 --- a/src/README.md +++ b/src/README.md @@ -42,13 +42,13 @@ Given A → B, B depends on A digraph G { "." -> html_root "." -> bundle_download - bundle_download -> index_bundle_names - index_bundle_names -> html_bundle - index_bundle_names -> html_index - index_bundle_names -> html_reverse_domains + bundle_download -> index_app_names + index_app_names -> html_bundle + index_app_names -> html_index_apps + index_app_names -> html_index_domains "." -> bundle_combine - bundle_combine -> index_reverse_domains - index_reverse_domains -> html_reverse_domains + bundle_combine -> index_domains + index_domains -> html_index_domains bundle_combine -> html_bundle "." -> tracker_download } diff --git a/src/html_bundle.py b/src/html_bundle.py index 00a49a5..d7e8696 100755 --- a/src/html_bundle.py +++ b/src/html_bundle.py @@ -4,7 +4,7 @@ import sys import time import math import common_lib as mylib -import index_bundle_names +import index_app_names def seconds_to_time(seconds): @@ -81,7 +81,7 @@ def gen_dom_tags(sorted_arr, isSub, onlyTrackers=False): def gen_html(bundle_id, obj): - name = index_bundle_names.get_name(bundle_id) + name = index_app_names.get_name(bundle_id) obj['tracker'] = list(filter(lambda x: x[2], obj['subdom'])) return mylib.template_with_base(f'''
{dom_str} {pct_bar}
' fp.write(mylib.template_with_base(txt + ''' +Get full list sorted by Occurrence frequency or in Alphabetical order.
@@ -96,7 +98,7 @@ def gen_html_trinity(json, idx_dir, app_count, title): def gen_html_lookup(html_dir, json, key, title): mylib.mkdir(html_dir) - names = [[x, index_bundle_names.get_name(x)] for x in json['bundle']] + names = [[x, index_app_names.get_name(x)] for x in json['bundle']] mylib.json_write(mylib.path_add(html_dir, 'apps.json'), names) mylib.json_write(mylib.path_add(html_dir, 'doms.json'), json[key]) with open(mylib.path_add(html_dir, 'index.html'), 'w') as fp: @@ -112,37 +114,58 @@ def gen_html_lookup(html_dir, json, key, title): ''', title=title)) +def gen_html_stats(c_apps, c_domains): + title = 'Statistics' + mylib.mkdir(mylib.path_out('stats')) + with open(mylib.path_out('stats', 'index.html'), 'w') as fp: + fp.write(mylib.template_with_base(''' ++ The AppCheck database currently contains {} apps with a total of {} unique domains. +
+