Commit Graph

2172 Commits

Author SHA1 Message Date
Maximilian Hils d17b9d6230
make mypy happy 2019-11-16 13:54:44 +01:00
Maximilian Hils ee92477c1b
fix lint 2019-11-16 13:20:17 +01:00
Maximilian Hils bccee15dcb
minor type fixes 2019-11-16 12:09:38 +01:00
Maximilian Hils 8158349db5
Merge branch 'master' into master 2019-11-16 12:07:22 +01:00
Maximilian Hils d1eec4d807
Merge pull request #3705 from mhils/issue-3469
Fix #3469
2019-11-16 12:06:13 +01:00
Maximilian Hils 2d01c81c1f
Merge pull request #3700 from Jessonsotoventura/confirm_quit
Ctrl-C should prompt the user before exiting
2019-11-16 12:04:59 +01:00
Maximilian Hils 5c0be1de4a
Merge pull request #3448 from cript0nauta/master
Fix command injection vulnerability when exporting to curl or httpie
2019-11-16 12:03:34 +01:00
Michael McKeirnan a6e8b930c9 Adding raw_request and raw_response to export
This is a proposed change for
https://github.com/mitmproxy/mitmproxy/issues/3701 which alters the
behavior of a raw http export to include both the request and the
response. Additionally, this introduces two new export options
"raw_request" and "raw_response" which allow for exporting the raw HTTP
request or response individually.
2019-11-16 01:20:50 -08:00
Jesson Soto Ventura 5cb1746ef6 used getattr to select exit 2019-11-15 23:22:38 -05:00
Maximilian Hils 248034c528 tests++ 2019-11-15 21:17:29 +01:00
Maximilian Hils 8f2cee7225 fix #3469 2019-11-15 21:00:47 +01:00
Maximilian Hils 484e099eb1 test coverage++ 2019-11-15 20:57:03 +01:00
Maximilian Hils 698f7e2e17
Merge pull request #3420 from rjt-gupta/multipart-fix
multipart-fix
2019-11-15 19:04:47 +01:00
Maximilian Hils a79e0a0868
Merge pull request #3522 from peter-way/master
Use 'host_header' instead of 'host', to calculate 'HTTPRequest' hash in transparent mode.
2019-11-15 19:04:14 +01:00
Maximilian Hils 01ddda75e8 improve curl/httpie export 2019-11-15 19:02:59 +01:00
Maximilian Hils 0873566ff0 Merge remote-tracking branch 'origin/master' into pr-3448 2019-11-15 18:10:42 +01:00
Maximilian Hils fbbbbb678e
Merge pull request #3612 from ccssrryy/fix-dup-resp
fix duplicate error response
2019-11-15 17:45:28 +01:00
Maximilian Hils 50443df340
Merge branch 'master' into master 2019-11-15 17:24:59 +01:00
Maximilian Hils f6f9eb2c4e
Merge pull request #3425 from rjt-gupta/external-viewer
external-viewer-fix
2019-11-15 17:23:01 +01:00
Maximilian Hils f8926170a5
remove superfluous option 2019-11-15 17:22:41 +01:00
Jurriaan Bremer a5412ab136 allow server replay functionality to run on a different port
By providing the "server_replay_ignore_port" configuration value we're
able to run mitmproxy in server replay mode on a different port than
the web server in the flows was originally running. This is also useful
in case multiple ports are present in a flow (I suspect).
2019-11-15 16:15:13 +01:00
Michael McKeirnan dae01ad623 Adding export raw http response
Adding a new export type for raw http response, and changing export raw to export
raw_request to distinguish between the two. This is a proposed change for https://github.com/mitmproxy/mitmproxy/issues/3701
2019-11-15 01:21:54 -08:00
Jesson Soto Ventura b3dac13184 ctrl-c should prompt for an exit 2019-11-14 20:43:27 -05:00
Maximilian Hils 2239c49e18 improve flowfilter 2019-11-15 02:28:57 +01:00
Maximilian Hils cd660a035f
Merge pull request #3697 from ylmrx/issue_3639-yml_extension_allowed
adding config.yml as an allowed config filename
2019-11-15 00:31:19 +01:00
Maximilian Hils c78165bd4c
simplify option file loading
- no need for a constant that is only used once
- if load_paths allows us to specify multiple paths, let's just do that.
2019-11-14 21:12:32 +01:00
Yoann L 9a1ec6b064 Fixes #3694 2019-11-14 18:59:43 +01:00
Yoann L 836e04abd6 adding config.yml as an allowed config filename
cf. title

