Commit Graph

1765 Commits

Author SHA1 Message Date
Aldo Cortesi
aa77a52a06 One common --version flag 2014-11-15 17:58:38 +13:00
Aldo Cortesi
23a4f159fd Remove last vestiges of argparse 2014-11-15 17:51:21 +13:00
Aldo Cortesi
5af7c9ebf4 Exclude main.py from coverage analysis 2014-11-15 17:47:39 +13:00
Aldo Cortesi
7d76f3e992 Make sure all command-line arguments have a long form
... so they can be used in config files
2014-11-15 17:41:04 +13:00
Aldo Cortesi
09c503563a Enable config file parsing
We support 4 different config files:

~/.mitmproxy/common.conf:       Options that are common to all tools
~/.mitmproxy/mitmproxy.conf:    Options for mitmproxy
~/.mitmproxy/mitmdump.conf:     Options for mitmdump
~/.mitmproxy/mitmweb.conf:      Options for mitmweb

Options in the tool-specific config files over-ride options in common.conf. If
a non-common option is put in common.conf, an error will be raised if a
non-supporting tool is used.
2014-11-15 17:25:05 +13:00
Aldo Cortesi
6c1dc4522d Refactor command-line argument definition
- Argument definitions live in cmdline.py
- Parsing and initial processing lives in main.py
2014-11-15 16:29:38 +13:00
Aldo Cortesi
9c88622e25 Adjust tests 2014-11-15 16:17:05 +13:00
Aldo Cortesi
0906ee94ac Remove sortedcontainers from deps - we don't use it 2014-11-15 16:14:59 +13:00
Aldo Cortesi
24c4df07e3 First-order integration of configargparser to add config file support 2014-11-15 16:14:08 +13:00
Aldo Cortesi
645a4a0c04 Some additions to the release checklist 2014-11-15 15:47:00 +13:00
Justus Wingert
acce67e1fd Initial checkin with har_extractor script. 2014-11-15 03:34:39 +01:00
Maximilian Hils
c7a96b2fb1 always show error messages 2014-11-15 00:52:26 +01:00
Aldo Cortesi
4c2e87638a Changelog, plus fix date of previous release 2014-11-15 12:49:21 +13:00
Maximilian Hils
afc6ef99ea bump version 2014-11-14 16:18:05 +01:00
Maximilian Hils
be449b7129 fix #409 2014-11-14 16:13:45 +01:00
Maximilian Hils
0c52b4e3b9 handle script hooks in replay, fix tests, fix #402 2014-11-14 00:26:22 +01:00
Maximilian Hils
9b5a8af12d fix grideditor bug 2014-11-14 00:21:47 +01:00
Maximilian Hils
8cbb67ac70 docs++ 2014-11-13 23:03:06 +01:00
Maximilian Hils
a325ae638b fix tests 2014-11-11 13:09:05 +01:00
Maximilian Hils
2335d00c1c Merge branch 'master' of github.com:mitmproxy/mitmproxy 2014-11-11 12:30:56 +01:00
Maximilian Hils
f19ee74b99 be more explicit about requirements 2014-11-11 12:30:51 +01:00
Aldo Cortesi
5873516d99 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2014-11-11 14:00:56 +13:00
Aldo Cortesi
ec17e70d9e Remove entry points in favor of vanilla scripts, fix test-release 2014-11-11 14:00:28 +13:00
Maximilian Hils
6f3b4eee3c fix clear key 2014-11-10 17:35:28 +01:00
Maximilian Hils
807a8eb759 Merge pull request #403 from Lucas-C/master
Using uppercase C to 'clear' display mode, because lowercase 'c' is used for css
2014-11-10 17:32:06 +01:00
Maximilian Hils
cece3700df fix #402 2014-11-10 17:11:36 +01:00
Maximilian Hils
476d7da17c update change_upstream_proxy example 2014-11-10 15:51:26 +01:00
Lucas Cimon
6f5883a4d1 Using uppercase C to 'clear' display mode, because lowercase 'c' is used for css 2014-11-07 17:02:29 +01:00
Maximilian Hils
4d090e09c7 fix tests 2014-11-07 09:59:11 +01:00
Maximilian Hils
c3ec551546 fix #401 2014-11-07 09:52:46 +01:00
Aldo Cortesi
5025bf872c Minor doc adjustments 2014-11-07 16:32:46 +13:00
Maximilian Hils
dc142682cb fix #399 2014-11-06 11:25:03 +01:00
Aldo Cortesi
a2a87695d3 Reduce loop timeouts to improve mitmproxy responsiveness
Fixes #384
2014-11-06 10:51:30 +13:00
Aldo Cortesi
0fe83ce87b Fix bug in flow dumping, add unit test that should have caught this in the first place 2014-11-06 10:35:00 +13:00
Aldo Cortesi
e732771c1c We don't need requests for mitmproxy 2014-11-05 09:57:09 +13:00
Aldo Cortesi
34d419ead8 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2014-11-04 10:22:13 +13:00
Aldo Cortesi
d0de490ef1 Release prep: binaries build script, release checklist, fuzzing 2014-11-02 18:04:57 +13:00
Maximilian Hils
8522c6ebd6 Merge pull request #393 from onlywade/master
Fixing issue #392, adding tests.
2014-11-01 18:07:32 +01:00
Wade 524
c4c42fa040 Updating OPTIONS test with related issue number. 2014-10-31 12:45:31 -07:00
Wade 524
ce18cd8ba4 Fixing issue #392. 2014-10-31 11:50:03 -07:00
Wade 524
2c64b90a3d Adding some test coverage for handling HTTP OPTIONS requests. 2014-10-31 11:49:45 -07:00
Maximilian Hils
3b0964f365 fix #391 2014-10-30 17:38:23 +01: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
Aldo Cortesi
7aee9a7c31 Spacing and legibility 2014-10-26 17:44:49 +13:00
Aldo Cortesi
efd6fdb0e2 Start a fuzzing architecture for mitmproxy 2014-10-26 17:13:25 +13:00
Maximilian Hils
35075a31a8 Merge pull request #387 from onlywade/master
Fixing issue #368.
2014-10-25 14:39:48 +02:00
Wade 524
1ef74cf294 Fixing issue #368. 2014-10-24 15:54:51 -07:00
Maximilian Hils
77c9f64526 Merge branch 'master' of github.com:mitmproxy/mitmproxy
Conflicts:
	doc-src/modes.html
2014-10-23 16:17:03 +02:00
Maximilian Hils
4bf07d8aa5 fix typo 2014-10-23 16:15:38 +02:00