Commit Graph

156 Commits

Author SHA1 Message Date
Aldo Cortesi
876252eba8 Remove stray print & massage whitespace a bit 2015-06-25 10:27:22 +12:00
iroiro123
fbb23b5c9f changed error handling (ssl spoof mode) 2015-06-23 01:49:22 +09:00
iroiro123
fd90367329 SSL Spoof mode 2015-06-21 00:51:56 +09:00
iroiro123
378aa78324 Spoof mode 2015-06-20 21:43:50 +09:00
iroiro123
59ec291b6c HTTP Transparent Proxy 2015-06-18 23:53:27 +09:00
Aldo Cortesi
7890450b0c Handle invalid IDNA encoding in hostnames
Fixes #622
2015-06-12 16:00:16 +12:00
Aldo Cortesi
a05a70d816 Add coding style check, reformat. 2015-05-30 12:03:28 +12:00
Aldo Cortesi
14341ffa19 Merge pull request #584 from dlethin/feature/http_1_0
Make sure proxy returns the httpversion specified in the request
2015-05-18 11:03:05 +12:00
Doug Lethin
cdff79fd4c Make sure proxy returns the httpversion specified in the request rather
than hardcoding to 1.1.
2015-05-15 22:20:09 -04:00
Nick Raptis
202ede3c54 Accurately timestamp start of request
When building a request from a stream, try to get an accurate
start timestamp from the Reader. This was already in the code
and also used when building response objects, but was ommited
in commit ddf458b330

