Commit Graph

8401 Commits

Author SHA1 Message Date
Maximilian Hils
7bf06f8ae0 fix coverage 2019-11-18 05:19:06 +01:00
Maximilian Hils
dd556f052b coverage++ 2019-11-18 04:34:23 +01:00
Maximilian Hils
da0755106d adjust test 2019-11-18 03:54:18 +01:00
Maximilian Hils
f75a95acea fix vararg handling 2019-11-18 03:45:16 +01:00
Maximilian Hils
cb723c53fa revamp command processing
- Display the parameter name instead of the parameter type
  whenver users interact with commands. This makes it easy to
  enter commands just by their signature. We may want to expose type
  information in the command list, but some quick testing showed that
  this are rather intuitive anyways.
- Add shift tab backward cycling for the command completion.
- Use inspect.Signature instead of homebrew argument matching solution.
  This gets rid of quite a bit of cruft.
- Remove some type checking hacks in mitmproxy.types
2019-11-18 03:05:41 +01:00
Maximilian Hils
8a6370f1c2 make command parameter names more descriptive 2019-11-18 02:55:37 +01:00
Maximilian Hils
cb22fc68d1 adjust remote debug example to latest pycharm version 2019-11-18 02:52:20 +01:00
Henrique
8b52ea248e Added coverage for the changes made 2019-11-17 11:26:20 -05:00
Henrique
39a6d4860c Fixed issue with string parameters between quotes that do not have a
space
2019-11-17 10:24:49 -05:00
Henrique
fbcaab2aba Added return signature to methods on commander.py 2019-11-16 20:15:27 -05:00
Henrique
13fe07f48f Brought coverage up to 94% on test_commander.py 2019-11-16 20:14:38 -05:00
Henrique
7779eef572 Various changes to address PR comments
Made a change to make `CommandManager.execute` the main entry point for
executing commands and made `call_strings` into a private method.
2019-11-16 17:01:47 -05:00
Henrique
373cc945c0 Removing dead code 2019-11-16 13:14:57 -05:00
Henrique
a0ef36727e Forgot to remove the empty _parse_cmd function 2019-11-16 09:18:32 -05:00
Henrique
79caf3a458 Fixing issues pointed during PR review 2019-11-16 09:16:50 -05:00
Maximilian Hils
ac22aee2f5 cleanup mypy usage 2019-11-16 15:14:30 +01:00
Maximilian Hils
d17b9d6230
make mypy happy 2019-11-16 13:54:44 +01:00
Maximilian Hils
a799fddee1
Merge pull request #3702 from mckeimic/master
Adding export raw http response
2019-11-16 13:20:28 +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
Henrique
a244ece0e5 Removed useless else that prevented 100% code coverage 2019-11-15 18:15:56 -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
Henrique
20bd33499f Small fix for 100% coverage 2019-11-15 14:09:05 -05:00
Henrique M. D
021a141521
Merge branch 'master' into fix-command-bar-issue-3259 2019-11-15 13:59:57 -05:00
Henrique
8972250167 Removed the custom lexer in favor of using pyparsing. 2019-11-15 13:07:12 -05: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
Maximilian Hils
4f81f1ee41
Merge pull request #3703 from mhils/replay-ignore-port
allow server replay functionality to run on a different port
2019-11-15 17:13:00 +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
Maximilian Hils
be2865cd79
Merge pull request #3699 from mhils/flowfilter2019
Improve flowfilter
2019-11-15 15:57:28 +01:00
Maximilian Hils
be46008b5e disable overly strict indentation checks 2019-11-15 15:56:55 +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