aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/utils.py
Commit message (Collapse)AuthorAgeFilesLines
* suppress SPDY/HTTP2 announcement headers, fix #277Maximilian Hils2014-08-031-6/+0
|
* always use relative imports, fix status bar bugMaximilian Hils2014-03-101-0/+1
|
* add advanced proxying options, add SSL-terminating capability to mitmproxyMaximilian Hils2014-03-101-9/+0
|
* Silence pyflakesAldo Cortesi2014-01-191-1/+1
| | | | And pick up one bug as a consequence.
* utils: Add missing "B" for pretty_size()Kyle Manna2013-08-131-1/+1
| | | | * Add missing unit for megabytes, should print "MB".
* Remove GPL notices left in source files after our change to the MIT license.Aldo Cortesi2013-08-011-14/+0
| | | | Thanks to Roy Shamir for reporting this.
* Keep blank URL parametersEric Entzel2013-02-111-1/+1
| | | | TODO: This should probably be configurable
* Move cleanBin and hexdump into netutils.Aldo Cortesi2012-09-241-37/+0
|
* Add an "r" shortcut in grid editors to read value from file.Aldo Cortesi2012-08-251-1/+1
|
* Further content view cleaups.Aldo Cortesi2012-08-181-35/+0
|
* Huge cleanup of content viewers.Aldo Cortesi2012-08-181-2/+1
|
* Optional AMF decoding supportSahn Lam2012-08-171-0/+36
| | | | If PyAMF is installed, enable AMF decoding.
* Adapt for API changes in netlib.Aldo Cortesi2012-06-231-2/+2
|
* Extract protocol and tcp server implementations into netlib.Aldo Cortesi2012-06-191-4/+1
|
* Refactor protocol.py to remove dependence on flow and utils.Aldo Cortesi2012-06-171-26/+2
|
* Fix a crashing bug when replacing text in a flow with unicode bodies.Aldo Cortesi2012-05-251-1/+13
|
* Minor cruft removal.Aldo Cortesi2012-04-091-2/+2
|
* Integrate lxml for pretty-printing HTML and XML.Aldo Cortesi2012-04-071-45/+0
| | | | | Tackling the pretty-printing performance problem head-on, at the cost of a major dependency.
* Add a variant of cleanBin that escapes newlines and tabs.Aldo Cortesi2012-03-271-3/+10
| | | | Use this to fix the hex display option.
* Pretty view now indents Javascript.Aldo Cortesi2012-03-251-3/+2
| | | | Thanks to the JSBeautifier project, which is now included in the contrib directory.
* Refactor pretty view forcing somewhat.Aldo Cortesi2012-03-201-1/+1
| | | | | | | - Use a lookup table of content types -> view modes. - Add a urlencoded forcing. Remove "html" - at the moment it's the same as "xmlish". - Display type when forced.
* Add a simple parser for content type specifications.Aldo Cortesi2012-03-201-0/+27
|
* Specialize GridEditor into a number of subclasses.Aldo Cortesi2012-03-191-0/+1
|
* Factor out cert operations in to certutils.py.Aldo Cortesi2012-02-291-236/+2
|
* Fix cert generation harder.Aldo Cortesi2012-02-271-2/+2
|
* Fix problems with SANs and certificate generation.Aldo Cortesi2012-02-271-1/+9
|
* Better certificate parsing.Aldo Cortesi2012-02-271-3/+1
|
* Add upstream certificate lookup.Aldo Cortesi2012-02-271-4/+69
| | | | | | This initiates a connection to the server to obtain certificate information to generate interception certificates. At the moment, the information used is the Common Name, and the list of Subject Alternative Names.
* Firm up what we consider to be a valid proxy spec.Aldo Cortesi2012-02-181-1/+1
|
* Firm up reverse proxy specification.Aldo Cortesi2012-02-181-0/+17
| | | | | | - 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.
* Refactor reverse proxyingAldo Cortesi2012-02-181-1/+7
| | | | | | | - 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.
* Add get_query and set_query methods to Request.Aldo Cortesi2012-02-091-1/+11
|
* KVEditor: "e" shortcut spawns an external editor on a field.Aldo Cortesi2012-02-081-0/+12
|
* Address an issue that allows a malicious client to place certificate files ↵Aldo Cortesi2012-01-211-4/+5
| | | | | | in arbitrary directories. Thanks to David Black (disclosure@d1b.org) for pointing this out.
* Fix an issue caused by some editors when editing a request/response body.Aldo Cortesi2012-01-211-4/+1
| | | | | | Many editors make it hard save a file without a terminating newline on the last line. When editing message bodies, this can cause problems. For now, I just strip the newlines off the end of the body when we return from an editor.
* Add HTTP body size limit specification to command-line tools.Aldo Cortesi2011-09-091-0/+30
|
* Improve robustness against invalid data.Aldo Cortesi2011-09-051-2/+5
|
* Replaced unnecessary lists with generatorsAndrás Veres-Szentkirályi2011-08-181-2/+2
|
* Code cleanliness - appease pychecker.Aldo Cortesi2011-08-041-1/+1
|
* Move all HTTP objects to flow.pyAldo Cortesi2011-08-031-118/+26
| | | | That's Request, Response, ClientConnect, ClientDisconnect, Error, and Headers.
* Unit test++Aldo Cortesi2011-08-021-5/+4
|
* General cleanup.Aldo Cortesi2011-08-021-31/+7
| | | | | Cut out unused variables and code, generally shut up pychecker as much as is reasonable.
* Changes replace logic to function in both Python 2.6.x and 2.7.xStephen Altamirano2011-07-261-8/+8
| | | | 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
* Add utility functions to search and replace strings in flowsAldo Cortesi2011-07-221-0/+15
| | | | | | | | | | 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
* Drop cert expiry time to avoid a bug in some OpenSSL versions.Aldo Cortesi2011-07-221-3/+4
|
* Add a pretty-printing mode for urlencoded form data.Aldo Cortesi2011-07-151-1/+6
|
* Rewrite Headers object to preserve order and case.Aldo Cortesi2011-07-141-98/+56
|
* JSON pretty-printing.Aldo Cortesi2011-06-301-0/+9
| | | | | Also rename the display modes ("pretty" instead of "indent"), and expand the built-in documentation.
* Make the certificate wait time configurable.Aldo Cortesi2011-06-271-1/+0
| | | | | | | | | Since OpenSSL doesn't let us set certificate start times in the past, the client and proxy machine time must be synchronized, or the client might reject the certificate. We can bodgy over small discrepancies by waiting a few seconds after a new certificate is generated (i.e. the first time an SSL domain is contacted). Make this a configurable option, and turn it off by default.
* Try not to hang when user views large request & response bodiesAldo Cortesi2011-06-271-1/+12
| | | | | | | | | | Two different strategies here: - Use a simple heuristic to detect if we're looking at XML data when indent mode is used. On non-XML data we can hang even on small documents. - Only view partial data for large bodies. At the moment the cutoff is 100k. I might finetune this later.