Commit Graph

6315 Commits

Author SHA1 Message Date
David Shaw
5d82068218 Updated for python 3 2017-03-06 17:30:40 -05:00
Aldo Cortesi
d13df40753 Fix lint 2017-03-07 10:52:28 +13:00
Aldo Cortesi
3d9c2233be Flatten commandline arg structure, extract common run func for tools 2017-03-07 10:51:24 +13:00
Aldo Cortesi
b51df9a0b1 Cleanups and test coverage 2017-03-07 10:28:15 +13:00
Aldo Cortesi
2312cf6fb0 Automate slurping up command-line options
Now that options are completely regular, we can automate reading them out of
arguments, rather than listing them out by hand like savages.
2017-03-07 08:49:19 +13:00
Thomas Kriechbaumer
3b4d8d6eca clearly indentify git-checkout as dev version 2017-03-06 18:40:43 +01:00
lymanZerga11
fd5079b8a6 Update flowlist.py 2017-03-06 23:19:39 +08:00
Aldo Cortesi
edfd62e42a Replacements and setheaders are always strings
Instead of having two representations we have one canonical specification.
Fixing the editor in console is left ot a further patch.
2017-03-06 20:58:51 +13:00
Aldo Cortesi
82163a1e68 Unify mode specification
We now have:

    --mode regular (the default)
    --mode transparent
    --mode socks5
    --mode reverse:SPEC
    --mode upstream:SPEC

Where SPEC is a host specification.
2017-03-06 20:30:49 +13:00
Sachin Kelkar
fa96a1d1ef web: Add websocket filter 2017-03-06 10:20:11 +05:30
Aldo Cortesi
f5fb6972aa Options unification: certs
- Regularise to Sequence[str]
- Move conversion and checking into proxy config object
2017-03-06 15:36:52 +13:00
Aldo Cortesi
9b1f40da37 Options unification: streamfile
We now have one option to control this. If the path is prefixed with a "+" we
append, otherwise we overwrite.
2017-03-06 13:48:37 +13:00
Aldo Cortesi
71a830c836 Options unification: string choices 2017-03-06 13:20:17 +13:00
Aldo Cortesi
e70b46672c Options unification: simple string sequences 2017-03-06 11:56:11 +13:00
Aldo Cortesi
18a6b66ba4 Options unification: simple strings
Move all simple string options to the new scheme. Also regularise some names.
2017-03-06 11:39:19 +13:00
Aldo Cortesi
201c65960e Options unification: sizes
Start dealing with corner cases:

- Sizes are always stored in options as strings
- Add a new core addon that's responsible for verifying settings that don't
belong to an addon
- Add a _processed scratch space on the Options object for processed core
values to be stored in. This is pretty dirty, but less dirty than re-parsing
values every time. We'll come up with something better down the track.
2017-03-06 09:07:16 +13:00
Maximilian Hils
22154dee5c Merge pull request #2085 from MatthewShao/dev
[web] Add mouse support for FilterInput popover.
2017-03-05 13:07:54 +01:00
Aldo Cortesi
45d18ac8cb Start unifying options and the command-line: ints
Moves all integer options apart from a few tricky ones like verbosity over to
auto generation. Also add a metavar argument to parser generation to support
this.
2017-03-05 20:45:55 +13:00
Aldo Cortesi
f15a628561 Start unifying options and the command-line: booleans
This commit:

- Adds a help field to options
- Adds a function to generate parser definitions from options
- Uses this to migrate all boolean flags over to the new system
- Makes all booleans consistently follow the --foo/--not-foo convention

There are a number of things left to be done here:

