Aldo Cortesi
a4270efaf2
Always return an ODict from get_query
2012-02-21 13:00:45 +13:00
Aldo Cortesi
dbd75e02f7
Create ODictCaseless for headers, use vanilla ODict for everything else.
2012-02-20 11:29:36 +13:00
Aldo Cortesi
18029df99c
Use ODict for request.get_form_urlencoded and set_form_urlencoded
2012-02-20 11:13:35 +13:00
Aldo Cortesi
fa11b7c9be
Use ODict for Request.get_query and Request.set_query
2012-02-20 10:44:47 +13:00
Aldo Cortesi
2616f490fe
Rename Headers class to ODict
...
ODict is an ordered dictionary class that will be useful in many other parts of
our API.
2012-02-20 10:39:00 +13:00
Aldo Cortesi
25a06c3ec1
Minor doc fixes and import cleanups.
2012-02-20 10:15:58 +13:00
Aldo Cortesi
77a33c441b
Add duplicate_flow and replay_request hooks to ScriptContext.
2012-02-19 11:29:49 +13:00
Aldo Cortesi
d32d6bc5e3
Add "p" key binding to connection list view to copy a flow.
2012-02-19 00:17:47 +13:00
Aldo Cortesi
8ddc3b4ef2
Add API for duplicating flows.
2012-02-18 23:56:40 +13:00
Aldo Cortesi
6ad8b1a15d
Firm up reverse proxy specification.
...
- Extract proxy spec parsing and unparsing functions.
- Add a status indicator in mitmproxy.
- Add the "R" keybinding for changing the reverse proxy from within mitmproxy.
2012-02-18 16:27:09 +13:00
Aldo Cortesi
a7df6e1503
Refactor reverse proxying
...
- Retain the specification from the Host header as a Request's description.
- Expand upstream proxy specifications to include the scheme. We now say https://hostname:port
- Move the "R" revert keybinding to "v" to make room for a reverse proxy
binding that matches the command-line flag.
2012-02-18 14:45:22 +13:00
Aldo Cortesi
14def89f50
Fix a problem in deserialization of flows with errors.
2012-02-18 12:25:22 +13:00
Aldo Cortesi
1ad7e91527
Make filter matching act more sensibly.
2012-02-10 15:31:45 +13:00
Aldo Cortesi
5f785e26b9
Add filter for detecting flows with errors.
...
Also, remove dependency on weird _is_response method.
2012-02-10 15:22:26 +13:00
Aldo Cortesi
b14c29b25c
Expand test coverage.
2012-02-10 15:04:20 +13:00
Aldo Cortesi
5326b7610a
Enable editing of urlencoded form data with KVEditor.
2012-02-10 14:35:23 +13:00
Aldo Cortesi
9c985f2d20
Methods for getting and setting form urlencoded data on Request.
2012-02-10 14:27:39 +13:00
Aldo Cortesi
2709441d5b
Add get_query and set_query methods to Request.
2012-02-09 16:40:31 +13:00
Aldo Cortesi
4b9ee4c31e
Very basic KV editor mockup.
2012-02-06 09:49:49 +13:00
Aldo Cortesi
3b246f7e27
Simple fix for a unicode error when editing a request URL.
2011-10-26 14:49:15 +13:00
Aldo Cortesi
d9db1cf5b3
Change size limit cmdline flag to -Z, enable size limits for replay.
2011-09-09 17:31:36 +12:00
Aldo Cortesi
67f2610032
Add HTTP body size limit specification to command-line tools.
2011-09-09 15:27:31 +12:00
Aldo Cortesi
4ac59a7859
Fix a rare crash in sticky cookies.
2011-08-26 18:03:03 +12:00
Aldo Cortesi
8fbba59e8d
Fix a problem with sticky cookie domain matching.
...
Just like everything else cookie-related in the standard library,
cookielib.domain_match is fucked up.
2011-08-26 17:37:12 +12:00
Aldo Cortesi
45f4768a5c
Add attribution and license for tnetstring.py
2011-08-19 21:53:52 +12:00
Aldo Cortesi
a566684e32
Move to typed netstrings for serialization.
...
This change is backwards incompatible with the old serialization format!
2011-08-19 21:30:24 +12:00
András Veres-Szentkirályi
b1dc418a53
Replaced unnecessary lists with generators
2011-08-18 23:29:57 +02:00
Aldo Cortesi
f23818ceea
Add a "done" event for scripts.
...
Called exactly once after all other events.
2011-08-05 14:08:03 +12:00
Aldo Cortesi
87623a8d75
Rip out autodecode
...
We simplify things as follows:
- If we're in "pretty" view mode, we autodecode.
- Otherwise, we display raw data, and the user can manually encode/decode
with z shortcut.
2011-08-04 10:54:42 +12:00
Aldo Cortesi
b51aac8a86
Code cleanliness - appease pychecker.
2011-08-04 10:34:34 +12:00
Aldo Cortesi
730c78ac53
Move script.Context to flow.ScriptContext
2011-08-04 10:14:44 +12:00
Aldo Cortesi
1662b8505b
Clean pydoc profile for flow.Flow
2011-08-04 09:56:44 +12:00
Aldo Cortesi
8ef208a9e2
Clean pydoc profile for flow.Response, flow.Error
2011-08-04 09:44:48 +12:00
Aldo Cortesi
7a3b871b33
Request class now has a clean pydoc profile.
2011-08-04 09:26:26 +12:00
Aldo Cortesi
0760607a7d
Further interface cleaning.
2011-08-03 23:02:33 +12:00
Aldo Cortesi
9042d3f3b9
Clean up interfaces by making some methods pseudo-private.
2011-08-03 22:48:57 +12:00
Aldo Cortesi
57c653be5f
Move all HTTP objects to flow.py
...
That's Request, Response, ClientConnect, ClientDisconnect, Error, and Headers.
2011-08-03 22:41:38 +12:00
Aldo Cortesi
e337682d8e
Enable "|" command to run a oneshot script on a single flow.
2011-08-03 17:35:18 +12:00
Aldo Cortesi
179cf75862
Add script hooks, enable new engine for mitmdump.
2011-08-03 16:36:20 +12:00
Aldo Cortesi
f7e4e89b12
Move the event notification mechanism into flow.py
2011-08-03 13:33:18 +12:00
Aldo Cortesi
12d2b1f926
Rip out old script interface, start replacing with new stubs.
...
Scripts are broken for now.
2011-08-03 13:20:36 +12:00
Aldo Cortesi
8cc0469ee7
Tweak encoding behaviour
...
- Don't fail to identity encoding when an unknown encoding is specified.
- Don't constrain encodings. I want to try to modify traffic as little as
possible by default.
- When decoding, delete content-encoding header rather than set it to "identity"
- Refuse to decode/encode when there is an existing but unknown
content-encoding header.
2011-08-02 20:42:46 +12:00
Aldo Cortesi
357502fe03
General cleanup.
...
Cut out unused variables and code, generally shut up pychecker as much as is
reasonable.
2011-08-02 16:14:33 +12:00
Aldo Cortesi
f3742f29da
We no longer need to track clientconnections.
2011-08-02 14:56:09 +12:00
Aldo Cortesi
675b3133b4
Improve performance of loading flows from a file hugely.
...
Fell into the "expensive __eq__ method" trap. Oh, Python, you little scamp.
2011-08-01 11:26:09 +12:00
Aldo Cortesi
43f1c72511
Refactor the way we calculate views of the flow list.
...
The naive approach we used before recalculated the view on every access, and
consequently had serious performance problems.
2011-08-01 11:17:01 +12:00
Stephen Altamirano
78049abac1
Changes replace logic to function in both Python 2.6.x and 2.7.x
...
Tests now only assume Python 2.6.x rather than requiring 2.7.x. This does not preclude the use of flags as a kwarg in replace
2011-07-26 22:47:08 -07:00
Aldo Cortesi
e6288e2d07
Fix crash when sticky cookies are read from file.
...
Cookielib expects strings, not unicode.
2011-07-24 16:08:27 +12:00
Aldo Cortesi
1b961fc4ad
Add utility functions to search and replace strings in flows
...
This is a common task in pentesting scenarios. This commit adds the following
functions:
utils.Headers.replace
proxy.Request.replace
proxy.Response.replace
flow.Flow.replace
2011-07-22 17:48:42 +12:00
Stephen Altamirano
74d8b18408
Removes should_autodecode attribute from Response. Adds commandline option 'd' to toggle autodecode, adds togglable option 'd' to do the same
2011-07-21 20:22:13 -07:00