Commit Graph

6575 Commits

Author SHA1 Message Date
Aldo Cortesi
b0ba765598 Add type and choices to options dump commets. 2017-03-07 19:29:08 +13:00
Yamamori Akihiro
7ca2913c1a Update tcpproxy.rst
Correction in key short cut for TCP Proxy
2017-03-07 14:15:29 +09:00
Aldo Cortesi
320d8848ab Options tweaks
- Regularise presentation and wording
- Help is mandatory for all options
- Auto-generate wording to say that sequence options can be passed multiple
times on the command-line
2017-03-07 15:23:46 +13:00
Aldo Cortesi
10db254791 Remove less commonly used command-line options
We now have --set, so only options that really deserve it get a dedicated flag.
I'm inclined to strip this back even more. Feel free to argue that YOUR
favourite option deserves special treatment here.
2017-03-07 14:46:28 +13:00
Aldo Cortesi
ac3b0d69cc Add the --set option to set options directly
The --set option is a universal flag for setting options. Some examples:

Turn on a boolean:

mitmdump --set onboarding=false

Add a value to a sequence:

mitumdupm --set setheaders=/foo/bar/voing

Zero a sequence:

mitumdupm --set setheaders
2017-03-07 14:27:50 +13:00
Aldo Cortesi
79f5883c2f Option spacing and coverage 2017-03-07 13:47:39 +13:00
Aldo Cortesi
99a6b0dbc1 Add --options that dumps annotated option defaults 2017-03-07 13:16:28 +13:00
Maximilian Hils
6a4ca68a1c Merge pull request #2101 from s4chin/add-websocket-filter-to-web
web: Add websocket filter
2017-03-06 23:34:13 +01:00
Maximilian Hils
193c707061 Merge pull request #2104 from lymanZerga11/patch-2
Fixes #2102
2017-03-06 23:33:33 +01:00
Maximilian Hils
8b79892246 Merge pull request #2105 from Kriechi/dev-version
clearly indentify git-checkout as dev version
2017-03-06 23:32:59 +01:00
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