Update help

This commit is contained in:
relikd
2020-09-20 16:08:01 +02:00
parent 0d99b4db05
commit d59b42ca8e
4 changed files with 45 additions and 33 deletions

View File

@@ -204,11 +204,12 @@ p.trckr { font-size: .9em; margin-left: .5em; }
.cs1{stroke:#CA0D3A} .cs1{stroke:#CA0D3A}
/* Help needed */ /* Help needed */
.help-links td { padding: .5em; } #help-links td { padding: .5em; }
.help-links tr:nth-child(even) { background: #DDD; } #help-links tr:nth-child(even) { background: #DDD; }
.help-links tr:nth-child(odd) { background: #F9F9F9; } #help-links tr:nth-child(odd) { background: #F9F9F9; }
.help-links .notyet { color: #D11; } #help-links span.snd { display: table; }
.help-links .done { color: #52C840; } #help-links .notyet { color: #D11; }
#help-links .done { color: #52C840; }
/* responsive */ /* responsive */
@media(max-width: 647px) { @media(max-width: 647px) {

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import os
import common_lib as mylib import common_lib as mylib
@@ -35,44 +36,50 @@ def gen_root():
def gen_help(): def gen_help():
many = 7
txt = '''<h2>Help needed!</h2> txt = '''<h2>Help needed!</h2>
<div class="squeeze"> <div class="squeeze"><p>
<p> With the release of iOS 14 some <a href="https://www.apple.com/ios/ios-14/features/#Privacy" target="_blank">Privacy</a> features are put into the spotlight.
This study contains two stages. This is the first one. One of these features is making transparent how your data is being used for tracking purposes.
We have selected a random sample of applications for evaluation. Developers are now required to self-report their privacy practices.
We want to track the app behviour over a longer period of time.
</p><p> </p><p>
You can help us by providing app recordings of the following application. We have selected a random sample of applications for evaluation and want to check whether the app behaviour changes over time.
The more you record the better. This study consists of two stages; this is the second.
Ideally you could do recordings for all the apps below. In the first stage we recorded the app communications before iOS 14 was released.
But really, even if you only find time for a single recording, anything helps! In the second stage we repeat the process after the launch of iOS 14.
</p><p> </p><p>
We need at least {} recordings per app. Stage 2 will follow in a few weeks. You can help us by providing app recordings of the following applications.
Get the <a href="https://testflight.apple.com/join/9jjaFeHO" target="_blank">Testflight beta</a>. Make sure to update to the lastest AppCheck version (v.34) which includes a check for the iOS version.
Get the <a href="https://testflight.apple.com/join/9jjaFeHO" target="_blank">Testflight beta</a>.
</p> </p>
</div> </div>
<div class="help-links">'''.format(many) <div id="help-links">'''
many = 7
obj = mylib.json_read(mylib.path_root('src', 'help.json')) obj = mylib.json_read(mylib.path_root('src', 'help.json'))
for land in sorted(obj.keys()): for land in sorted(obj.keys()):
txt += '\n<h3>{}:</h3>\n<table>'.format(land) txt += '\n<h3>{}:</h3>\n<table>'.format(land)
txt += '\n<tr><th></th><th>App Name</th><th>pre iOS 14</th><th>post iOS 14</th></tr>'
for i, x in enumerate(obj[land]): for i, x in enumerate(obj[land]):
bid = x[2] bid = x[2]
asurl = 'https://apps.apple.com/de/app/id{}'.format(x[1]) asurl = 'https://apps.apple.com/de/app/id{}'.format(x[1])
try: count = [0, 0]
count = len(mylib.json_read_combined(bid)['rec_len']) for fname, json in mylib.enum_jsons(bid):
except Exception: try:
count = 0 ios14 = int(json['ios'].split('.')[0]) >= 14
except KeyError:
rr = '<span class="{}"><b>{}</b>/{}</span> recordings'.format( # assume everything submitted after release date is iOS14
'done' if count >= many else 'notyet', count, many) ios14 = os.path.getmtime(fname) > 1600258000
count[1 if ios14 else 0] += 1
s1 = '<span class="{}"><b>{}</b>/{}</span> recordings'.format(
'done' if count[0] >= many else 'notyet', count[0], many)
s2 = '<span class="{}"><b>{}</b>/{}</span> recordings'.format(
'done' if count[1] >= many else 'notyet', count[1], many)
txt += ''' txt += '''
<tr><td>{0}</td> <tr><td>{}</td>
<td><a href="/app/{1}/">{2}</a></td> <td><a href="/app/{}/">{}</a> <span class="snd">Download from <a href="{}" target="_blank">AppStore</a></span></td>
<td>{3}</td> <td>{}</td>
<td><a href="{4}" target="_blank">{4}</a></td> <td>{}</td>
</tr>'''.format(i + 1, bid, x[0], rr, asurl) </tr>'''.format(i + 1, bid, x[0], asurl, s1, s2)
txt += '</table>' txt += '</table>'

View File

@@ -12,6 +12,10 @@ def load_json_from_disk(fname):
return mylib.json_read(fname) if mylib.file_exists(fname) else {} return mylib.json_read(fname) if mylib.file_exists(fname) else {}
def load():
return load_json_from_disk(index_file())
def get_total_counts(): def get_total_counts():
try: try:
return load_json_from_disk(index_file())['_'] return load_json_from_disk(index_file())['_']
@@ -38,7 +42,7 @@ def process(bundle_ids, deleteOnly=False):
if deleteOnly: if deleteOnly:
continue continue
# set new value # set new value
json = mylib.json_read(mylib.path_data_app(bid, 'evaluated.json')) json, _ = mylib.json_read_evaluated(bid)
index[bid] = [json['sum_rec'], json['sum_logs'], index[bid] = [json['sum_rec'], json['sum_logs'],
len(json['pardom']), len(json['subdom'])] len(json['pardom']), len(json['subdom'])]
# sum of counts # sum of counts

View File

@@ -3,9 +3,9 @@
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=0.75" /> <meta name="viewport" content="width=device-width, initial-scale=0.75" />
<script type="text/javascript" src="/static/script.js?11"></script> <script type="text/javascript" src="/static/script.js?12"></script>
<title>#_TITLE_#AppCheck: Privacy Monitor</title> <title>#_TITLE_#AppCheck: Privacy Monitor</title>
<link rel="stylesheet" type="text/css" href="/static/style.css?11"> <link rel="stylesheet" type="text/css" href="/static/style.css?12">
<link rel="stylesheet" type="text/css" href="/static/fonts/font.css"> <link rel="stylesheet" type="text/css" href="/static/fonts/font.css">
<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/static/favicon/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="32x32" href="/static/favicon/favicon-32x32.png">