Commit Graph

72 Commits

Author SHA1 Message Date
Aldo Cortesi
9109b3cc8c Massive refactoring to split up language implementation. 2015-05-02 16:17:00 +12:00
Aldo Cortesi
3a3ea9d927 pathoc: cope better with disconnect conditions 2015-05-01 09:41:07 +12:00
Aldo Cortesi
b8f40860f5 pathoc: Integrate bytes read/written log into Log handler 2015-04-30 14:42:54 +12:00
Aldo Cortesi
fea3d8e421 Revamp pathoc log output with a context handler
This does two things - it gives us a central place to put log utilities,
and it lets us group together related log lines.
2015-04-30 13:59:10 +12:00
Aldo Cortesi
f927701e74 Websocket frame read limit. 2015-04-30 08:03:26 +12:00
Aldo Cortesi
7e69fab331 Stub out websocket read loop and Frame language construct 2015-04-29 10:02:16 +12:00
Aldo Cortesi
99cb0808ab websockets: server handshake scheme
Also refactor settings and resolution interfaces
2015-04-22 15:49:17 +12:00
Aldo Cortesi
b66be24149 Fix call signature in pathoc. 2015-04-20 18:14:47 +12:00
Aldo Cortesi
33820d9aee Whitespace, interface refcactoring, sketch websockets language 2015-04-20 15:42:33 +12:00
Aldo Cortesi
be450cf9db Whitespace, small fixes. 2015-04-20 08:56:47 +12:00
Aldo Cortesi
3891fe5638 Refactor pathoc
We're getting ready for websockets. All the output specifiers are now on the
Pathoc object itself - we can't assume that all input and output happens in
response to a method call any more. This has the upside that we can unify the
request/print_request methods.
2015-04-19 18:04:27 +12:00
Aldo Cortesi
f8469a283b pathoc: Print SSL info only once per connection 2015-04-19 15:55:22 +12:00
Aldo Cortesi
f8e95db6b0 housekeeping: ++tests, coverage annotations 2015-04-17 17:45:50 +12:00
Aldo Cortesi
09e995ab5c Improvements to pathoc repeat requests
- Pathoc will now keep trying if connections failed
- Add a -w option to specify a wait time between requests
2015-03-14 11:54:47 +11:00
Aldo Cortesi
956149c126 --memo-limit - limit failed attempts to find new generated requests to N 2014-10-26 18:16:47 +13:00
Aldo Cortesi
c00ae41486 Add a memoize argument to prevent playing the same pattern twice
Also remove addition of Date header, which makes this non-deterministic
2014-10-25 19:50:48 +13:00
Aldo Cortesi
fc4f9a1c7a pathoc -n 0 repeats forever 2014-10-25 17:58:59 +13:00
Aldo Cortesi
ac4e9f8cb5 Rationalize pathoc arguments, add -r flag to randomly select a request from the provided specs 2014-10-25 16:43:01 +13:00
Aldo Cortesi
6d8431ab3e Allow specification of multiple patterns from file and on command line 2014-10-25 16:20:23 +13:00
Aldo Cortesi
00d0ee5ad5 Parse patterns eagerly on instantiation 2014-10-25 15:30:54 +13:00
Aldo Cortesi
5aadf92767 Nicer way to specify patterns read for file - just use a path 2014-10-25 08:18:39 +13:00
Aldo Cortesi
cd481fdd14 Refactor and whitespace 2014-10-24 17:12:54 +13:00
Aldo Cortesi
962a414327 Fix tests, re-add scripts 2014-10-24 14:01:34 +13:00
Maximilian Hils
a0c8b20b7d adjust to netlib api changes 2014-07-21 14:08:09 +02:00
Aldo Cortesi
9cc83ed9a8 Also dump SANs for pathoc -S 2014-03-07 15:21:34 +13:00
Aldo Cortesi
602e400ccc Use new get_current_cipher to show cipher in pathoc SSL output 2014-03-02 21:54:30 +13:00
Aldo Cortesi
53334e437c pathoc -S dumps information on the remote SSL certificate chain 2014-03-02 19:04:56 +13:00
Aldo Cortesi
234d326080 Implement custom certs. 2014-03-02 15:13:56 +13:00
Aldo Cortesi
091e539a02 Big improvements to SSL handling
- pathod now dynamically generates SSL certs, using the ~/.mitmproxy
cacert
- pathoc returns data on SSL peer certificates
- Pathod certificate CN can be specified on command line
- Support SSLv23
2014-03-02 13:45:35 +13:00
Aldo Cortesi
a1d0da2b53 Expand SSL support
- Cipher suite selection for both pathoc and pathod
- SSL version specification for pathod
- Expose SSLv23 as an option, and use it by default
2014-02-27 18:33:48 +13:00
Maximilian Hils
b994fb5a27 adjust to signature changes in netlib.tcp 2014-01-28 19:28:20 +01:00
Aldo Cortesi
26d6b189fc Pyflakes cleanup, adjust requirements.txt 2014-01-19 18:20:01 +13:00
Aldo Cortesi
a9f8dcf755 Merge pull request #11 from mitmproxy/refactor_read_http_body
always return Content-Length: 0 if r is not set
2014-01-04 14:48:12 -08:00
Aldo Cortesi
8229c3884f Ability to specify SSL/TLS version 2013-12-17 14:32:41 +13:00
Maximilian Hils
7049becdfe always return Content-Length: 0 if r is not set 2013-12-15 06:42:58 +01:00
Aldo Cortesi
0504bcfd96 Changelog, minor cleanups. 2013-04-30 09:32:11 +12:00
Aldo Cortesi
155710f991 Improve robustness of proxy CONNECT, test coverage to 100%. 2013-03-02 16:57:00 +13:00
Aldo Cortesi
9167b9b8b6 Make pathoc request return more human-friendly. 2013-02-27 09:07:16 +13:00
Aldo Cortesi
69339836c2 Adapt to netlib API changes. 2013-02-24 15:36:35 +13:00
Aldo Cortesi
9bd269c26a Add support for client certificates
- pathod request logs now include a clientcert member with details on the
client cert, or None if there wasn't one.
- pathoc has a -C option to specify a client certificate
2013-01-20 22:37:43 +13:00
Aldo Cortesi
5493925ea0 CONNECT through proxy mode for pathoc
Also, use this to unit test the pathod CONNECT implementation.
2013-01-05 20:29:46 +13:00
Aldo Cortesi
d7f641c6ee Shift SSL parameters into Pathoc class 2013-01-04 10:37:26 +13:00
Aldo Cortesi
3f50930dc0 Use .freeze to implement the -e explain flags for pathod and pathoc.
This now prints (in pathoc) or logs (in pathod) a frozen specification that
includes an expanded record of all generated values and locations.
2012-10-31 11:34:58 +13:00
Aldo Cortesi
b2deb470de Extract .serve() method from message classes. 2012-10-30 14:46:18 +13:00
Aldo Cortesi
f54ed69a35 Adjust serve() API. 2012-10-28 09:06:55 +13:00
Aldo Cortesi
ac5aacce44 Remove check argument to serve() methods.
Refactoring means we can now do this without a callback.

Also introduce the maximum_length method that estimates the max possible
message length.
2012-10-27 17:40:22 +13:00
Aldo Cortesi
173b5c596e Start moving policy checks to service-time, rather than parse-time. 2012-10-25 09:45:55 +13:00
Aldo Cortesi
495daf2b64 Remove actions log and explain, preparing for a more sophisticated take on this. 2012-10-05 11:14:17 +13:00
Aldo Cortesi
f5d5cc4988 rparse.py -> language.py 2012-10-05 10:30:32 +13:00
Aldo Cortesi
8bb81be2b0 Add pathoc -T to ignore timeouts.
Also move -c to -C for consistency.
2012-09-28 11:38:49 +12:00