From 47c7e37723b416605f232cd85818f41d865a9f85 Mon Sep 17 00:00:00 2001
From: Aldo Cortesi
Date: Fri, 24 Jan 2014 10:46:34 +1300
Subject: Serve correct certs from app. Enable Windows and Android icons.
---
libmproxy/app.py | 12 ++++++------
libmproxy/templates/index.html | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
(limited to 'libmproxy')
diff --git a/libmproxy/app.py b/libmproxy/app.py
index 5da7d6b2..b0692cf2 100644
--- a/libmproxy/app.py
+++ b/libmproxy/app.py
@@ -1,4 +1,5 @@
import flask
+import os.path
mapp = flask.Flask(__name__)
mapp.debug = True
@@ -13,15 +14,14 @@ def index():
@mapp.route("/cert/pem")
def certs_pem():
- p = master().server.config.cacert
+ capath = master().server.config.cacert
+ p = os.path.splitext(capath)[0] + "-cert.pem"
return flask.Response(open(p).read(), mimetype='application/x-x509-ca-cert')
@mapp.route("/cert/p12")
def certs_p12():
- return flask.render_template("certs.html", section="certs")
+ capath = master().server.config.cacert
+ p = os.path.splitext(capath)[0] + "-cert.p12"
+ return flask.Response(open(p).read(), mimetype='application/x-pkcs12')
-
-@mapp.route("/cert/cer")
-def certs_cer():
- return flask.render_template("certs.html", section="certs")
diff --git a/libmproxy/templates/index.html b/libmproxy/templates/index.html
index cfa81dc2..d46d9854 100644
--- a/libmproxy/templates/index.html
+++ b/libmproxy/templates/index.html
@@ -8,9 +8,9 @@
-
+
-
+
--
cgit v1.2.3
From 2df321e71bb4f7bd240d889b05467e5ce13012f6 Mon Sep 17 00:00:00 2001
From: Aldo Cortesi
Date: Mon, 27 Jan 2014 14:37:29 +1300
Subject: Use the mitm.it domain for the app, turn it on by default.
---
libmproxy/cmdline.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'libmproxy')
diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py
index e221a872..8e7ab4a1 100644
--- a/libmproxy/cmdline.py
+++ b/libmproxy/cmdline.py
@@ -2,7 +2,7 @@ import proxy
import re, filt
import argparse
-APP_HOST = "mitm"
+APP_HOST = "mitm.it"
APP_PORT = 80
class ParseException(Exception): pass
@@ -263,8 +263,8 @@ def common_options(parser):
group = parser.add_argument_group("Web App")
group.add_argument(
"-a",
- action="store_true", dest="app", default=False,
- help="Enable the mitmproxy web app."
+ action="store_false", dest="app", default=True,
+ help="Disable the mitmproxy web app."
)
group.add_argument(
"--app-host",
--
cgit v1.2.3
From ae87affcbe9f2753d68e4e9826eedec102d633d2 Mon Sep 17 00:00:00 2001
From: Aldo Cortesi
Date: Tue, 28 Jan 2014 09:44:33 +1300
Subject: Nicer layout for cert install options.
---
libmproxy/static/mitmproxy.css | 5 +++++
libmproxy/templates/index.html | 31 +++++++++++++++++++------------
2 files changed, 24 insertions(+), 12 deletions(-)
(limited to 'libmproxy')
diff --git a/libmproxy/static/mitmproxy.css b/libmproxy/static/mitmproxy.css
index 09bcb5f7..b390976a 100644
--- a/libmproxy/static/mitmproxy.css
+++ b/libmproxy/static/mitmproxy.css
@@ -1,4 +1,9 @@
+#certbank div {
+ text-align: center;
+
+
+}
.fronttable {
}
diff --git a/libmproxy/templates/index.html b/libmproxy/templates/index.html
index d46d9854..50cfd5db 100644
--- a/libmproxy/templates/index.html
+++ b/libmproxy/templates/index.html
@@ -1,19 +1,26 @@
{% extends "frame.html" %}
{% block body %}
-