as suggested in #3639
2019-11-14 18:39:06 +01:00
Maximilian Hils dac0bfe786
Merge pull request #3691 from mhils/sans-io-adjustments
Update mypy, sans-io adjustments
2019-11-12 05:04:05 +01:00
Maximilian Hils bdc15cbe0c update mypy 2019-11-12 04:38:13 +01:00
Maximilian Hils f97996126f minor improvements and sans-io adjustments 2019-11-11 18:35:06 +01:00
Maximilian Hils 8e64ac0575
Merge pull request #3679 from tomlabaude/pf_ipv6
Added support for IPv6 in pf.py for macOS
2019-11-07 18:32:26 +01:00
Maximilian Hils 80963966b2 make duration formatting more forgiving 2019-11-07 18:19:50 +01:00
Tom 93c103a2a2 Fixed lint 2019-11-05 20:27:00 +01:00
Tom d35c00ee65 Added support for IPv6 in pf.py for macOS 2019-11-05 20:27:00 +01:00
Maximilian Hils 37994fb12f
Merge pull request #3675 from ylmrx/crash_on_replay-3559
fixes #3559
2019-11-04 13:20:21 +01:00
Yoann L 1469678b99 take no action if on `Host` if `:authority` isn't found 2019-11-04 12:26:21 +01:00
Maximilian Hils fcccab684d
simplify condition 2019-10-29 16:15:07 +01:00
Yoann L 6da1db750c missed a type ignore, for mypy compliance 2019-10-29 12:38:11 +01:00
Yoann L 4383122b7b several fixes on command exports has several problems: #3676
* authority can usually rely on actual URL. as `:authority` headers will
break curl command. (advise if it's better to change them to Host, or if
it should be reported on curl side)
* `content-length`: 0 is added for each request. if it's found in the
curl argument list, it'll try to fetch an empty body (and crash).
also trying to guess on accept-encoding header to add the
`--compress` option when fetching potentially compressed content.
* ditto for httpie
* factorize it into raise_if_missing_request (and rename it)
2019-10-29 12:24:07 +01:00
Yoann L 3370740361 several fixes on command exports has several problems: #3676
* authority can usually rely on actual URL. as `:authority` headers will
break curl command. (advise if it's better to change them to Host, or if
it should be reported on curl side)
* `content-length`: 0 is added for each request. if it's found in the
curl argument list, it'll try to fetch an empty body (and crash).
also trying to guess on accept-encoding header to add the
`--compress` option when fetching potentially compressed content.
* ditto for httpie
2019-10-28 17:51:59 +01:00
Yoann L ad120c380a fixes #3559
if the `:authority` header is not found, we can try to guess it from
variable `flow.request.pretty_host` as .pop() accepts a fallback
parameter
2019-10-25 10:38:35 +02:00
Maximilian Hils 063ff41858 add http message type hints 2019-10-16 20:33:09 +02:00
Maximilian Hils 902ef59d01
Move onboardingapp from tornado to flask (#3661) 2019-10-06 14:41:46 +02:00
vin01 ed65476b21
Add EKU extension for dummy certificates 2019-10-03 10:23:45 +02:00
vin01 93f9e30728 Add key_size option to define rsa key size (#3657) 2019-09-30 19:19:52 +02:00
Thomas Kriechbaumer 42d5da0123
Merge pull request #3560 from travelperk/add-refresh-option
Add refresh option to disable cookies
2019-09-28 13:34:00 +02:00
Thomas Kriechbaumer bb356d89e0
Merge pull request #3594 from Jessonsotoventura/open_editor
Edit URLs in external editor
2019-09-28 13:31:29 +02:00
Thomas Kriechbaumer 7d60dde76c
Merge pull request #3464 from rjt-gupta/url-fix
Non ascii characters in url
2019-09-28 11:46:58 +02:00
Thomas Kriechbaumer 76bd3ef82d
Merge pull request #3486 from rjt-gupta/unicode-filter
filter unicode fix
2019-09-28 11:44:15 +02:00