- Argparse doesn't give us a nice way to format --foo --not-foo help. Click
does, and moving to click is a goal down the track.
- For now, we remove all short aliases. I want to re-evaluate these
systematically once we have the new structure in place.
2017-03-05 20:16:33 +13:00
Aldo Cortesi
67381ae550 Revamp options
- Options are now explicitly initialized with an add_option method
- We have one canonical Options class - ditch dump.Options
2017-03-05 15:10:03 +13:00
Clemens Brunner
e0644398b6 Merge pull request #2095 from MatthewShao/fix-#2083
[web] fix scroll bug in flow detail. (#2083)
2017-03-04 17:04:44 +01:00
Matthew Shao
6a3497f09c [web] Retain focus on input field after selecting. (#2085) 2017-03-04 22:44:13 +08:00
Maximilian Hils
2a1ed7f3eb Merge pull request #2082 from tarnacious/master
Call error handler and mark flow on HTTPException
2017-03-04 15:12:29 +01:00
Matthew Shao
9f348122ec [web] fix scroll bug in flow detail. (#2083) 2017-03-04 21:14:46 +08:00
Maximilian Hils
1bafe73a94 update release docs 2017-03-04 11:50:40 +01:00
Maximilian Hils
f71c11559c Merge pull request #2081 from s4chin/add-pretty-host
web: Fix #1888
2017-03-04 11:48:05 +01:00
Maximilian Hils
78fd5a9dad Merge pull request #2053 from krsoninikhil/on-issues
Adds --keep-host-header option (#2039)
2017-03-04 11:42:44 +01:00
Maximilian Hils
50ebdf3081 update docs wording 2017-03-04 11:42:30 +01:00
Sachin Kelkar
40943f5618 web: Fix #1888 2017-03-03 16:14:20 +05:30
Nikhil Soni
0081d9b828 Merge branch 'master' into on-issues 2017-03-03 12:58:44 +05:30
Nikhil Soni
3da8532bed Adds test for --keep-host-header 2017-03-03 12:34:36 +05:30
Nikhil Soni
317d183ba4 Changes dns_spoofing example to use --keep-host-header 2017-03-03 12:34:36 +05:30
Nikhil Soni
2e90373e4b Updates help msg and docs for --keep-host-header 2017-03-03 12:34:20 +05:30
Matthew Shao
6479bd4e76 [web] Simplify the code. (#2085) 2017-03-03 09:16:26 +08:00
Maximilian Hils
f1417dd859 pathoc: fix documentation for headers 2017-03-02 19:24:48 +01:00
Maximilian Hils
bae4cdf8d5 docs: fix cert install link 2017-03-02 19:10:11 +01:00
Maximilian Hils
b6eda9ed0a docs: http -> https where possible 2017-03-02 19:09:14 +01:00
Maximilian Hils
182c1adf7d Merge pull request #2087 from TomTasche/patch-1
link to stackoverflow for chrome certificate management
2017-03-02 19:04:36 +01:00
Thomas Taschauer
fc9b152d06 link to stackoverflow for chrome certificate management 2017-03-02 14:31:41 +01:00
Matthew Shao
c397a21980 [web] Add mouse support for FilterInput popover. 2017-03-02 11:09:13 +08:00
tarnacious
fc3848345b Call error handler and mark flow on HTTPException
This allows scripts to handle HTTPExceptions such as "HTTP Body too
large" raised in mitmproxy/net/http/http1/read.py:131
2017-03-01 16:35:54 +01:00
Thomas Kriechbaumer
a505221e1a http2: fix h2 header normalization test (#2080) 2017-03-01 12:46:42 +01:00
David Dworken
99b584ad7d added XSS scanner example (#1907) 2017-02-27 18:22:39 +01:00
Thomas Kriechbaumer
8f13f357ad Merge pull request #2072 from MatthewShao/dev
[web] Fix #2071, remove client_connect.mitmcert when dumping flow into json.
2017-02-27 17:10:17 +01:00
Matthew Shao
7b4e60a2e7 Fix #2071, remove client_connect.mitmcert when dumping flow into json. 2017-02-27 21:45:26 +08:00
Maximilian Hils
2b3093fa1c Merge pull request #2069 from JordanLoehr/iss2068
Added console_ prefix to options in palettepicker to resolve issue #2068
2017-02-27 05:37:26 +01:00
Jordan Loehr
6fd9146d0d Added console_ prefix to options in palettepicket to resolve issue #2068 2017-02-26 17:08:00 -07:00
Maximilian Hils
0fdf2c0f4b Merge pull request #2067 from whackashoe/fix-2065
fix #2065 by setting correct content encoding for brotli
2017-02-26 22:10:12 +01:00
Jett
18a8834209 fix #2065 by setting correct content encoding for brotli 2017-02-26 14:49:50 -06:00
Thomas Kriechbaumer
19b2208c27 Merge pull request #2066 from Kriechi/certs-tests
certs: coverage++
2017-02-26 20:55:56 +01:00