Aldo Cortesi
d8b79e9982
Scripts to reproducibly generate the test certificate
2015-04-19 10:12:15 +12:00
Aldo Cortesi
baf961cde0
Unit test++ for PathodSpec
2015-04-18 16:36:45 +12:00
Aldo Cortesi
ef8e02edc3
Fix test that fails on Travis with a bodge
...
Circumvents a platform difference causing a test failure.
2015-04-17 18:02:03 +12:00
Aldo Cortesi
3061bdd0c2
Unit tests: cmdline.pathod
2015-04-17 18:00:46 +12:00
Aldo Cortesi
f8e95db6b0
housekeeping: ++tests, coverage annotations
2015-04-17 17:45:50 +12:00
Aldo Cortesi
fe8e27f27b
Housekeeping: .env and fix unit tests
2015-04-17 15:27:50 +12:00
Aldo Cortesi
27c7e9e934
Fix unit tests
2014-11-11 13:34:02 +13:00
Aldo Cortesi
bd1f7ebb5c
Improve netability of grammars
2014-10-26 16:27:25 +13:00
Aldo Cortesi
974bd9d0f9
Resolve a quoting ambiguity in nested response specs
2014-10-26 12:56:28 +13:00
Aldo Cortesi
fc1fc80469
Allow nesting of pathod response specs in pathoc specs
...
This opens the door to really neat, repeatable, client-side driven
fuzzing, especially of proxies.
2014-10-26 10:50:32 +13:00
Aldo Cortesi
fc4f9a1c7a
pathoc -n 0 repeats forever
2014-10-25 17:58:59 +13:00
Aldo Cortesi
609d6eab30
Make grammar less ambiguous for multi-pattern files
2014-10-25 17:27:08 +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
d4e6c25d45
Update pyparsing
2014-10-25 15:37:57 +13:00
Aldo Cortesi
00d0ee5ad5
Parse patterns eagerly on instantiation
2014-10-25 15:30:54 +13:00
Aldo Cortesi
d6ee532711
Whitespace and formatting
2014-10-25 14:24:05 +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
0426eccfd8
fix tests
2014-09-28 03:55:16 +02:00
Aldo Cortesi
14d7beee13
Merge pull request #16 from mitmproxy/dist
...
improve distribution
2014-09-08 20:40:36 +12:00
Aldo Cortesi
c198406b12
Silence insecure requets warnings in our test package
2014-09-07 11:38:44 +12:00
Maximilian Hils
8d647739c3
Merge branch 'master' into dist
...
Conflicts:
requirements.txt
setup.py
2014-08-31 01:31:14 +02:00
Maximilian Hils
e9a838ae53
fix tests to be compatible with the latest requests version
2014-08-31 01:28:51 +02:00
Maximilian Hils
e75f3746bb
try harder to fix travis
2014-08-30 18:07:13 +02:00
Aldo Cortesi
ca97aed4b8
Adjust timeout test to make race condition much less likely.
2014-03-10 17:19:46 +13: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
53334e437c
pathoc -S dumps information on the remote SSL certificate chain
2014-03-02 19:04:56 +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
Maximilian Hils
b994fb5a27
adjust to signature changes in netlib.tcp
2014-01-28 19:28:20 +01:00
Maximilian Hils
ea894282f3
move test requirements out of main requirements.txt
2014-01-28 03:21:59 +01: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
Maximilian Hils
e0d376381e
fix windows compatibility
2013-12-16 04:47:29 +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
0382b809ea
always read files in binary mode
2013-06-16 00:30:13 +02:00
Aldo Cortesi
5eeb52183a
Adapt for new request_client_cert option in netlib.
2013-05-13 09:03:48 +12:00
Aldo Cortesi
0504bcfd96
Changelog, minor cleanups.
2013-04-30 09:32:11 +12:00
Aldo Cortesi
110a8bb594
Print pathod craft explanations to stdout.
2013-03-03 16:33:50 +13: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
9c9e15341f
Make last_log return None if nothing is logged.
2013-02-23 21:46:01 +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
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
c744ef2dcb
Proxy mode: drop to SSL if we see an HTTP CONNECT request
2013-01-05 17:15:42 +13:00
Aldo Cortesi
3886ccae93
Provisional proxy mode support for pathod.
2013-01-05 15:25:09 +13:00
Aldo Cortesi
d7f641c6ee
Shift SSL parameters into Pathoc class
2013-01-04 10:37:26 +13:00
Aldo Cortesi
781592d6c0
Fix timeout test.
2012-11-18 09:34:15 +13:00
Aldo Cortesi
e40482576c
Add disconnect specifiers to test suite.
...
Fixes hangs seen in test suite with recent versions of requetss.
2012-11-18 09:04:49 +13:00
Aldo Cortesi
af698b2fda
:u belongs on Request not Response
2012-11-16 14:41:02 +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
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
8c6cc8140c
Fix generated values in request path specification.
2012-10-31 09:48:55 +13:00
Aldo Cortesi
0c9cfb3f38
Add a .freeze() method to all components.
...
This expands and freezes all randomly generated values. The message returned
can be queried for a precise spec to reproduce the message.
2012-10-31 09:32:21 +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
a09584b9e6
Make Message classes more self-contained.
2012-10-30 15:22:53 +13:00
Aldo Cortesi
b2deb470de
Extract .serve() method from message classes.
2012-10-30 14:46:18 +13:00
Aldo Cortesi
677f0e0580
Change preview_safe to return a safe copy of the current message.
2012-10-30 13:36:32 +13:00
Aldo Cortesi
a1f782b543
Simplify Request/Response class hierarchy.
2012-10-30 13:28:22 +13:00
Aldo Cortesi
3e0cd6442a
Add .spec methods for Request and Response objects.
2012-10-29 17:33:10 +13:00
Aldo Cortesi
747eafd107
Add a .spec method to the token ABC, and to all tokens.
2012-10-29 16:31:35 +13:00
Aldo Cortesi
8741600ce7
Refactoring: canonical storage of a message is now the sequence of tokens that defines it.
...
We use a set of accessor properties to ease access to tokens. We can now ditch
the .accept() methods.
2012-10-29 15:16:44 +13:00
Aldo Cortesi
882969086c
Cleaup, some more ABCs.
2012-10-29 10:19:58 +13:00
Aldo Cortesi
61f8992fbf
Change response spec format to code[:features]
...
Reason message is now specified as just another feature with the "m" mnemonic.
2012-10-28 22:18:06 +13:00
Aldo Cortesi
07560ffe30
Cleaup, ABC for Value classes.
2012-10-28 22:00:19 +13:00
Aldo Cortesi
35f37626a9
Clean up .accept() signature.
2012-10-28 17:39:58 +13:00
Aldo Cortesi
7d74f75f6d
Split Code and Reason into separate _Component objects.
2012-10-28 17:07:16 +13:00
Aldo Cortesi
e9af434c2b
.body and .method to lazy generator instantiation.
...
Also introduce a _Component ABC.
2012-10-28 14:15:29 +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
c684f7417d
Extend Action and Value classes
...
- Values now know how to print their own specs
- Actions now know how to print their own specs
- Actions have a resolve_offset method that resolves relative and random offsets.
2012-10-24 11:32:53 +13:00
Aldo Cortesi
e83392bfc8
Start making Action objects more sophisticated.
2012-10-05 11:23:30 +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
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
8bb81be2b0
Add pathoc -T to ignore timeouts.
...
Also move -c to -C for consistency.
2012-09-28 11:38:49 +12:00
Aldo Cortesi
7209a75201
Add pathoc -c to specify a list of return codes to ignore.
2012-09-27 09:44:25 +12:00
Aldo Cortesi
10a19fc4da
Refactor print_requests -> print_request
...
- Change to handle one request at a time
- Shift error handling around
2012-09-26 14:25:39 +12:00
Aldo Cortesi
b67d99638a
Response printing
...
Options to output full response, as sniffed from the socket.
2012-09-26 11:07:22 +12:00
Aldo Cortesi
a69d602087
Hex and verbatim output of requests.
...
This works by sniffing traffic through the socket, so always gives us the exact
traffic sent upstream.
2012-09-26 10:38:47 +12:00
Aldo Cortesi
0a5d4fbbbb
Stub out new output argument structure.
2012-09-26 10:12:30 +12:00
Aldo Cortesi
2f7188164c
Download page, MANIFEST.in
2012-08-23 12:54:58 +12:00
Aldo Cortesi
fde65270af
Testing examples and docs.
2012-07-30 20:58:59 +12:00
Aldo Cortesi
e52a37ffa9
Cleanup of libpathod.test, test example for front page.
2012-07-30 17:29:36 +12:00
Aldo Cortesi
e26aac1d3c
100% test coverage.
2012-07-30 13:52:40 +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
eb43291b3c
Note that pauses are skipped during previews.
2012-07-25 12:49:22 +12:00
Aldo Cortesi
24f69419df
Unit test about page.
2012-07-25 12:39:51 +12:00
Aldo Cortesi
e7e6a60246
Nicer error for empty preview spec submission.
2012-07-25 10:55:00 +12:00
Aldo Cortesi
59f408dcf4
Refine parse error message a bit.
2012-07-25 10:44:21 +12:00
Aldo Cortesi
8cfbc2f80e
Refactor test.py, add unit tests for app.py corner case.
2012-07-25 10:34:57 +12:00