Maximilian Hils
60e3e0b898
fix pathod
2014-10-09 03:35:39 +02:00
Maximilian Hils
14c9ba1af6
adjust to netlib changes
2014-10-08 20:48:16 +02:00
Maximilian Hils
6114f07f76
adapt pathod to netlib changes
2014-09-06 01:23:07 +02:00
Maximilian Hils
a0c8b20b7d
adjust to netlib api changes
2014-07-21 14:08:09 +02:00
Aldo Cortesi
e54bf1a804
Adjust for upstream cert store changes, improve cert handling significantly
2014-03-05 15:03:31 +13:00
Aldo Cortesi
944f213ebc
Add connection cipher info to pathod server log
2014-03-02 22:10:49 +13:00
Aldo Cortesi
0177eb899a
Support cert/key combo files in args. Improve argument names in SSLOptions
2014-03-02 15:56:36 +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
b64e1ccf91
adjust for netlib.tcp.Address changes
2014-01-30 20:06:33 +01:00
Maximilian Hils
b994fb5a27
adjust to signature changes in netlib.tcp
2014-01-28 19:28:20 +01:00
Maximilian Hils
1b566869de
Merge branch 'master' into tcp_proxy
2014-01-28 17:44:55 +01:00
Aldo Cortesi
26d6b189fc
Pyflakes cleanup, adjust requirements.txt
2014-01-19 18:20:01 +13:00
Maximilian Hils
f83508d4bf
Merge branch 'master' into tcp_proxy
2014-01-09 18:06:12 +01:00
Maximilian Hils
d31b7daf6c
change method signature
2014-01-09 18:04:04 +01:00
Maximilian Hils
7049becdfe
always return Content-Length: 0 if r is not set
2013-12-15 06:42:58 +01:00
Maximilian Hils
42aede6181
ensure binary read on windows
2013-08-19 19:21:47 +02:00
Aldo Cortesi
19c55361c8
Adapt to new cert storage API.
2013-08-12 16:05:07 +12:00
Aldo Cortesi
5eeb52183a
Adapt for new request_client_cert option in netlib.
2013-05-13 09:03:48 +12:00
Aldo Cortesi
110a8bb594
Print pathod craft explanations to stdout.
2013-03-03 16:33:50 +13:00
Aldo Cortesi
25656f4889
Adapt for new netlib SNI API.
2013-02-27 09:05:05 +13:00
Aldo Cortesi
ba0caff2dc
Wrap webapp in a creation function.
...
This lets us spawn multiple instances of Pathod.
2013-02-24 19:42:40 +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
ed7ef84557
Implement and unit test not-after-connect option.
2013-01-05 20:36:06 +13:00
Aldo Cortesi
c744ef2dcb
Proxy mode: drop to SSL if we see an HTTP CONNECT request
2013-01-05 17:15:42 +13:00
Aldo Cortesi
1e932e7045
Collect SSL options into an SSLOptions object
...
Also split SSL cert specifications from SSL service mode - we can now enter SSL
service mode through a proxy CONNECT request as well.
2013-01-05 16:48:49 +13:00
Aldo Cortesi
3886ccae93
Provisional proxy mode support for pathod.
2013-01-05 15:25:09 +13:00
Aldo Cortesi
ef9cbe3b25
Add u User-agent shortcut.
...
Usage:
200:ua - Shortcut "a" for Android.
200:u"foo" - Or a value literal
Shortcuts can be listed using the --show-uas argument to pathoc.
2012-11-16 13:46:42 +13:00
Aldo Cortesi
27d90a3594
Bump version, update CHANGELOG
2012-10-31 12:37:11 +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
f8df0a1e75
Add a .values method to messages, simplify a lot of stuff as a consequence.
2012-10-30 16:08:36 +13:00
Aldo Cortesi
b2deb470de
Extract .serve() method from message classes.
2012-10-30 14:46:18 +13:00
Aldo Cortesi
9d42a06c92
Move message body to new lazy-generator scheme.
2012-10-28 12:56:08 +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
06864e5a1b
Major refactoring towars separate representation of expressions and request/response service.
2012-10-27 14:00:50 +13:00
Aldo Cortesi
6174e46023
Unit test suite love: 100% coverage
...
Also start figuring out how to sanitize binary data in the JSON API.
2012-10-25 10:59:18 +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
f5d5cc4988
rparse.py -> language.py
2012-10-05 10:30:32 +13:00
Aldo Cortesi
41f1c66772
Add -q and -r flags to pathod, logging request and respnose bytes.
...
- These flags also mean that a bytes log is included in the internal log
buffer.
- There's an -x flag to turn on hex dump output in the text logs (does
not affect the log buffer).
2012-10-01 12:48:26 +13:00
Aldo Cortesi
915bcfbd30
Add timeout argument to Pathod, and matching -t command-line option.
2012-10-01 12:01:02 +13:00
Aldo Cortesi
d758409b76
Make sure date stamps are added to all logs.
2012-08-23 12:00:16 +12:00
Aldo Cortesi
e26aac1d3c
100% test coverage.
2012-07-30 13:52:40 +12:00
Aldo Cortesi
43314c77c8
Handle invalid headers better.
2012-07-30 12:53:41 +12:00
Aldo Cortesi
5b08703fa8
Handle disconnects on flush.
2012-07-30 12:02:42 +12:00
Aldo Cortesi
d8c53cbc57
Add an option to specify a log file to pathod.
2012-07-27 14:03:15 +12:00
Aldo Cortesi
3e158211a8
Add a --nohang flag that turns off pauses in response generation.
2012-07-26 20:01:51 +12:00
Aldo Cortesi
e9de11f0e3
Don't add stuff to our internal log buffer if noapi is on.
2012-07-24 22:30:15 +12:00
Aldo Cortesi
eb1f2c3fc4
Add option to specify craft anchor point.
2012-07-24 21:51:43 +12:00
Aldo Cortesi
a950a4d7a3
Add pathod --noapi to turn off the service API.
2012-07-23 23:31:26 +12:00
Aldo Cortesi
190392ea13
Add a --nocraft option to pathod that turns off crafting.
2012-07-23 21:39:31 +12:00
Aldo Cortesi
622a2b5607
Add a --noweb option to turn web iface off, refactor unit tests.
2012-07-23 19:55:33 +12:00
Aldo Cortesi
763e1ff786
pathod.py unit tests++
2012-07-23 17:53:17 +12:00
Aldo Cortesi
3027aae142
Use configured size limit to keep previews in check.
2012-07-23 15:38:06 +12:00
Aldo Cortesi
5283bb2507
Refactor rparse.InternalResponse -> rparse.PathodErrorResponse
2012-07-23 15:11:40 +12:00
Aldo Cortesi
1c45f5b05c
Use policy hook to apply a size limit in pathod, add corresponding cmdline arg.
2012-07-23 15:03:56 +12:00
Aldo Cortesi
c7b5faf7db
Add hooks for policy checks of served data.
2012-07-23 14:37:00 +12:00
Aldo Cortesi
1b03fd6780
Allow execution of specs from file, using +./path
2012-07-22 23:37:46 +12:00
Aldo Cortesi
1e93e42883
Escape special characters in first line error log.
2012-07-22 12:40:27 +12:00
Aldo Cortesi
8d8ede7e26
Handle invalid content length headers.
2012-07-22 12:30:10 +12:00
Aldo Cortesi
7a49cdfef3
More robust response handling.
2012-07-21 20:50:41 +12:00
Aldo Cortesi
3d9e8b2dbf
We shouldn't ever get a socket error emanating from netlib.
2012-07-20 15:21:36 +12:00
Aldo Cortesi
03f4dcc02b
Extend test suite to cover SSL. Log SSL connection errors.
2012-07-20 13:21:33 +12:00
Aldo Cortesi
76f0c3ea78
Handle invalid first line errors, add an error log buffer type.
2012-07-20 11:40:37 +12:00
Aldo Cortesi
2cb55ee0f5
Factor out request printing in to a method, and test it.
2012-06-30 10:51:13 +12:00
Aldo Cortesi
9588da4ab4
Catch errors that may happen on interpreter shutdown.
2012-06-27 16:15:22 +12:00
Aldo Cortesi
a68b4498b8
Allow naked value literal for pathoc path specifications.
2012-06-26 15:36:59 +12:00
Aldo Cortesi
33be5a72bf
Fixed the WSGI server hang in netlib, remove fudge.
2012-06-26 14:49:40 +12:00
Aldo Cortesi
15aab74ddb
Catch and log SSL connection errors. Improve log format.
2012-06-26 11:03:35 +12:00
Aldo Cortesi
f32258e8f7
Port pathoc to new netlib API. Add SNI.
2012-06-26 10:15:11 +12:00
Aldo Cortesi
8352c0278f
Handle client close more gracefully.
2012-06-25 11:34:29 +12:00
Aldo Cortesi
3d8610b6bc
Move server to new explicit netlib API.
2012-06-25 11:22:44 +12:00
Aldo Cortesi
15c48cfc5e
Simple HTTP connection keep-alive for pathod.
2012-06-24 23:11:25 +12:00
Aldo Cortesi
ddda57179a
read_headers now returns an ODictCaseless object.
2012-06-24 21:49:43 +12:00
Aldo Cortesi
65487ead6d
Logging truss for pathod.
2012-06-24 21:40:31 +12:00
Aldo Cortesi
d4ad3f0b2c
Refactor to extract ready_actions and write_values.
2012-06-24 17:01:04 +12:00
Aldo Cortesi
4fc64ac04f
Enable anchors on command line.
2012-06-24 16:38:32 +12:00
Aldo Cortesi
e6aa9ff675
Re-enable anchors.
2012-06-24 16:20:50 +12:00
Aldo Cortesi
2e558b7e9d
Fix disconnect, improve coverage, enable file value specifier.
2012-06-24 15:07:45 +12:00
Aldo Cortesi
cb2f11a68e
Bump version, adapt for API canges in netlib.
2012-06-23 14:06:54 +12:00
Aldo Cortesi
cd8fba1d70
Finalize porting built-in web app to Flask.
2012-06-21 16:54:49 +12:00
Aldo Cortesi
12c140b951
Restore client argument parsing. Add thread-safe logging subsystem.
2012-06-21 14:29:49 +12:00
Aldo Cortesi
1089a52f3d
Disconnect, rest refactoring.
2012-06-21 10:56:30 +12:00
Aldo Cortesi
de00497b40
Re-enable SSL service.
2012-06-20 10:59:38 +12:00
Aldo Cortesi
7922e70037
Basic response generation.
2012-06-20 10:51:37 +12:00
Aldo Cortesi
892ee2a904
Start porting web app to Flask.
2012-06-19 16:57:57 +12:00
Aldo Cortesi
a700721891
Porting to netlib proceeds apace.
2012-06-19 13:23:07 +12:00
Aldo Cortesi
bd99a13f39
Start refactoring towards netlib, adding SNI and client testing.
2012-06-17 07:57:24 +12:00
Aldo Cortesi
9ae53aecd0
We can't sensibly unit test pages withhout firing up a server.
...
We've just added functionality to do this ourselves, so rip out the old stuff.
2012-06-07 16:35:54 +12:00
Aldo Cortesi
26c8437e88
Better test daemon cleanup, improve utils test coverage.
2012-06-07 14:05:42 +12:00
Aldo Cortesi
34ffe46fa0
Add /api/info, returning general info on the running pathod daemon.
2012-06-07 11:39:37 +12:00
Aldo Cortesi
14b2a69d21
Start building a Pathod unit testing truss.
...
- Add test.py, which will house the testing API.
- Extend API with a shutdown method, used to terminate the test daemon.
- Refactor to allow clean shutdown.
2012-06-07 11:23:23 +12:00
Aldo Cortesi
b5a74a26ee
Let Pathod pick an arbitrary empty port if -p 0 is specified.
2012-06-07 10:17:30 +12:00
Aldo Cortesi
049d3d2b45
lippathod/app.py -> libpathod/pathod.py
2012-06-07 08:50:06 +12:00