Without his logic and when the client is reusing a connection
to send requests, the timestamp_start of subsequent requests
is early and equal to when the connection started read blocking
2015-05-08 10:58:05 +03:00
Aldo Cortesi
1c26516b18 pretty_size now lives in netlib.utils 2015-04-30 12:18:01 +12:00
Aldo Cortesi
37d731aacd Missed some un-needed variable declarations 2015-04-21 11:42:27 +12:00
Aldo Cortesi
ddf458b330 HTTP request reading moves to netlib 2015-04-21 11:05:37 +12:00
Aldo Cortesi
5ff4303124 Adjust for ODict interface change 2015-04-15 10:29:57 +12:00
Aldo Cortesi
c335c2b533 Add set_cookies method to HTTPResponse 2015-04-14 16:23:51 +12:00
Aldo Cortesi
ab7e2857cc New get_cookies for HttpResponse 2015-04-14 15:14:36 +12:00
Aldo Cortesi
e17eacd8d7 New get_cookie and set_cookie implementations for HTTPRequest 2015-04-14 13:45:38 +12:00
Aldo Cortesi
937a358aa9 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2015-04-14 12:01:37 +12:00
Aldo Cortesi
bea0bd236a Housekeeping and cleanups
- No output to stdout on load in examples - they muck up the test suite.
- Use the odict module directly, rather than aliasing it. The small convenience
this gives to scripters is not worth it.
- Move the cookie tests from the flow test module to the protocol_http test
module.
2015-04-14 11:58:10 +12:00
Maximilian Hils
ab2b98b988 fix pretty_host if no host is present 2015-04-10 19:35:42 +02:00
Maximilian Hils
6852eb9d0a fix #553 2015-04-10 14:59:38 +02:00
Maximilian Hils
423530fc25 Merge pull request #515 from krzysiekbielicki/master
[#514] Add support for ignoring payload params in multipart/form-data
2015-03-26 18:16:31 +01:00
Maximilian Hils
02a61ea45d structure components 2015-03-21 22:49:51 +01:00
Krzysztof Bielicki
244ef243d7
[#514] Add support for ignoring payload params in multipart/form-data 2015-03-10 10:44:06 +01:00
Maximilian Hils
e1b6cf9401 fix #319 2015-02-27 15:24:27 +01:00
Youhei Sakurai
5916767e03 Correct typo; https://github.com/mitmproxy/mitmproxy/issues/319 2015-02-27 10:22:27 +09:00
Youhei Sakurai
10f81e596b Change from checking __call__ to using callable;
https://github.com/mitmproxy/mitmproxy/issues/319
2015-02-27 10:15:07 +09:00
Youhei Sakurai
77bb0b74ed Maybe it should work; https://github.com/mitmproxy/mitmproxy/issues/319 2015-02-27 02:44:47 +09:00
Marcelo Glezer
010b921a93 added sni and ssl_established=true in ServerConnection. removed check for None value of server_conn in http.py 2015-02-12 13:41:58 -03:00
Marcelo Glezer
1df78f75c5 set sni to None when no server_conn is None 2015-02-10 17:18:23 -03:00
Maximilian Hils
53fadd05f4 fix #451 2015-02-07 16:26:19 +01:00
Maximilian Hils
52d696df3d fix ssl shutdown in tcp mode, refs #464 2015-02-05 16:46:55 +01:00
Maximilian Hils
310fb18aac fix #464 2015-02-05 15:24:32 +01:00
Maximilian Hils
1f454b577f web: CSP, revert functionality, serve content 2014-12-25 16:10:47 +01:00
Maximilian Hils
7ed6f10e35 web: much ui work, such christmas 2014-12-25 02:03:55 +01:00
Maximilian Hils
1c4f4c2494 web: duplicate, delete, replay flows 2014-12-24 01:07:57 +01:00
Maximilian Hils
2861d99de4 web: intercept feature 2014-12-23 20:33:42 +01:00
Maximilian Hils
4e635d7a6f allow specification of SSL version, only allow TLS1.0+ by default 2014-12-15 12:46:13 +01:00
Aldo Cortesi
01fa5d3f07 Merge pull request #414 from mitmproxy/flowviews2
Flowviews2
2014-12-12 22:08:15 +13:00
Maximilian Hils
b95f0c9971 fix #411 2014-12-08 17:17:37 +01:00
Maximilian Hils
5b1fefee9b add inline script example for websocket passthrough, fix #340 2014-12-01 03:04:48 +01:00
Maximilian Hils
992536c2bc make header processing configurable by inline scripts, refs #340 2014-12-01 02:28:03 +01:00
Maximilian Hils
3887e7ed29 fix error html 2014-11-26 04:56:17 +01:00
Maximilian Hils
ed8249023f introduce revised views, port over changes from multiple_views branch 2014-11-26 04:18:21 +01:00
Maximilian Hils
ec23594191 add sni support to LiveConnection.change_server 2014-11-19 01:27:20 +01:00
Maximilian Hils
0c52b4e3b9 handle script hooks in replay, fix tests, fix #402 2014-11-14 00:26:22 +01:00
Maximilian Hils
c3ec551546 fix #401 2014-11-07 09:52:46 +01:00
Wade 524
ce18cd8ba4 Fixing issue #392. 2014-10-31 11:50:03 -07:00
Aldo Cortesi
340d0570bf Legibility 2014-10-26 18:32:45 +13:00
Aldo Cortesi
16654ad6a4 Fix crash while streaming
Found using fuzzing. Reproduction with pathoc, given "mitmproxy -s" and
pathod running on 9999:

get:'http://localhost:9999/p/':s'200:b\'foo\':h\'Content-Length\'=\'3\'':i58,'\x1a':r

 return flow.FlowMaster.run(self)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/controller.py", line 111, in run
     self.tick(self.masterq, 0.01)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/flow.py", line 613, in tick
     return controller.Master.tick(self, q, timeout)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/controller.py", line 101, in tick
     self.handle(*msg)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/controller.py", line 118, in handle
     m(obj)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/flow.py", line 738, in handle_responseheaders
     self.stream_large_bodies.run(f, False)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/flow.py", line 155, in run
     r.headers, is_request, flow.request.method, code
   File "/Users/aldo/mitmproxy/mitmproxy/netlib/http.py", line 401, in expected_http_body_size
     raise HttpError(400 if is_request else 502, "Invalid content-length header: %s" % headers["content-length"])
 netlib.http.HttpError: Invalid content-length header: ['\x1a3']
2014-10-26 17:58:36 +13:00