diff --git a/templates/evidence.html b/templates/evidence.html index 54e429f..6d7a7e3 100644 --- a/templates/evidence.html +++ b/templates/evidence.html @@ -31,7 +31,7 @@

Device information

What type of device is this?
{% for a in ["Android", "iOS"] %} -


{% endif %} + +
+ + + + {% if spyware %} +

Spyware Apps

+ {% for app in spyware %} +
+

{{app["title"]}}

+ Did you know this app was installed on your device? +
+ {% for a in ["Yes", "No"] %} + + {% endfor %} +
+

+ Did you install this app? +
+ {% for a in ["Yes", "No"] %} + + {% endfor %} +
+

+ If you did not install this app, do you know who did? +
+
+
+ {% endfor %} + {% endif %} + {% if dual_use %}

Dual-Use Apps

{% for app in dual_use %}

{{app["title"]}}

- Did you know this app was installed on your device?
{% for a in ["Yes", "No"] %} - @@ -93,21 +131,24 @@

{{app["title"]}}

Did you install this app?
{% for a in ["Yes", "No"] %} - {% endfor %}


- If you did not install this app, do you know who did? + If you did not install this app, do you know who did?
-
{% endfor %} + + + {% endif %} +

diff --git a/templates/main.html b/templates/main.html index ed1d13c..332638f 100644 --- a/templates/main.html +++ b/templates/main.html @@ -101,6 +101,9 @@ {% if task == 'evidence' %} {% include "evidence.html" %} {% endif %} + {% if task == 'evidencesummary' %} + {% include "summary.html" %} + {% endif %} {% if task == 'app' %} {% include "app.html" %} {% endif %} diff --git a/templates/summary.html b/templates/summary.html new file mode 100644 index 0000000..7902357 --- /dev/null +++ b/templates/summary.html @@ -0,0 +1,35 @@ + + +
+
+

Evidence Summary

+
+

Dual-Use apps

+
+ Snapchat (hardcoded) + {% for app in app_summaries %} +
Recognized: {{app["recognized"]}}
+
Installed: {{app["installed"]}}
+
Who installed: {{app["installer"]}}
+ {% endfor %} +
+
+
\ No newline at end of file diff --git a/web/view/__init__.py b/web/view/__init__.py index 9e2f252..9a1a990 100644 --- a/web/view/__init__.py +++ b/web/view/__init__.py @@ -8,4 +8,4 @@ from .error import get_nothing from .results import view_results from .save import record_applist, record_scanres, delete_app -from .evidence import evidence, evidence_apps +from .evidence import evidence, evidence_summary diff --git a/web/view/evidence.py b/web/view/evidence.py index d80a3be..4186887 100644 --- a/web/view/evidence.py +++ b/web/view/evidence.py @@ -57,18 +57,28 @@ def evidence(): return render_template('main.html', **context) - +@app.route("/evidence/summary", methods=['POST']) +def evidence_summary(): -@app.route("/evidence/apps", methods=['GET', 'POST']) -def evidence_apps(): - """ - TODO: Get list of apps which ISDi flags as dual-use or spyware - """ - - # TODO get input from the user - device = 'ios' - device_owner = 'test' + snapchat = dict( + recognize = request.form["recognizesnapchat"], + installed = request.form["installedsnapchat"], + installer = request.form["installersnapchat"], + ) + + app_summaries = [snapchat] + + context = dict( + task="evidencesummary", + device_primary_user=config.DEVICE_PRIMARY_USER, + title=config.TITLE, + name="Sophie", + dual_use=request.form["dual_use"], + spyware=request.form["spyware"], + app_summaries = app_summaries + ) + + pprint(context["dual_use"]) - app_list = get_suspicious_apps(device, device_owner) - return "Hi" \ No newline at end of file + return render_template('main.html', **context) \ No newline at end of file