From 4ca720b55680e40b3a4361141a2ad39f9de81111 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Wed, 17 Sep 2014 21:14:55 +0200 Subject: add features to the traffic table, introduce image spriting --- libmproxy/controller.py | 2 +- libmproxy/web/__init__.py | 9 +- libmproxy/web/flows.json | 2012 -------------------- libmproxy/web/static/css/app.css | 81 + libmproxy/web/static/flows.json | 2012 ++++++++++++++++++++ libmproxy/web/static/images/sprite.png | Bin 0 -> 10895 bytes libmproxy/web/static/js/app.js | 78 +- web/gulpfile.js | 30 +- web/package.json | 3 + web/src/css/app.less | 1 + web/src/css/flowtable.less | 29 + web/src/css/sprites.compiled.less | 58 + web/src/css/sprites.less | 38 + web/src/images/chrome-devtools/LICENSE | 30 + web/src/images/chrome-devtools/resourceCSSIcon.png | Bin 0 -> 1005 bytes .../chrome-devtools/resourceDocumentIcon.png | Bin 0 -> 951 bytes web/src/images/chrome-devtools/resourceJSIcon.png | Bin 0 -> 787 bytes .../images/chrome-devtools/resourcePlainIcon.png | Bin 0 -> 295 bytes web/src/images/resourceExecutableIcon.png | Bin 0 -> 853 bytes web/src/images/resourceFlashIcon.png | Bin 0 -> 921 bytes web/src/images/resourceImageIcon.png | Bin 0 -> 976 bytes web/src/images/resourceJavaIcon.png | Bin 0 -> 861 bytes web/src/images/resourceNotModifiedIcon.png | Bin 0 -> 1072 bytes web/src/images/resourceRedirectIcon.png | Bin 0 -> 1174 bytes web/src/js/components/flowtable.jsx | 63 +- web/src/js/stores/flowstore.js | 15 +- 26 files changed, 2408 insertions(+), 2053 deletions(-) delete mode 100644 libmproxy/web/flows.json create mode 100644 libmproxy/web/static/flows.json create mode 100644 libmproxy/web/static/images/sprite.png create mode 100644 web/src/css/sprites.compiled.less create mode 100644 web/src/css/sprites.less create mode 100644 web/src/images/chrome-devtools/LICENSE create mode 100644 web/src/images/chrome-devtools/resourceCSSIcon.png create mode 100644 web/src/images/chrome-devtools/resourceDocumentIcon.png create mode 100644 web/src/images/chrome-devtools/resourceJSIcon.png create mode 100644 web/src/images/chrome-devtools/resourcePlainIcon.png create mode 100644 web/src/images/resourceExecutableIcon.png create mode 100644 web/src/images/resourceFlashIcon.png create mode 100644 web/src/images/resourceImageIcon.png create mode 100644 web/src/images/resourceJavaIcon.png create mode 100644 web/src/images/resourceNotModifiedIcon.png create mode 100644 web/src/images/resourceRedirectIcon.png diff --git a/libmproxy/controller.py b/libmproxy/controller.py index b754ac36..39e7695f 100644 --- a/libmproxy/controller.py +++ b/libmproxy/controller.py @@ -77,7 +77,7 @@ class Slave(threading.Thread): self.server.serve_forever() -class Master: +class Master(object): """ Masters get and respond to messages from slaves. """ diff --git a/libmproxy/web/__init__.py b/libmproxy/web/__init__.py index c7e0d20d..69971436 100644 --- a/libmproxy/web/__init__.py +++ b/libmproxy/web/__init__.py @@ -1,8 +1,8 @@ +from __future__ import absolute_import, print_function import tornado.ioloop import tornado.httpserver -from .. import controller, utils, flow, script, proxy -import app -import pprint +from .. import controller, flow +from . import app class Stop(Exception): @@ -59,7 +59,7 @@ class WebMaster(flow.FlowMaster): def __init__(self, server, options): self.options = options self.app = app.Application(self.options.wdebug) - flow.FlowMaster.__init__(self, server, WebState()) + super(WebMaster, self).__init__(server, WebState()) self.last_log_id = 0 @@ -90,7 +90,6 @@ class WebMaster(flow.FlowMaster): return f def handle_response(self, f): - s = f.get_state(True) app.ClientConnection.broadcast("update_flow", f.get_state(True)) flow.FlowMaster.handle_response(self, f) if f: diff --git a/libmproxy/web/flows.json b/libmproxy/web/flows.json deleted file mode 100644 index bdbfd5cc..00000000 --- a/libmproxy/web/flows.json +++ /dev/null @@ -1,2012 +0,0 @@ -[{ - "request": { - "timestamp_end": 1410651311.107, - "timestamp_start": 1410651311.106, - "form_in": "relative", - "headers": [ - [ - "Host", - "news.ycombinator.com" - ], - [ - "User-Agent", - "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" - ], - [ - "Accept", - "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" - ], - [ - "Accept-Language", - "de,en-US;q=0.7,en;q=0.3" - ], - [ - "Accept-Encoding", - "gzip, deflate" - ], - [ - "Cookie", - "__cfduid=d0486ff404fe3beb320f15e958861aaea1410651010546" - ], - [ - "Connection", - "keep-alive" - ], - [ - "Pragma", - "no-cache" - ], - [ - "Cache-Control", - "no-cache" - ] - ], - "host": "news.ycombinator.com", - "form_out": "relative", - "path": "/", - "method": "GET", - "scheme": "https", - "port": 443, - "httpversion": [ - 1, - 1 - ] - }, - "server_conn": { - "timestamp_tcp_setup": 1410651311.055, - "state": [], - "timestamp_ssl_setup": 1410651311.096, - "sni": "news.ycombinator.com", - "timestamp_start": 1410651311.04, - "address": { - "use_ipv6": false, - "address": [ - "news.ycombinator.com", - 443 - ] - }, - "timestamp_end": null, - "source_address": { - "use_ipv6": false, - "address": [ - "192.168.1.117", - 63383 - ] - }, - "ssl_established": true - }, - "client_conn": { - "timestamp_start": 1410651310.36, - "address": { - "use_ipv6": false, - "address": [ - "127.0.0.1", - 63380 - ] - }, - "timestamp_ssl_setup": 1410651311.105, - "timestamp_end": null, - "clientcert": null, - "ssl_established": true - }, - "conntype": "http", - "version": [ - 0, - 11 - ], - "error": null, - "response": { - "code": 200, - "headers": [ - [ - "Server", - "cloudflare-nginx" - ], - [ - "Date", - "Sat, 13 Sep 2014 23:35:08 GMT" - ], - [ - "Content-Type", - "text/html; charset=utf-8" - ], - [ - "Transfer-Encoding", - "chunked" - ], - [ - "Connection", - "keep-alive" - ], - [ - "Vary", - "Accept-Encoding" - ], - [ - "Cache-Control", - "private" - ], - [ - "X-Frame-Options", - "DENY" - ], - [ - "Cache-Control", - "max-age=0" - ], - [ - "Strict-Transport-Security", - "max-age=31556900; includeSubDomains" - ], - [ - "CF-RAY", - "169828d0108e088d-FRA" - ], - [ - "Content-Encoding", - "gzip" - ] - ], - "timestamp_start": 1410651311.6, - "msg": "OK", - "timestamp_end": 1410651311.603, - "httpversion": [ - 1, - 1 - ] - } -}, -{ - "request": { - "timestamp_end": 1410651311.657, - "timestamp_start": 1410651311.653, - "form_in": "relative", - "headers": [ - [ - "Host", - "news.ycombinator.com" - ], - [ - "User-Agent", - "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" - ], - [ - "Accept", - "text/css,*/*;q=0.1" - ], - [ - "Accept-Language", - "de,en-US;q=0.7,en;q=0.3" - ], - [ - "Accept-Encoding", - "gzip, deflate" - ], - [ - "Referer", - "https://news.ycombinator.com/" - ], - [ - "Cookie", - "__cfduid=d0486ff404fe3beb320f15e958861aaea1410651010546" - ], - [ - "Connection", - "keep-alive" - ], - [ - "Pragma", - "no-cache" - ], - [ - "Cache-Control", - "no-cache" - ] - ], - "host": "news.ycombinator.com", - "form_out": "relative", - "path": "/news.css?IZYAdhDe5bN6BGyHv1jq", - "method": "GET", - "scheme": "https", - "port": 443, - "httpversion": [ - 1, - 1 - ] - }, - "server_conn": { - "timestamp_tcp_setup": 1410651311.055, - "state": [], - "timestamp_ssl_setup": 1410651311.096, - "sni": "news.ycombinator.com", - "timestamp_start": 1410651311.04, - "address": { - "use_ipv6": false, - "address": [ - "news.ycombinator.com", - 443 - ] - }, - "timestamp_end": null, - "source_address": { - "use_ipv6": false, - "address": [ - "192.168.1.117", - 63383 - ] - }, - "ssl_established": true - }, - "client_conn": { - "timestamp_start": 1410651310.36, - "address": { - "use_ipv6": false, - "address": [ - "127.0.0.1", - 63380 - ] - }, - "timestamp_ssl_setup": 1410651311.105, - "timestamp_end": null, - "clientcert": null, - "ssl_established": true - }, - "conntype": "http", - "version": [ - 0, - 11 - ], - "error": null, - "response": { - "code": 200, - "headers": [ - [ - "Server", - "cloudflare-nginx" - ], - [ - "Date", - "Sat, 13 Sep 2014 23:35:08 GMT" - ], - [ - "Content-Type", - "text/css" - ], - [ - "Transfer-Encoding", - "chunked" - ], - [ - "Connection", - "keep-alive" - ], - [ - "Last-Modified", - "Fri, 01 Aug 2014 04:27:14 GMT" - ], - [ - "Vary", - "Accept-Encoding" - ], - [ - "Expires", - "Mon, 29 Jul 2024 04:27:14 GMT" - ], - [ - "Cache-Control", - "max-age=311575926" - ], - [ - "Cache-Control", - "public" - ], - [ - "CF-RAY", - "169828d38096088d-FRA" - ], - [ - "Content-Encoding", - "gzip" - ] - ], - "timestamp_start": 1410651312.167, - "msg": "OK", - "timestamp_end": 1410651312.17, - "httpversion": [ - 1, - 1 - ] - } -}, -{ - "request": { - "timestamp_end": 1410651312.362, - "timestamp_start": 1410651312.359, - "form_in": "relative", - "headers": [ - [ - "Host", - "news.ycombinator.com" - ], - [ - "User-Agent", - "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" - ], - [ - "Accept", - "image/png,image/*;q=0.8,*/*;q=0.5" - ], - [ - "Accept-Language", - "de,en-US;q=0.7,en;q=0.3" - ], - [ - "Accept-Encoding", - "gzip, deflate" - ], - [ - "Referer", - "https://news.ycombinator.com/" - ], - [ - "Cookie", - "__cfduid=d0486ff404fe3beb320f15e958861aaea1410651010546" - ], - [ - "Connection", - "keep-alive" - ], - [ - "Pragma", - "no-cache" - ], - [ - "Cache-Control", - "no-cache" - ] - ], - "host": "news.ycombinator.com", - "form_out": "relative", - "path": "/s.gif", - "method": "GET", - "scheme": "https", - "port": 443, - "httpversion": [ - 1, - 1 - ] - }, - "server_conn": { - "timestamp_tcp_setup": 1410651312.303, - "state": [], - "timestamp_ssl_setup": 1410651312.349, - "sni": "news.ycombinator.com", - "timestamp_start": 1410651312.287, - "address": { - "use_ipv6": false, - "address": [ - "news.ycombinator.com", - 443 - ] - }, - "timestamp_end": null, - "source_address": { - "use_ipv6": false, - "address": [ - "192.168.1.117", - 63391 - ] - }, - "ssl_established": true - }, - "client_conn": { - "timestamp_start": 1410651312.193, - "address": { - "use_ipv6": false, - "address": [ - "127.0.0.1", - 63386 - ] - }, - "timestamp_ssl_setup": 1410651312.358, - "timestamp_end": null, - "clientcert": null, - "ssl_established": true - }, - "conntype": "http", - "version": [ - 0, - 11 - ], - "error": null, - "response": { - "code": 200, - "headers": [ - [ - "Server", - "cloudflare-nginx" - ], - [ - "Date", - "Sat, 13 Sep 2014 23:35:08 GMT" - ], - [ - "Content-Type", - "image/gif" - ], - [ - "Content-Length", - "43" - ], - [ - "Connection", - "keep-alive" - ], - [ - "Last-Modified", - "Tue, 12 Mar 2013 09:06:31 GMT" - ], - [ - "ETag", - "\"513ef017-2b\"" - ], - [ - "Expires", - "Fri, 31 Mar 2023 21:06:02 GMT" - ], - [ - "Cache-Control", - "public, max-age=269645454" - ], - [ - "CF-Cache-Status", - "HIT" - ], - [ - "Vary", - "Accept-Encoding" - ], - [ - "Accept-Ranges", - "bytes" - ], - [ - "CF-RAY", - "169828d7e771088d-FRA" - ] - ], - "timestamp_start": 1410651312.383, - "msg": "OK", - "timestamp_end": 1410651312.393, - "httpversion": [ - 1, - 1 - ] - } -}, -{ - "request": { - "timestamp_end": 1410651312.389, - "timestamp_start": 1410651312.368, - "form_in": "relative", - "headers": [ - [ - "Host", - "news.ycombinator.com" - ], - [ - "User-Agent", - "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" - ], - [ - "Accept", - "image/png,image/*;q=0.8,*/*;q=0.5" - ], - [ - "Accept-Language", - "de,en-US;q=0.7,en;q=0.3" - ], - [ - "Accept-Encoding", - "gzip, deflate" - ], - [ - "Referer", - "https://news.ycombinator.com/news.css?IZYAdhDe5bN6BGyHv1jq" - ], - [ - "Cookie", - "__cfduid=d0486ff404fe3beb320f15e958861aaea1410651010546" - ], - [ - "Connection", - "keep-alive" - ], - [ - "Pragma", - "no-cache" - ], - [ - "Cache-Control", - "no-cache" - ] - ], - "host": "news.ycombinator.com", - "form_out": "relative", - "path": "/grayarrow.gif", - "method": "GET", - "scheme": "https", - "port": 443, - "httpversion": [ - 1, - 1 - ] - }, - "server_conn": { - "timestamp_tcp_setup": 1410651312.307, - "state": [], - "timestamp_ssl_setup": 1410651312.355, - "sni": "news.ycombinator.com", - "timestamp_start": 1410651312.291, - "address": { - "use_ipv6": false, - "address": [ - "news.ycombinator.com", - 443 - ] - }, - "timestamp_end": null, - "source_address": { - "use_ipv6": false, - "address": [ - "192.168.1.117", - 63393 - ] - }, - "ssl_established": true - }, - "client_conn": { - "timestamp_start": 1410651312.2, - "address": { - "use_ipv6": false, - "address": [ - "127.0.0.1", - 63387 - ] - }, - "timestamp_ssl_setup": 1410651312.368, - "timestamp_end": null, - "clientcert": null, - "ssl_established": true - }, - "conntype": "http", - "version": [ - 0, - 11 - ], - "error": null, - "response": { - "code": 200, - "headers": [ - [ - "Server", - "cloudflare-nginx" - ], - [ - "Date", - "Sat, 13 Sep 2014 23:35:08 GMT" - ], - [ - "Content-Type", - "image/gif" - ], - [ - "Content-Length", - "111" - ], - [ - "Connection", - "keep-alive" - ], - [ - "Last-Modified", - "Tue, 12 Mar 2013 09:06:31 GMT" - ], - [ - "ETag", - "\"513ef017-6f\"" - ], - [ - "Expires", - "Sat, 01 Apr 2023 05:56:11 GMT" - ], - [ - "Cache-Control", - "public, max-age=269677263" - ], - [ - "CF-Cache-Status", - "HIT" - ], - [ - "Vary", - "Accept-Encoding" - ], - [ - "Accept-Ranges", - "bytes" - ], - [ - "CF-RAY", - "169828d81430088d-FRA" - ] - ], - "timestamp_start": 1410651312.409, - "msg": "OK", - "timestamp_end": 1410651312.412, - "httpversion": [ - 1, - 1 - ] - } -}, -{ - "request": { - "timestamp_end": 1410651312.386, - "timestamp_start": 1410651312.368, - "form_in": "relative", - "headers": [ - [ - "Host", - "news.ycombinator.com" - ], - [ - "User-Agent", - "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" - ], - [ - "Accept", - "image/png,image/*;q=0.8,*/*;q=0.5" - ], - [ - "Accept-Language", - "de,en-US;q=0.7,en;q=0.3" - ], - [ - "Accept-Encoding", - "gzip, deflate" - ], - [ - "Referer", - "https://news.ycombinator.com/" - ], - [ - "Cookie", - "__cfduid=d0486ff404fe3beb320f15e958861aaea1410651010546" - ], - [ - "Connection", - "keep-alive" - ], - [ - "Pragma", - "no-cache" - ], - [ - "Cache-Control", - "no-cache" - ] - ], - "host": "news.ycombinator.com", - "form_out": "relative", - "path": "/y18.gif", - "method": "GET", - "scheme": "https", - "port": 443, - "httpversion": [ - 1, - 1 - ] - }, - "server_conn": { - "timestamp_tcp_setup": 1410651312.303, - "state": [], - "timestamp_ssl_setup": 1410651312.355, - "sni": "news.ycombinator.com", - "timestamp_start": 1410651312.287, - "address": { - "use_ipv6": false, - "address": [ - "news.ycombinator.com", - 443 - ] - }, - "timestamp_end": null, - "source_address": { - "use_ipv6": false, - "address": [ - "192.168.1.117", - 63392 - ] - }, - "ssl_established": true - }, - "client_conn": { - "timestamp_start": 1410651312.192, - "address": { - "use_ipv6": false, - "address": [ - "127.0.0.1", - 63385 - ] - }, - "timestamp_ssl_setup": 1410651312.368, - "timestamp_end": null, - "clientcert": null, - "ssl_established": true - }, - "conntype": "http", - "version": [ - 0, - 11 - ], - "error": null, - "response": { - "code": 200, - "headers": [ - [ - "Server", - "cloudflare-nginx" - ], - [ - "Date", - "Sat, 13 Sep 2014 23:35:08 GMT" - ], - [ - "Content-Type", - "image/gif" - ], - [ - "Content-Length", - "100" - ], - [ - "Connection", - "keep-alive" - ], - [ - "Last-Modified", - "Tue, 12 Mar 2013 09:06:31 GMT" - ], - [ - "ETag", - "\"513ef017-64\"" - ], - [ - "Expires", - "Sat, 01 Apr 2023 04:28:54 GMT" - ], - [ - "Cache-Control", - "public, max-age=269672026" - ], - [ - "CF-Cache-Status", - "HIT" - ], - [ - "Vary", - "Accept-Encoding" - ], - [ - "Accept-Ranges", - "bytes" - ], - [ - "CF-RAY", - "169828d8109a088d-FRA" - ] - ], - "timestamp_start": 1410651312.413, - "msg": "OK", - "timestamp_end": 1410651312.416, - "httpversion": [ - 1, - 1 - ] - } -}, -{ - "request": { - "timestamp_end": 1410651373.965, - "timestamp_start": 1410651373.963, - "form_in": "absolute", - "headers": [ - [ - "Host", - "mitmproxy.org" - ], - [ - "User-Agent", - "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" - ], - [ - "Accept", - "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" - ], - [ - "Accept-Language", - "de,en-US;q=0.7,en;q=0.3" - ], - [ - "Accept-Encoding", - "gzip, deflate" - ], - [ - "Connection", - "keep-alive" - ] - ], - "host": "mitmproxy.org", - "form_out": "relative", - "path": "/", - "method": "GET", - "scheme": "http", - "port": 80, - "httpversion": [ - 1, - 1 - ] - }, - "server_conn": { - "timestamp_tcp_setup": 1410651374.189, - "state": [], - "timestamp_ssl_setup": null, - "sni": null, - "timestamp_start": 1410651373.985, - "address": { - "use_ipv6": false, - "address": [ - "mitmproxy.org", - 80 - ] - }, - "timestamp_end": null, - "source_address": { - "use_ipv6": false, - "address": [ - "192.168.1.117", - 63404 - ] - }, - "ssl_established": false - }, - "client_conn": { - "timestamp_start": 1410651373.958, - "address": { - "use_ipv6": false, - "address": [ - "127.0.0.1", - 63403 - ] - }, - "timestamp_ssl_setup": null, - "timestamp_end": null, - "clientcert": null, - "ssl_established": false - }, - "conntype": "http", - "version": [ - 0, - 11 - ], - "error": null, - "response": { - "code": 200, - "headers": [ - [ - "Server", - "nginx/1.1.19" - ], - [ - "Date", - "Sat, 13 Sep 2014 23:36:10 GMT" - ], - [ - "Content-Type", - "text/html" - ], - [ - "Last-Modified", - "Wed, 26 Feb 2014 19:58:20 GMT" - ], - [ - "Transfer-Encoding", - "chunked" - ], - [ - "Connection", - "keep-alive" - ], - [ - "Vary", - "Accept-Encoding" - ], - [ - "Content-Encoding", - "gzip" - ] - ], - "timestamp_start": 1410651374.365, - "msg": "OK", - "timestamp_end": 1410651374.366, - "httpversion": [ - 1, - 1 - ] - } -}, -{ - "request": { - "timestamp_end": 1410651374.391, - "timestamp_start": 1410651374.387, - "form_in": "absolute", - "headers": [ - [ - "Host", - "mitmproxy.org" - ], - [ - "User-Agent", - "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" - ], - [ - "Accept", - "text/css,*/*;q=0.1" - ], - [ - "Accept-Language", - "de,en-US;q=0.7,en;q=0.3" - ], - [ - "Accept-Encoding", - "gzip, deflate" - ], - [ - "Referer", - "http://mitmproxy.org/" - ], - [ - "Connection", - "keep-alive" - ] - ], - "host": "mitmproxy.org", - "form_out": "relative", - "path": "/01-bootstrap.min.css", - "method": "GET", - "scheme": "http", - "port": 80, - "httpversion": [ - 1, - 1 - ] - }, - "server_conn": { - "timestamp_tcp_setup": 1410651374.189, - "state": [], - "timestamp_ssl_setup": null, - "sni": null, - "timestamp_start": 1410651373.985, - "address": { - "use_ipv6": false, - "address": [ - "mitmproxy.org", - 80 - ] - }, - "timestamp_end": null, - "source_address": { - "use_ipv6": false, - "address": [ - "192.168.1.117", - 63404 - ] - }, - "ssl_established": false - }, - "client_conn": { - "timestamp_start": 1410651373.958, - "address": { - "use_ipv6": false, - "address": [ - "127.0.0.1", - 63403 - ] - }, - "timestamp_ssl_setup": null, - "timestamp_end": null, - "clientcert": null, - "ssl_established": false - }, - "conntype": "http", - "version": [ - 0, - 11 - ], - "error": null, - "response": { - "code": 200, - "headers": [ - [ - "Server", - "nginx/1.1.19" - ], - [ - "Date", - "Sat, 13 Sep 2014 23:36:10 GMT" - ], - [ - "Content-Type", - "text/css" - ], - [ - "Last-Modified", - "Wed, 26 Feb 2014 19:58:20 GMT" - ], - [ - "Transfer-Encoding", - "chunked" - ], - [ - "Connection", - "keep-alive" - ], - [ - "Vary", - "Accept-Encoding" - ], - [ - "Content-Encoding", - "gzip" - ] - ], - "timestamp_start": 1410651374.579, - "msg": "OK", - "timestamp_end": 1410651374.58, - "httpversion": [ - 1, - 1 - ] - } -}, -{ - "request": { - "timestamp_end": 1410651374.396, - "timestamp_start": 1410651374.394, - "form_in": "absolute", - "headers": [ - [ - "Host", - "mitmproxy.org" - ], - [ - "User-Agent", - "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" - ], - [ - "Accept", - "text/css,*/*;q=0.1" - ], - [ - "Accept-Language", - "de,en-US;q=0.7,en;q=0.3" - ], - [ - "Accept-Encoding", - "gzip, deflate" - ], - [ - "Referer", - "http://mitmproxy.org/" - ], - [ - "Connection", - "keep-alive" - ] - ], - "host": "mitmproxy.org", - "form_out": "relative", - "path": "/03-sitestyle.css", - "method": "GET", - "scheme": "http", - "port": 80, - "httpversion": [ - 1, - 1 - ] - }, - "server_conn": { - "timestamp_tcp_setup": 1410651374.567, - "state": [], - "timestamp_ssl_setup": null, - "sni": null, - "timestamp_start": 1410651374.401, - "address": { - "use_ipv6": false, - "address": [ - "mitmproxy.org", - 80 - ] - }, - "timestamp_end": null, - "source_address": { - "use_ipv6": false, - "address": [ - "192.168.1.117", - 63407 - ] - }, - "ssl_established": false - }, - "client_conn": { - "timestamp_start": 1410651374.389, - "address": { - "use_ipv6": false, - "address": [ - "127.0.0.1", - 63405 - ] - }, - "timestamp_ssl_setup": null, - "timestamp_end": null, - "clientcert": null, - "ssl_established": false - }, - "conntype": "http", - "version": [ - 0, - 11 - ], - "error": null, - "response": { - "code": 200, - "headers": [ - [ - "Server", - "nginx/1.1.19" - ], - [ - "Date", - "Sat, 13 Sep 2014 23:36:11 GMT" - ], - [ - "Content-Type", - "text/css" - ], - [ - "Content-Length", - "124" - ], - [ - "Last-Modified", - "Wed, 26 Feb 2014 19:58:20 GMT" - ], - [ - "Connection", - "keep-alive" - ], - [ - "Accept-Ranges", - "bytes" - ] - ], - "timestamp_start": 1410651374.746, - "msg": "OK", - "timestamp_end": 1410651374.747, - "httpversion": [ - 1, - 1 - ] - } -}, -{ - "request": { - "timestamp_end": 1410651374.795, - "timestamp_start": 1410651374.793, - "form_in": "absolute", - "headers": [ - [ - "Host", - "www.google-analytics.com" - ], - [ - "User-Agent", - "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" - ], - [ - "Accept", - "*/*" - ], - [ - "Accept-Language", - "de,en-US;q=0.7,en;q=0.3" - ], - [ - "Accept-Encoding", - "gzip, deflate" - ], - [ - "Referer", - "http://mitmproxy.org/" - ], - [ - "Connection", - "keep-alive" - ] - ], - "host": "www.google-analytics.com", - "form_out": "relative", - "path": "/ga.js", - "method": "GET", - "scheme": "http", - "port": 80, - "httpversion": [ - 1, - 1 - ] - }, - "server_conn": { - "timestamp_tcp_setup": 1410651374.99, - "state": [], - "timestamp_ssl_setup": null, - "sni": null, - "timestamp_start": 1410651374.974, - "address": { - "use_ipv6": false, - "address": [ - "www.google-analytics.com", - 80 - ] - }, - "timestamp_end": null, - "source_address": { - "use_ipv6": false, - "address": [ - "192.168.1.117", - 63409 - ] - }, - "ssl_established": false - }, - "client_conn": { - "timestamp_start": 1410651374.389, - "address": { - "use_ipv6": false, - "address": [ - "127.0.0.1", - 63405 - ] - }, - "timestamp_ssl_setup": null, - "timestamp_end": null, - "clientcert": null, - "ssl_established": false - }, - "conntype": "http", - "version": [ - 0, - 11 - ], - "error": null, - "response": { - "code": 200, - "headers": [ - [ - "Date", - "Sat, 13 Sep 2014 22:02:27 GMT" - ], - [ - "Expires", - "Sun, 14 Sep 2014 00:02:27 GMT" - ], - [ - "Last-Modified", - "Mon, 08 Sep 2014 18:50:13 GMT" - ], - [ - "X-Content-Type-Options", - "nosniff" - ], - [ - "Content-Type", - "text/javascript" - ], - [ - "Vary", - "Accept-Encoding" - ], - [ - "Content-Encoding", - "gzip" - ], - [ - "Server", - "Golfe2" - ], - [ - "Content-Length", - "16062" - ], - [ - "Age", - "5624" - ], - [ - "Cache-Control", - "public, max-age=7200" - ], - [ - "Alternate-Protocol", - "80:quic,p=0.002" - ] - ], - "timestamp_start": 1410651375.013, - "msg": "OK", - "timestamp_end": 1410651375.015, - "httpversion": [ - 1, - 1 - ] - } -}, -{ - "request": { - "timestamp_end": 1410651375.084, - "timestamp_start": 1410651375.078, - "form_in": "absolute", - "headers": [ - [ - "Host", - "www.google-analytics.com" - ], - [ - "User-Agent", - "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" - ], - [ - "Accept", - "image/png,image/*;q=0.8,*/*;q=0.5" - ], - [ - "Accept-Language", - "de,en-US;q=0.7,en;q=0.3" - ], - [ - "Accept-Encoding", - "gzip, deflate" - ], - [ - "Referer", - "http://mitmproxy.org/" - ], - [ - "Connection", - "keep-alive" - ] - ], - "host": "www.google-analytics.com", - "form_out": "relative", - "path": "/__utm.gif?utmwv=5.5.7&utms=1&utmn=1242429522&utmhn=mitmproxy.org&utmcs=UTF-8&utmsr=1536x864&utmvp=1091x742&utmsc=24-bit&utmul=de&utmje=1&utmfl=15.0%20r0&utmdt=mitmproxy%20-%20home&utmhid=812953117&utmr=-&utmp=%2F&utmht=1410651375077&utmac=UA-4150636-13&utmcc=__utma%3D30234659.1711188806.1410651375.1410651375.1410651375.1%3B%2B__utmz%3D30234659.1410651375.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B&utmu=q~", - "method": "GET", - "scheme": "http", - "port": 80, - "httpversion": [ - 1, - 1 - ] - }, - "server_conn": { - "timestamp_tcp_setup": 1410651374.99, - "state": [], - "timestamp_ssl_setup": null, - "sni": null, - "timestamp_start": 1410651374.974, - "address": { - "use_ipv6": false, - "address": [ - "www.google-analytics.com", - 80 - ] - }, - "timestamp_end": null, - "source_address": { - "use_ipv6": false, - "address": [ - "192.168.1.117", - 63409 - ] - }, - "ssl_established": false - }, - "client_conn": { - "timestamp_start": 1410651374.389, - "address": { - "use_ipv6": false, - "address": [ - "127.0.0.1", - 63405 - ] - }, - "timestamp_ssl_setup": null, - "timestamp_end": null, - "clientcert": null, - "ssl_established": false - }, - "conntype": "http", - "version": [ - 0, - 11 - ], - "error": null, - "response": { - "code": 200, - "headers": [ - [ - "Pragma", - "no-cache" - ], - [ - "Expires", - "Wed, 19 Apr 2000 11:43:00 GMT" - ], - [ - "Last-Modified", - "Wed, 21 Jan 2004 19:51:30 GMT" - ], - [ - "X-Content-Type-Options", - "nosniff" - ], - [ - "Content-Type", - "image/gif" - ], - [ - "Date", - "Thu, 04 Sep 2014 18:39:58 GMT" - ], - [ - "Server", - "Golfe2" - ], - [ - "Content-Length", - "35" - ], - [ - "Age", - "795373" - ], - [ - "Cache-Control", - "private, no-cache, no-cache=Set-Cookie, proxy-revalidate" - ], - [ - "Alternate-Protocol", - "80:quic,p=0.002" - ] - ], - "timestamp_start": 1410651375.104, - "msg": "OK", - "timestamp_end": 1410651375.107, - "httpversion": [ - 1, - 1 - ] - } -}, -{ - "request": { - "timestamp_end": 1410651374.778, - "timestamp_start": 1410651374.766, - "form_in": "absolute", - "headers": [ - [ - "Host", - "mitmproxy.org" - ], - [ - "User-Agent", - "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" - ], - [ - "Accept", - "image/png,image/*;q=0.8,*/*;q=0.5" - ], - [ - "Accept-Language", - "de,en-US;q=0.7,en;q=0.3" - ], - [ - "Accept-Encoding", - "gzip, deflate" - ], - [ - "Referer", - "http://mitmproxy.org/" - ], - [ - "Connection", - "keep-alive" - ] - ], - "host": "mitmproxy.org", - "form_out": "relative", - "path": "/images/apple.png", - "method": "GET", - "scheme": "http", - "port": 80, - "httpversion": [ - 1, - 1 - ] - }, - "server_conn": { - "timestamp_tcp_setup": 1410651374.952, - "state": [], - "timestamp_ssl_setup": null, - "sni": null, - "timestamp_start": 1410651374.782, - "address": { - "use_ipv6": false, - "address": [ - "mitmproxy.org", - 80 - ] - }, - "timestamp_end": null, - "source_address": { - "use_ipv6": false, - "address": [ - "192.168.1.117", - 63408 - ] - }, - "ssl_established": false - }, - "client_conn": { - "timestamp_start": 1410651374.39, - "address": { - "use_ipv6": false, - "address": [ - "127.0.0.1", - 63406 - ] - }, - "timestamp_ssl_setup": null, - "timestamp_end": null, - "clientcert": null, - "ssl_established": false - }, - "conntype": "http", - "version": [ - 0, - 11 - ], - "error": null, - "response": { - "code": 200, - "headers": [ - [ - "Server", - "nginx/1.1.19" - ], - [ - "Date", - "Sat, 13 Sep 2014 23:36:11 GMT" - ], - [ - "Content-Type", - "image/png" - ], - [ - "Content-Length", - "20532" - ], - [ - "Last-Modified", - "Wed, 26 Feb 2014 19:58:20 GMT" - ], - [ - "Connection", - "keep-alive" - ], - [ - "Accept-Ranges", - "bytes" - ] - ], - "timestamp_start": 1410651375.125, - "msg": "OK", - "timestamp_end": 1410651375.126, - "httpversion": [ - 1, - 1 - ] - } -}, -{ - "request": { - "timestamp_end": 1410651374.778, - "timestamp_start": 1410651374.766, - "form_in": "absolute", - "headers": [ - [ - "Host", - "mitmproxy.org" - ], - [ - "User-Agent", - "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" - ], - [ - "Accept", - "image/png,image/*;q=0.8,*/*;q=0.5" - ], - [ - "Accept-Language", - "de,en-US;q=0.7,en;q=0.3" - ], - [ - "Accept-Encoding", - "gzip, deflate" - ], - [ - "Referer", - "http://mitmproxy.org/" - ], - [ - "Connection", - "keep-alive" - ] - ], - "host": "mitmproxy.org", - "form_out": "relative", - "path": "/images/mitmproxy-small.png", - "method": "GET", - "scheme": "http", - "port": 80, - "httpversion": [ - 1, - 1 - ] - }, - "server_conn": { - "timestamp_tcp_setup": 1410651374.189, - "state": [], - "timestamp_ssl_setup": null, - "sni": null, - "timestamp_start": 1410651373.985, - "address": { - "use_ipv6": false, - "address": [ - "mitmproxy.org", - 80 - ] - }, - "timestamp_end": null, - "source_address": { - "use_ipv6": false, - "address": [ - "192.168.1.117", - 63404 - ] - }, - "ssl_established": false - }, - "client_conn": { - "timestamp_start": 1410651373.958, - "address": { - "use_ipv6": false, - "address": [ - "127.0.0.1", - 63403 - ] - }, - "timestamp_ssl_setup": null, - "timestamp_end": null, - "clientcert": null, - "ssl_established": false - }, - "conntype": "http", - "version": [ - 0, - 11 - ], - "error": null, - "response": { - "code": 200, - "headers": [ - [ - "Server", - "nginx/1.1.19" - ], - [ - "Date", - "Sat, 13 Sep 2014 23:36:11 GMT" - ], - [ - "Content-Type", - "image/png" - ], - [ - "Content-Length", - "170108" - ], - [ - "Last-Modified", - "Wed, 26 Feb 2014 19:58:20 GMT" - ], - [ - "Connection", - "keep-alive" - ], - [ - "Accept-Ranges", - "bytes" - ] - ], - "timestamp_start": 1410651374.953, - "msg": "OK", - "timestamp_end": 1410651374.954, - "httpversion": [ - 1, - 1 - ] - } -}, -{ - "request": { - "timestamp_end": 1410651376.078, - "timestamp_start": 1410651376.075, - "form_in": "absolute", - "headers": [ - [ - "Host", - "mitmproxy.org" - ], - [ - "User-Agent", - "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" - ], - [ - "Accept", - "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" - ], - [ - "Accept-Language", - "de,en-US;q=0.7,en;q=0.3" - ], - [ - "Accept-Encoding", - "gzip, deflate" - ], - [ - "Cookie", - "__utma=30234659.1711188806.1410651375.1410651375.1410651375.1; __utmb=30234659.1.10.1410651375; __utmc=30234659; __utmz=30234659.1410651375.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)" - ], - [ - "Connection", - "keep-alive" - ] - ], - "host": "mitmproxy.org", - "form_out": "relative", - "path": "/favicon.ico", - "method": "GET", - "scheme": "http", - "port": 80, - "httpversion": [ - 1, - 1 - ] - }, - "server_conn": { - "timestamp_tcp_setup": 1410651374.189, - "state": [], - "timestamp_ssl_setup": null, - "sni": null, - "timestamp_start": 1410651373.985, - "address": { - "use_ipv6": false, - "address": [ - "mitmproxy.org", - 80 - ] - }, - "timestamp_end": null, - "source_address": { - "use_ipv6": false, - "address": [ - "192.168.1.117", - 63404 - ] - }, - "ssl_established": false - }, - "client_conn": { - "timestamp_start": 1410651373.958, - "address": { - "use_ipv6": false, - "address": [ - "127.0.0.1", - 63403 - ] - }, - "timestamp_ssl_setup": null, - "timestamp_end": null, - "clientcert": null, - "ssl_established": false - }, - "conntype": "http", - "version": [ - 0, - 11 - ], - "error": null, - "response": { - "code": 404, - "headers": [ - [ - "Server", - "nginx/1.1.19" - ], - [ - "Date", - "Sat, 13 Sep 2014 23:36:12 GMT" - ], - [ - "Content-Type", - "text/html" - ], - [ - "Content-Length", - "169" - ], - [ - "Connection", - "keep-alive" - ] - ], - "timestamp_start": 1410651376.254, - "msg": "Not Found", - "timestamp_end": 1410651376.255, - "httpversion": [ - 1, - 1 - ] - } -}, -{ - "request": { - "timestamp_end": 1410651376.282, - "timestamp_start": 1410651376.279, - "form_in": "absolute", - "headers": [ - [ - "Host", - "mitmproxy.org" - ], - [ - "User-Agent", - "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" - ], - [ - "Accept", - "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" - ], - [ - "Accept-Language", - "de,en-US;q=0.7,en;q=0.3" - ], - [ - "Accept-Encoding", - "gzip, deflate" - ], - [ - "Cookie", - "__utma=30234659.1711188806.1410651375.1410651375.1410651375.1; __utmb=30234659.1.10.1410651375; __utmc=30234659; __utmz=30234659.1410651375.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)" - ], - [ - "Connection", - "keep-alive" - ] - ], - "host": "mitmproxy.org", - "form_out": "relative", - "path": "/favicon.ico", - "method": "GET", - "scheme": "http", - "port": 80, - "httpversion": [ - 1, - 1 - ] - }, - "server_conn": { - "timestamp_tcp_setup": 1410651374.189, - "state": [], - "timestamp_ssl_setup": null, - "sni": null, - "timestamp_start": 1410651373.985, - "address": { - "use_ipv6": false, - "address": [ - "mitmproxy.org", - 80 - ] - }, - "timestamp_end": null, - "source_address": { - "use_ipv6": false, - "address": [ - "192.168.1.117", - 63404 - ] - }, - "ssl_established": false - }, - "client_conn": { - "timestamp_start": 1410651373.958, - "address": { - "use_ipv6": false, - "address": [ - "127.0.0.1", - 63403 - ] - }, - "timestamp_ssl_setup": null, - "timestamp_end": null, - "clientcert": null, - "ssl_established": false - }, - "conntype": "http", - "version": [ - 0, - 11 - ], - "error": null, - "response": { - "code": 404, - "headers": [ - [ - "Server", - "nginx/1.1.19" - ], - [ - "Date", - "Sat, 13 Sep 2014 23:36:12 GMT" - ], - [ - "Content-Type", - "text/html" - ], - [ - "Content-Length", - "169" - ], - [ - "Connection", - "keep-alive" - ] - ], - "timestamp_start": 1410651376.461, - "msg": "Not Found", - "timestamp_end": 1410651376.462, - "httpversion": [ - 1, - 1 - ] - } -}] \ No newline at end of file diff --git a/libmproxy/web/static/css/app.css b/libmproxy/web/static/css/app.css index ecc7426c..27acd68a 100644 --- a/libmproxy/web/static/css/app.css +++ b/libmproxy/web/static/css/app.css @@ -6,6 +6,60 @@ html { *:after { box-sizing: inherit; } +.resource-icon { + width: 32px; + height: 32px; +} +.resource-icon-css { + background-image: url("../images/sprite.png"); + background-position: 0px 0px; + background-size: 32px 320px!important; +} +.resource-icon-document { + background-image: url("../images/sprite.png"); + background-position: 0px -32px; + background-size: 32px 320px!important; +} +.resource-icon-js { + background-image: url("../images/sprite.png"); + background-position: 0px -64px; + background-size: 32px 320px!important; +} +.resource-icon-plain { + background-image: url("../images/sprite.png"); + background-position: 0px -96px; + background-size: 32px 320px!important; +} +.resource-icon-executable { + background-image: url("../images/sprite.png"); + background-position: 0px -128px; + background-size: 32px 320px!important; +} +.resource-icon-flash { + background-image: url("../images/sprite.png"); + background-position: 0px -160px; + background-size: 32px 320px!important; +} +.resource-icon-image { + background-image: url("../images/sprite.png"); + background-position: 0px -192px; + background-size: 32px 320px!important; +} +.resource-icon-java { + background-image: url("../images/sprite.png"); + background-position: 0px -224px; + background-size: 32px 320px!important; +} +.resource-icon-not-modified { + background-image: url("../images/sprite.png"); + background-position: 0px -256px; + background-size: 32px 320px!important; +} +.resource-icon-redirect { + background-image: url("../images/sprite.png"); + background-position: 0px -288px; + background-size: 32px 320px!important; +} html, body, #container { @@ -69,6 +123,33 @@ header .menu { } .flow-table { width: 100%; + table-layout: fixed; +} +.flow-table thead { + background-color: #dadada; +} +.flow-table td { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +.flow-table .col-tls { + width: 10px; +} +.flow-table .col-tls-https { + background-color: rgba(0, 185, 0, 0.5); +} +.flow-table .col-icon { + width: 32px; +} +.flow-table .col-method { + width: 60px; +} +.flow-table .col-status { + width: 50px; +} +.flow-table .col-time { + width: 120px; } .eventlog { flex: 0 0 auto; diff --git a/libmproxy/web/static/flows.json b/libmproxy/web/static/flows.json new file mode 100644 index 00000000..bdbfd5cc --- /dev/null +++ b/libmproxy/web/static/flows.json @@ -0,0 +1,2012 @@ +[{ + "request": { + "timestamp_end": 1410651311.107, + "timestamp_start": 1410651311.106, + "form_in": "relative", + "headers": [ + [ + "Host", + "news.ycombinator.com" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Cookie", + "__cfduid=d0486ff404fe3beb320f15e958861aaea1410651010546" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Pragma", + "no-cache" + ], + [ + "Cache-Control", + "no-cache" + ] + ], + "host": "news.ycombinator.com", + "form_out": "relative", + "path": "/", + "method": "GET", + "scheme": "https", + "port": 443, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651311.055, + "state": [], + "timestamp_ssl_setup": 1410651311.096, + "sni": "news.ycombinator.com", + "timestamp_start": 1410651311.04, + "address": { + "use_ipv6": false, + "address": [ + "news.ycombinator.com", + 443 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63383 + ] + }, + "ssl_established": true + }, + "client_conn": { + "timestamp_start": 1410651310.36, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63380 + ] + }, + "timestamp_ssl_setup": 1410651311.105, + "timestamp_end": null, + "clientcert": null, + "ssl_established": true + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "cloudflare-nginx" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:35:08 GMT" + ], + [ + "Content-Type", + "text/html; charset=utf-8" + ], + [ + "Transfer-Encoding", + "chunked" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Vary", + "Accept-Encoding" + ], + [ + "Cache-Control", + "private" + ], + [ + "X-Frame-Options", + "DENY" + ], + [ + "Cache-Control", + "max-age=0" + ], + [ + "Strict-Transport-Security", + "max-age=31556900; includeSubDomains" + ], + [ + "CF-RAY", + "169828d0108e088d-FRA" + ], + [ + "Content-Encoding", + "gzip" + ] + ], + "timestamp_start": 1410651311.6, + "msg": "OK", + "timestamp_end": 1410651311.603, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651311.657, + "timestamp_start": 1410651311.653, + "form_in": "relative", + "headers": [ + [ + "Host", + "news.ycombinator.com" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "text/css,*/*;q=0.1" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "https://news.ycombinator.com/" + ], + [ + "Cookie", + "__cfduid=d0486ff404fe3beb320f15e958861aaea1410651010546" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Pragma", + "no-cache" + ], + [ + "Cache-Control", + "no-cache" + ] + ], + "host": "news.ycombinator.com", + "form_out": "relative", + "path": "/news.css?IZYAdhDe5bN6BGyHv1jq", + "method": "GET", + "scheme": "https", + "port": 443, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651311.055, + "state": [], + "timestamp_ssl_setup": 1410651311.096, + "sni": "news.ycombinator.com", + "timestamp_start": 1410651311.04, + "address": { + "use_ipv6": false, + "address": [ + "news.ycombinator.com", + 443 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63383 + ] + }, + "ssl_established": true + }, + "client_conn": { + "timestamp_start": 1410651310.36, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63380 + ] + }, + "timestamp_ssl_setup": 1410651311.105, + "timestamp_end": null, + "clientcert": null, + "ssl_established": true + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "cloudflare-nginx" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:35:08 GMT" + ], + [ + "Content-Type", + "text/css" + ], + [ + "Transfer-Encoding", + "chunked" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Last-Modified", + "Fri, 01 Aug 2014 04:27:14 GMT" + ], + [ + "Vary", + "Accept-Encoding" + ], + [ + "Expires", + "Mon, 29 Jul 2024 04:27:14 GMT" + ], + [ + "Cache-Control", + "max-age=311575926" + ], + [ + "Cache-Control", + "public" + ], + [ + "CF-RAY", + "169828d38096088d-FRA" + ], + [ + "Content-Encoding", + "gzip" + ] + ], + "timestamp_start": 1410651312.167, + "msg": "OK", + "timestamp_end": 1410651312.17, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651312.362, + "timestamp_start": 1410651312.359, + "form_in": "relative", + "headers": [ + [ + "Host", + "news.ycombinator.com" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "image/png,image/*;q=0.8,*/*;q=0.5" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "https://news.ycombinator.com/" + ], + [ + "Cookie", + "__cfduid=d0486ff404fe3beb320f15e958861aaea1410651010546" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Pragma", + "no-cache" + ], + [ + "Cache-Control", + "no-cache" + ] + ], + "host": "news.ycombinator.com", + "form_out": "relative", + "path": "/s.gif", + "method": "GET", + "scheme": "https", + "port": 443, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651312.303, + "state": [], + "timestamp_ssl_setup": 1410651312.349, + "sni": "news.ycombinator.com", + "timestamp_start": 1410651312.287, + "address": { + "use_ipv6": false, + "address": [ + "news.ycombinator.com", + 443 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63391 + ] + }, + "ssl_established": true + }, + "client_conn": { + "timestamp_start": 1410651312.193, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63386 + ] + }, + "timestamp_ssl_setup": 1410651312.358, + "timestamp_end": null, + "clientcert": null, + "ssl_established": true + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "cloudflare-nginx" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:35:08 GMT" + ], + [ + "Content-Type", + "image/gif" + ], + [ + "Content-Length", + "43" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Last-Modified", + "Tue, 12 Mar 2013 09:06:31 GMT" + ], + [ + "ETag", + "\"513ef017-2b\"" + ], + [ + "Expires", + "Fri, 31 Mar 2023 21:06:02 GMT" + ], + [ + "Cache-Control", + "public, max-age=269645454" + ], + [ + "CF-Cache-Status", + "HIT" + ], + [ + "Vary", + "Accept-Encoding" + ], + [ + "Accept-Ranges", + "bytes" + ], + [ + "CF-RAY", + "169828d7e771088d-FRA" + ] + ], + "timestamp_start": 1410651312.383, + "msg": "OK", + "timestamp_end": 1410651312.393, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651312.389, + "timestamp_start": 1410651312.368, + "form_in": "relative", + "headers": [ + [ + "Host", + "news.ycombinator.com" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "image/png,image/*;q=0.8,*/*;q=0.5" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "https://news.ycombinator.com/news.css?IZYAdhDe5bN6BGyHv1jq" + ], + [ + "Cookie", + "__cfduid=d0486ff404fe3beb320f15e958861aaea1410651010546" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Pragma", + "no-cache" + ], + [ + "Cache-Control", + "no-cache" + ] + ], + "host": "news.ycombinator.com", + "form_out": "relative", + "path": "/grayarrow.gif", + "method": "GET", + "scheme": "https", + "port": 443, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651312.307, + "state": [], + "timestamp_ssl_setup": 1410651312.355, + "sni": "news.ycombinator.com", + "timestamp_start": 1410651312.291, + "address": { + "use_ipv6": false, + "address": [ + "news.ycombinator.com", + 443 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63393 + ] + }, + "ssl_established": true + }, + "client_conn": { + "timestamp_start": 1410651312.2, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63387 + ] + }, + "timestamp_ssl_setup": 1410651312.368, + "timestamp_end": null, + "clientcert": null, + "ssl_established": true + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "cloudflare-nginx" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:35:08 GMT" + ], + [ + "Content-Type", + "image/gif" + ], + [ + "Content-Length", + "111" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Last-Modified", + "Tue, 12 Mar 2013 09:06:31 GMT" + ], + [ + "ETag", + "\"513ef017-6f\"" + ], + [ + "Expires", + "Sat, 01 Apr 2023 05:56:11 GMT" + ], + [ + "Cache-Control", + "public, max-age=269677263" + ], + [ + "CF-Cache-Status", + "HIT" + ], + [ + "Vary", + "Accept-Encoding" + ], + [ + "Accept-Ranges", + "bytes" + ], + [ + "CF-RAY", + "169828d81430088d-FRA" + ] + ], + "timestamp_start": 1410651312.409, + "msg": "OK", + "timestamp_end": 1410651312.412, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651312.386, + "timestamp_start": 1410651312.368, + "form_in": "relative", + "headers": [ + [ + "Host", + "news.ycombinator.com" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "image/png,image/*;q=0.8,*/*;q=0.5" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "https://news.ycombinator.com/" + ], + [ + "Cookie", + "__cfduid=d0486ff404fe3beb320f15e958861aaea1410651010546" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Pragma", + "no-cache" + ], + [ + "Cache-Control", + "no-cache" + ] + ], + "host": "news.ycombinator.com", + "form_out": "relative", + "path": "/y18.gif", + "method": "GET", + "scheme": "https", + "port": 443, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651312.303, + "state": [], + "timestamp_ssl_setup": 1410651312.355, + "sni": "news.ycombinator.com", + "timestamp_start": 1410651312.287, + "address": { + "use_ipv6": false, + "address": [ + "news.ycombinator.com", + 443 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63392 + ] + }, + "ssl_established": true + }, + "client_conn": { + "timestamp_start": 1410651312.192, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63385 + ] + }, + "timestamp_ssl_setup": 1410651312.368, + "timestamp_end": null, + "clientcert": null, + "ssl_established": true + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "cloudflare-nginx" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:35:08 GMT" + ], + [ + "Content-Type", + "image/gif" + ], + [ + "Content-Length", + "100" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Last-Modified", + "Tue, 12 Mar 2013 09:06:31 GMT" + ], + [ + "ETag", + "\"513ef017-64\"" + ], + [ + "Expires", + "Sat, 01 Apr 2023 04:28:54 GMT" + ], + [ + "Cache-Control", + "public, max-age=269672026" + ], + [ + "CF-Cache-Status", + "HIT" + ], + [ + "Vary", + "Accept-Encoding" + ], + [ + "Accept-Ranges", + "bytes" + ], + [ + "CF-RAY", + "169828d8109a088d-FRA" + ] + ], + "timestamp_start": 1410651312.413, + "msg": "OK", + "timestamp_end": 1410651312.416, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651373.965, + "timestamp_start": 1410651373.963, + "form_in": "absolute", + "headers": [ + [ + "Host", + "mitmproxy.org" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "mitmproxy.org", + "form_out": "relative", + "path": "/", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.189, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651373.985, + "address": { + "use_ipv6": false, + "address": [ + "mitmproxy.org", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63404 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651373.958, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63403 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "nginx/1.1.19" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:36:10 GMT" + ], + [ + "Content-Type", + "text/html" + ], + [ + "Last-Modified", + "Wed, 26 Feb 2014 19:58:20 GMT" + ], + [ + "Transfer-Encoding", + "chunked" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Vary", + "Accept-Encoding" + ], + [ + "Content-Encoding", + "gzip" + ] + ], + "timestamp_start": 1410651374.365, + "msg": "OK", + "timestamp_end": 1410651374.366, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651374.391, + "timestamp_start": 1410651374.387, + "form_in": "absolute", + "headers": [ + [ + "Host", + "mitmproxy.org" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "text/css,*/*;q=0.1" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "http://mitmproxy.org/" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "mitmproxy.org", + "form_out": "relative", + "path": "/01-bootstrap.min.css", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.189, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651373.985, + "address": { + "use_ipv6": false, + "address": [ + "mitmproxy.org", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63404 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651373.958, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63403 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "nginx/1.1.19" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:36:10 GMT" + ], + [ + "Content-Type", + "text/css" + ], + [ + "Last-Modified", + "Wed, 26 Feb 2014 19:58:20 GMT" + ], + [ + "Transfer-Encoding", + "chunked" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Vary", + "Accept-Encoding" + ], + [ + "Content-Encoding", + "gzip" + ] + ], + "timestamp_start": 1410651374.579, + "msg": "OK", + "timestamp_end": 1410651374.58, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651374.396, + "timestamp_start": 1410651374.394, + "form_in": "absolute", + "headers": [ + [ + "Host", + "mitmproxy.org" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "text/css,*/*;q=0.1" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "http://mitmproxy.org/" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "mitmproxy.org", + "form_out": "relative", + "path": "/03-sitestyle.css", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.567, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651374.401, + "address": { + "use_ipv6": false, + "address": [ + "mitmproxy.org", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63407 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651374.389, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63405 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "nginx/1.1.19" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:36:11 GMT" + ], + [ + "Content-Type", + "text/css" + ], + [ + "Content-Length", + "124" + ], + [ + "Last-Modified", + "Wed, 26 Feb 2014 19:58:20 GMT" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Accept-Ranges", + "bytes" + ] + ], + "timestamp_start": 1410651374.746, + "msg": "OK", + "timestamp_end": 1410651374.747, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651374.795, + "timestamp_start": 1410651374.793, + "form_in": "absolute", + "headers": [ + [ + "Host", + "www.google-analytics.com" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "*/*" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "http://mitmproxy.org/" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "www.google-analytics.com", + "form_out": "relative", + "path": "/ga.js", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.99, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651374.974, + "address": { + "use_ipv6": false, + "address": [ + "www.google-analytics.com", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63409 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651374.389, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63405 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Date", + "Sat, 13 Sep 2014 22:02:27 GMT" + ], + [ + "Expires", + "Sun, 14 Sep 2014 00:02:27 GMT" + ], + [ + "Last-Modified", + "Mon, 08 Sep 2014 18:50:13 GMT" + ], + [ + "X-Content-Type-Options", + "nosniff" + ], + [ + "Content-Type", + "text/javascript" + ], + [ + "Vary", + "Accept-Encoding" + ], + [ + "Content-Encoding", + "gzip" + ], + [ + "Server", + "Golfe2" + ], + [ + "Content-Length", + "16062" + ], + [ + "Age", + "5624" + ], + [ + "Cache-Control", + "public, max-age=7200" + ], + [ + "Alternate-Protocol", + "80:quic,p=0.002" + ] + ], + "timestamp_start": 1410651375.013, + "msg": "OK", + "timestamp_end": 1410651375.015, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651375.084, + "timestamp_start": 1410651375.078, + "form_in": "absolute", + "headers": [ + [ + "Host", + "www.google-analytics.com" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "image/png,image/*;q=0.8,*/*;q=0.5" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "http://mitmproxy.org/" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "www.google-analytics.com", + "form_out": "relative", + "path": "/__utm.gif?utmwv=5.5.7&utms=1&utmn=1242429522&utmhn=mitmproxy.org&utmcs=UTF-8&utmsr=1536x864&utmvp=1091x742&utmsc=24-bit&utmul=de&utmje=1&utmfl=15.0%20r0&utmdt=mitmproxy%20-%20home&utmhid=812953117&utmr=-&utmp=%2F&utmht=1410651375077&utmac=UA-4150636-13&utmcc=__utma%3D30234659.1711188806.1410651375.1410651375.1410651375.1%3B%2B__utmz%3D30234659.1410651375.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B&utmu=q~", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.99, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651374.974, + "address": { + "use_ipv6": false, + "address": [ + "www.google-analytics.com", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63409 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651374.389, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63405 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Pragma", + "no-cache" + ], + [ + "Expires", + "Wed, 19 Apr 2000 11:43:00 GMT" + ], + [ + "Last-Modified", + "Wed, 21 Jan 2004 19:51:30 GMT" + ], + [ + "X-Content-Type-Options", + "nosniff" + ], + [ + "Content-Type", + "image/gif" + ], + [ + "Date", + "Thu, 04 Sep 2014 18:39:58 GMT" + ], + [ + "Server", + "Golfe2" + ], + [ + "Content-Length", + "35" + ], + [ + "Age", + "795373" + ], + [ + "Cache-Control", + "private, no-cache, no-cache=Set-Cookie, proxy-revalidate" + ], + [ + "Alternate-Protocol", + "80:quic,p=0.002" + ] + ], + "timestamp_start": 1410651375.104, + "msg": "OK", + "timestamp_end": 1410651375.107, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651374.778, + "timestamp_start": 1410651374.766, + "form_in": "absolute", + "headers": [ + [ + "Host", + "mitmproxy.org" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "image/png,image/*;q=0.8,*/*;q=0.5" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "http://mitmproxy.org/" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "mitmproxy.org", + "form_out": "relative", + "path": "/images/apple.png", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.952, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651374.782, + "address": { + "use_ipv6": false, + "address": [ + "mitmproxy.org", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63408 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651374.39, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63406 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "nginx/1.1.19" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:36:11 GMT" + ], + [ + "Content-Type", + "image/png" + ], + [ + "Content-Length", + "20532" + ], + [ + "Last-Modified", + "Wed, 26 Feb 2014 19:58:20 GMT" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Accept-Ranges", + "bytes" + ] + ], + "timestamp_start": 1410651375.125, + "msg": "OK", + "timestamp_end": 1410651375.126, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651374.778, + "timestamp_start": 1410651374.766, + "form_in": "absolute", + "headers": [ + [ + "Host", + "mitmproxy.org" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "image/png,image/*;q=0.8,*/*;q=0.5" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "http://mitmproxy.org/" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "mitmproxy.org", + "form_out": "relative", + "path": "/images/mitmproxy-small.png", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.189, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651373.985, + "address": { + "use_ipv6": false, + "address": [ + "mitmproxy.org", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63404 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651373.958, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63403 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "nginx/1.1.19" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:36:11 GMT" + ], + [ + "Content-Type", + "image/png" + ], + [ + "Content-Length", + "170108" + ], + [ + "Last-Modified", + "Wed, 26 Feb 2014 19:58:20 GMT" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Accept-Ranges", + "bytes" + ] + ], + "timestamp_start": 1410651374.953, + "msg": "OK", + "timestamp_end": 1410651374.954, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651376.078, + "timestamp_start": 1410651376.075, + "form_in": "absolute", + "headers": [ + [ + "Host", + "mitmproxy.org" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Cookie", + "__utma=30234659.1711188806.1410651375.1410651375.1410651375.1; __utmb=30234659.1.10.1410651375; __utmc=30234659; __utmz=30234659.1410651375.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "mitmproxy.org", + "form_out": "relative", + "path": "/favicon.ico", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.189, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651373.985, + "address": { + "use_ipv6": false, + "address": [ + "mitmproxy.org", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63404 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651373.958, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63403 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 404, + "headers": [ + [ + "Server", + "nginx/1.1.19" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:36:12 GMT" + ], + [ + "Content-Type", + "text/html" + ], + [ + "Content-Length", + "169" + ], + [ + "Connection", + "keep-alive" + ] + ], + "timestamp_start": 1410651376.254, + "msg": "Not Found", + "timestamp_end": 1410651376.255, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651376.282, + "timestamp_start": 1410651376.279, + "form_in": "absolute", + "headers": [ + [ + "Host", + "mitmproxy.org" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Cookie", + "__utma=30234659.1711188806.1410651375.1410651375.1410651375.1; __utmb=30234659.1.10.1410651375; __utmc=30234659; __utmz=30234659.1410651375.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "mitmproxy.org", + "form_out": "relative", + "path": "/favicon.ico", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.189, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651373.985, + "address": { + "use_ipv6": false, + "address": [ + "mitmproxy.org", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63404 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651373.958, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63403 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 404, + "headers": [ + [ + "Server", + "nginx/1.1.19" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:36:12 GMT" + ], + [ + "Content-Type", + "text/html" + ], + [ + "Content-Length", + "169" + ], + [ + "Connection", + "keep-alive" + ] + ], + "timestamp_start": 1410651376.461, + "msg": "Not Found", + "timestamp_end": 1410651376.462, + "httpversion": [ + 1, + 1 + ] + } +}] \ No newline at end of file diff --git a/libmproxy/web/static/images/sprite.png b/libmproxy/web/static/images/sprite.png new file mode 100644 index 00000000..ff57a37d Binary files /dev/null and b/libmproxy/web/static/images/sprite.png differ diff --git a/libmproxy/web/static/js/app.js b/libmproxy/web/static/js/app.js index e967af89..ea49db4d 100644 --- a/libmproxy/web/static/js/app.js +++ b/libmproxy/web/static/js/app.js @@ -269,13 +269,14 @@ _.extend(FlowView.prototype, EventEmitter.prototype, { var updates = this.flows; this.flows = flows; updates.forEach(function(flow){ - this.update(flow); + this._update(flow); }.bind(this)); + this.emit("change"); }, - update: function(flow){ + _update: function(flow){ console.debug("FIXME: Use UUID"); var idx = _.findIndex(this.flows, function(f){ - return flow.request.timestamp_start == f.request.timestamp_start + return flow.request.timestamp_start == f.request.timestamp_start; }); if(idx < 0){ @@ -283,6 +284,9 @@ _.extend(FlowView.prototype, EventEmitter.prototype, { } else { this.flows[idx] = flow; } + }, + update: function(flow){ + this._update(flow); this.emit("change"); }, }); @@ -294,6 +298,11 @@ function _FlowStore() { _.extend(_FlowStore.prototype, EventEmitter.prototype, { getView: function (since) { var view = new FlowView(this, !since); + + $.getJSON("/static/flows.json", function(flows){ + view.add_bulk(flows); + }); + return view; }, handle: function (action) { @@ -442,7 +451,10 @@ var FlowRow = React.createClass({displayName: 'FlowRow', render: function(){ var flow = this.props.flow; var columns = this.props.columns.map(function(column){ - return column({flow: flow}); + return column({ + key: column.displayName, + flow: flow + }); }.bind(this)); return React.DOM.tr(null, columns); } @@ -460,55 +472,89 @@ var FlowTableHead = React.createClass({displayName: 'FlowTableHead', var FlowTableBody = React.createClass({displayName: 'FlowTableBody', render: function(){ var rows = this.props.flows.map(function(flow){ - return FlowRow({flow: flow, columns: this.props.columns}) + //TODO: Add UUID + return FlowRow({flow: flow, columns: this.props.columns}); }.bind(this)); return React.DOM.tbody(null, rows); } }); + +var TLSColumn = React.createClass({displayName: 'TLSColumn', + statics: { + renderTitle: function(){ + return React.DOM.th({key: "tls", className: "col-tls"}); + } + }, + render: function(){ + var flow = this.props.flow; + var ssl = (flow.request.scheme == "https"); + return React.DOM.td({className: ssl ? "col-tls-https" : "col-tls-http"}); + } +}); + + +var IconColumn = React.createClass({displayName: 'IconColumn', + statics: { + renderTitle: function(){ + return React.DOM.th({key: "icon", className: "col-icon"}); + } + }, + render: function(){ + var flow = this.props.flow; + return React.DOM.td({className: "resource-icon resource-icon-plain"}); + } +}); + var PathColumn = React.createClass({displayName: 'PathColumn', statics: { renderTitle: function(){ - return React.DOM.th({key: "PathColumn"}, "Path"); + return React.DOM.th({key: "path", className: "col-path"}, "Path"); } }, render: function(){ var flow = this.props.flow; - return React.DOM.td({key: "PathColumn"}, flow.request.scheme + "://" + flow.request.host + flow.request.path); + return React.DOM.td(null, flow.request.scheme + "://" + flow.request.host + flow.request.path); } }); + + var MethodColumn = React.createClass({displayName: 'MethodColumn', statics: { renderTitle: function(){ - return React.DOM.th({key: "MethodColumn"}, "Method"); + return React.DOM.th({key: "method", className: "col-method"}, "Method"); } }, render: function(){ var flow = this.props.flow; - return React.DOM.td({key: "MethodColumn"}, flow.request.method); + return React.DOM.td(null, flow.request.method); } }); + + var StatusColumn = React.createClass({displayName: 'StatusColumn', statics: { renderTitle: function(){ - return React.DOM.th({key: "StatusColumn"}, "Status"); + return React.DOM.th({key: "status", className: "col-status"}, "Status"); } }, render: function(){ var flow = this.props.flow; var status; if(flow.response){ - status = flow.response.code + " " + flow.response.msg; + status = flow.response.code; } else { status = null; } - return React.DOM.td({key: "StatusColumn"}, status); + return React.DOM.td(null, status); } }); + + var TimeColumn = React.createClass({displayName: 'TimeColumn', statics: { renderTitle: function(){ - return React.DOM.th({key: "TimeColumn"}, "Time"); + return React.DOM.th({key: "time", className: "col-time"}, "Time"); } }, render: function(){ @@ -519,11 +565,13 @@ var TimeColumn = React.createClass({displayName: 'TimeColumn', } else { time = "..."; } - return React.DOM.td({key: "TimeColumn"}, time); + return React.DOM.td(null, time); } }); -var all_columns = [PathColumn, MethodColumn, StatusColumn, TimeColumn]; + +var all_columns = [TLSColumn, IconColumn, PathColumn, MethodColumn, StatusColumn, TimeColumn]; + var FlowTable = React.createClass({displayName: 'FlowTable', getInitialState: function () { diff --git a/web/gulpfile.js b/web/gulpfile.js index f34bc4a8..c1ca8e67 100644 --- a/web/gulpfile.js +++ b/web/gulpfile.js @@ -1,7 +1,7 @@ var gulp = require("gulp"); +var merge = require('merge-stream'); var concat = require('gulp-concat'); -var gutil = require('gulp-util'); var jshint = require("gulp-jshint"); var less = require("gulp-less"); var livereload = require("gulp-livereload"); @@ -10,7 +10,9 @@ var notify = require("gulp-notify"); var plumber = require("gulp-plumber"); var qunit = require("gulp-qunit"); var react = require("gulp-react"); +var rename = require("gulp-rename"); var sourcemaps = require('gulp-sourcemaps'); +var sprite = require('gulp-sprite-generator'); var uglify = require('gulp-uglify'); @@ -50,10 +52,12 @@ var path = { }, css: { vendor: ["css/vendor.less"], - app: ["css/app.less"] + app: ["css/app.less"], + spritefile: "css/sprites.less" }, fonts: ["src/vendor/fontawesome/fontawesome-webfont.*"], - html: ["src/*.html", "!src/benchmark.html", "!src/test.html"] + html: ["src/*.html", "!src/benchmark.html", "!src/test.html"], + images: "src/images", }; @@ -124,9 +128,24 @@ gulp.task("jshint", function () { .pipe(dont_break_on_errors()) .pipe(react()) .pipe(jshint()) - .pipe(jshint.reporter("jshint-stylish")) + .pipe(jshint.reporter("jshint-stylish")); }); +gulp.task("sprites", function () { + // Sprite generator is a gulp task, which accepts options object and + // returns two streams for style and image piping. + var spriteOutput = gulp.src([path.css.spritefile], {base: "src", cwd: "src"}) + .pipe(sprite({ + spriteSheetName: "sprite.png", + spriteSheetPath: "../images", + })); + var css = spriteOutput.css + .pipe(rename({extname:".compiled.less"})) + .pipe(gulp.dest("src/css")); + var img = spriteOutput.img.pipe(gulp.dest(path.dist + "static/images")); + // https://github.com/gulpjs/gulp/blob/master/docs/recipes/using-multiple-sources-in-one-task.md + return merge(css, img); +}); gulp.task("html", function () { return gulp.src(path.html) @@ -141,7 +160,7 @@ gulp.task('test', function() { }); -common = ["fonts", "html", "jshint"]; +common = ["fonts", "html", "jshint", "sprites"]; gulp.task("dev", common.concat(["styles-dev", "scripts-dev"])); gulp.task("prod", common.concat(["styles-prod", "scripts-prod"])); @@ -150,5 +169,6 @@ gulp.task("default", ["dev"], function () { gulp.watch(["src/vendor/**"], ["scripts-vendor-dev", "styles-vendor-dev"]); gulp.watch(["src/js/**"], ["scripts-app-dev", "jshint"]); gulp.watch(["src/css/**"], ["styles-app-dev"]); + gulp.watch(["src/images/**", "src/css/sprites.less"], ["sprites"]); gulp.watch(["src/*.html"], ["html"]); }); diff --git a/web/package.json b/web/package.json index 6adb6687..de90587f 100644 --- a/web/package.json +++ b/web/package.json @@ -15,10 +15,13 @@ "gulp-plumber": "^0.6.5", "gulp-qunit": "^0.3.3", "gulp-react": "^1.0.1", + "gulp-rename": "^1.2.0", "gulp-sourcemaps": "^1.1.5", + "gulp-sprite-generator": "^0.2.0", "gulp-uglify": "^1.0.1", "gulp-util": "^3.0.1", "jshint-stylish": "^0.4.0", + "merge-stream": "^0.1.5", "react": "", "react-tools": "" } diff --git a/web/src/css/app.less b/web/src/css/app.less index 1eec0687..39ac14cd 100644 --- a/web/src/css/app.less +++ b/web/src/css/app.less @@ -7,6 +7,7 @@ html { box-sizing: inherit; } +@import (less) "sprites.compiled.less"; @import (less) "layout.less"; @import (less) "header.less"; @import (less) "flowtable.less"; diff --git a/web/src/css/flowtable.less b/web/src/css/flowtable.less index 95f235f4..deef9c81 100644 --- a/web/src/css/flowtable.less +++ b/web/src/css/flowtable.less @@ -1,5 +1,34 @@ .flow-table { width: 100%; + table-layout: fixed; + thead { + background-color: #dadada; + } + td { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + + .col-tls { + width: 10px; + } + .col-tls-https { + background-color: rgba(0, 185, 0, 0.5); + } + .col-icon { + width: 32px; + } + .col-method { + width: 60px; + } + .col-status { + width: 50px; + } + .col-time { + width: 120px; + } } \ No newline at end of file diff --git a/web/src/css/sprites.compiled.less b/web/src/css/sprites.compiled.less new file mode 100644 index 00000000..27951ee5 --- /dev/null +++ b/web/src/css/sprites.compiled.less @@ -0,0 +1,58 @@ +.resource-icon { + width: 32px; + height: 32px; +} + +// From Chrome Dev Tools +.resource-icon-css { + background-image: url("../images/sprite.png"); + background-position: -0px -0px; + background-size: 32px 320px!important; +} +.resource-icon-document { + background-image: url("../images/sprite.png"); + background-position: -0px -32px; + background-size: 32px 320px!important; +} +.resource-icon-js { + background-image: url("../images/sprite.png"); + background-position: -0px -64px; + background-size: 32px 320px!important; +} +.resource-icon-plain { + background-image: url("../images/sprite.png"); + background-position: -0px -96px; + background-size: 32px 320px!important; +} + +// Own +.resource-icon-executable { + background-image: url("../images/sprite.png"); + background-position: -0px -128px; + background-size: 32px 320px!important; +} +.resource-icon-flash { + background-image: url("../images/sprite.png"); + background-position: -0px -160px; + background-size: 32px 320px!important; +} +.resource-icon-image { + background-image: url("../images/sprite.png"); + background-position: -0px -192px; + background-size: 32px 320px!important; +} +.resource-icon-java { + background-image: url("../images/sprite.png"); + background-position: -0px -224px; + background-size: 32px 320px!important; +} +.resource-icon-not-modified { + background-image: url("../images/sprite.png"); + background-position: -0px -256px; + background-size: 32px 320px!important; +} +.resource-icon-redirect { + background-image: url("../images/sprite.png"); + background-position: -0px -288px; + background-size: 32px 320px!important; +} \ No newline at end of file diff --git a/web/src/css/sprites.less b/web/src/css/sprites.less new file mode 100644 index 00000000..9a63fdd3 --- /dev/null +++ b/web/src/css/sprites.less @@ -0,0 +1,38 @@ +.resource-icon { + width: 32px; + height: 32px; +} + +// From Chrome Dev Tools +.resource-icon-css { + background-image: url(../images/chrome-devtools/resourceCSSIcon.png); +} +.resource-icon-document { + background-image: url(../images/chrome-devtools/resourceDocumentIcon.png); +} +.resource-icon-js { + background-image: url(../images/chrome-devtools/resourceJSIcon.png); +} +.resource-icon-plain { + background-image: url(../images/chrome-devtools/resourcePlainIcon.png); +} + +// Own +.resource-icon-executable { + background-image: url(../images/resourceExecutableIcon.png); +} +.resource-icon-flash { + background-image: url(../images/resourceFlashIcon.png); +} +.resource-icon-image { + background-image: url(../images/resourceImageIcon.png); +} +.resource-icon-java { + background-image: url(../images/resourceJavaIcon.png); +} +.resource-icon-not-modified { + background-image: url(../images/resourceNotModifiedIcon.png); +} +.resource-icon-redirect { + background-image: url(../images/resourceRedirectIcon.png); +} \ No newline at end of file diff --git a/web/src/images/chrome-devtools/LICENSE b/web/src/images/chrome-devtools/LICENSE new file mode 100644 index 00000000..6e4f8b9f --- /dev/null +++ b/web/src/images/chrome-devtools/LICENSE @@ -0,0 +1,30 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// +// The Chromium Authors can be found at +// http://src.chromium.org/svn/trunk/src/AUTHORS +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/web/src/images/chrome-devtools/resourceCSSIcon.png b/web/src/images/chrome-devtools/resourceCSSIcon.png new file mode 100644 index 00000000..18828d06 Binary files /dev/null and b/web/src/images/chrome-devtools/resourceCSSIcon.png differ diff --git a/web/src/images/chrome-devtools/resourceDocumentIcon.png b/web/src/images/chrome-devtools/resourceDocumentIcon.png new file mode 100644 index 00000000..fdc10e47 Binary files /dev/null and b/web/src/images/chrome-devtools/resourceDocumentIcon.png differ diff --git a/web/src/images/chrome-devtools/resourceJSIcon.png b/web/src/images/chrome-devtools/resourceJSIcon.png new file mode 100644 index 00000000..c1b72189 Binary files /dev/null and b/web/src/images/chrome-devtools/resourceJSIcon.png differ diff --git a/web/src/images/chrome-devtools/resourcePlainIcon.png b/web/src/images/chrome-devtools/resourcePlainIcon.png new file mode 100644 index 00000000..8c82a4c7 Binary files /dev/null and b/web/src/images/chrome-devtools/resourcePlainIcon.png differ diff --git a/web/src/images/resourceExecutableIcon.png b/web/src/images/resourceExecutableIcon.png new file mode 100644 index 00000000..fa70c2fd Binary files /dev/null and b/web/src/images/resourceExecutableIcon.png differ diff --git a/web/src/images/resourceFlashIcon.png b/web/src/images/resourceFlashIcon.png new file mode 100644 index 00000000..ead5a4d0 Binary files /dev/null and b/web/src/images/resourceFlashIcon.png differ diff --git a/web/src/images/resourceImageIcon.png b/web/src/images/resourceImageIcon.png new file mode 100644 index 00000000..23163042 Binary files /dev/null and b/web/src/images/resourceImageIcon.png differ diff --git a/web/src/images/resourceJavaIcon.png b/web/src/images/resourceJavaIcon.png new file mode 100644 index 00000000..553b3391 Binary files /dev/null and b/web/src/images/resourceJavaIcon.png differ diff --git a/web/src/images/resourceNotModifiedIcon.png b/web/src/images/resourceNotModifiedIcon.png new file mode 100644 index 00000000..9c6a879d Binary files /dev/null and b/web/src/images/resourceNotModifiedIcon.png differ diff --git a/web/src/images/resourceRedirectIcon.png b/web/src/images/resourceRedirectIcon.png new file mode 100644 index 00000000..58fe3ac1 Binary files /dev/null and b/web/src/images/resourceRedirectIcon.png differ diff --git a/web/src/js/components/flowtable.jsx b/web/src/js/components/flowtable.jsx index 5e9f6718..a94e559f 100644 --- a/web/src/js/components/flowtable.jsx +++ b/web/src/js/components/flowtable.jsx @@ -4,7 +4,10 @@ var FlowRow = React.createClass({ render: function(){ var flow = this.props.flow; var columns = this.props.columns.map(function(column){ - return column({flow: flow}); + return column({ + key: column.displayName, + flow: flow + }); }.bind(this)); return {columns}; } @@ -22,55 +25,89 @@ var FlowTableHead = React.createClass({ var FlowTableBody = React.createClass({ render: function(){ var rows = this.props.flows.map(function(flow){ - return + //TODO: Add UUID + return ; }.bind(this)); return {rows}; } }); + +var TLSColumn = React.createClass({ + statics: { + renderTitle: function(){ + return ; + } + }, + render: function(){ + var flow = this.props.flow; + var ssl = (flow.request.scheme == "https"); + return ; + } +}); + + +var IconColumn = React.createClass({ + statics: { + renderTitle: function(){ + return ; + } + }, + render: function(){ + var flow = this.props.flow; + return ; + } +}); + var PathColumn = React.createClass({ statics: { renderTitle: function(){ - return Path; + return Path; } }, render: function(){ var flow = this.props.flow; - return {flow.request.scheme + "://" + flow.request.host + flow.request.path}; + return {flow.request.scheme + "://" + flow.request.host + flow.request.path}; } }); + + var MethodColumn = React.createClass({ statics: { renderTitle: function(){ - return Method; + return Method; } }, render: function(){ var flow = this.props.flow; - return {flow.request.method}; + return {flow.request.method}; } }); + + var StatusColumn = React.createClass({ statics: { renderTitle: function(){ - return Status; + return Status; } }, render: function(){ var flow = this.props.flow; var status; if(flow.response){ - status = flow.response.code + " " + flow.response.msg; + status = flow.response.code; } else { status = null; } - return {status}; + return {status}; } }); + + var TimeColumn = React.createClass({ statics: { renderTitle: function(){ - return Time; + return Time; } }, render: function(){ @@ -81,11 +118,13 @@ var TimeColumn = React.createClass({ } else { time = "..."; } - return {time}; + return {time}; } }); -var all_columns = [PathColumn, MethodColumn, StatusColumn, TimeColumn]; + +var all_columns = [TLSColumn, IconColumn, PathColumn, MethodColumn, StatusColumn, TimeColumn]; + var FlowTable = React.createClass({ getInitialState: function () { diff --git a/web/src/js/stores/flowstore.js b/web/src/js/stores/flowstore.js index 006eeb24..a5cb74ba 100644 --- a/web/src/js/stores/flowstore.js +++ b/web/src/js/stores/flowstore.js @@ -30,13 +30,14 @@ _.extend(FlowView.prototype, EventEmitter.prototype, { var updates = this.flows; this.flows = flows; updates.forEach(function(flow){ - this.update(flow); + this._update(flow); }.bind(this)); + this.emit("change"); }, - update: function(flow){ + _update: function(flow){ console.debug("FIXME: Use UUID"); var idx = _.findIndex(this.flows, function(f){ - return flow.request.timestamp_start == f.request.timestamp_start + return flow.request.timestamp_start == f.request.timestamp_start; }); if(idx < 0){ @@ -44,6 +45,9 @@ _.extend(FlowView.prototype, EventEmitter.prototype, { } else { this.flows[idx] = flow; } + }, + update: function(flow){ + this._update(flow); this.emit("change"); }, }); @@ -55,6 +59,11 @@ function _FlowStore() { _.extend(_FlowStore.prototype, EventEmitter.prototype, { getView: function (since) { var view = new FlowView(this, !since); + + $.getJSON("/static/flows.json", function(flows){ + view.add_bulk(flows); + }); + return view; }, handle: function (action) { -- cgit v1.2.3