Miroslav
dcb3de40b1
Some refactoring. New test case.
2018-07-19 16:56:34 +03:00
Miroslav
ffbd7c20e5
Command history implementation
2018-07-17 18:37:45 +03:00
Maximilian Hils
48ff616cef
mitmweb: improve dns rebinding protection, support ipv6
2018-07-12 10:40:50 +08:00
Maximilian Hils
ae91779229
mitmweb: protect against dns rebinding
2018-07-11 18:57:12 +08:00
Grant Murphy
8fb5d2d482
Pass option, not option name to parse_setval
...
Fixes #3230
2018-07-02 16:10:03 +10:00
Miroslav
4e5551c483
view.create to view.flows.create for defaultkeys
2018-06-30 15:46:54 +03:00
Aldo Cortesi
9ff4f55614
Merge pull request #3202 from madt1m/view-cleanup
...
View Cleanup - Initial steps
2018-06-17 09:20:34 +12:00
Maximilian Hils
3227f67d88
update compiled mitmweb assets
2018-06-15 17:15:15 +02:00
madt1m
773c953514
View API slightly extended; codebase cleaned in some points
2018-06-13 11:56:14 +02:00
Thomas Kriechbaumer
1413958a67
fix syntax-error on older python interpreters
2018-06-08 08:31:48 +02:00
Maximilian Hils
1f6635c1fc
fix shutdown on Windows
...
This fixes #3133 .
2018-05-28 22:27:14 +02:00
Aldo Cortesi
e59ba13417
Use deferral mechanism for cfg file options
...
Fixes #3162
2018-05-27 10:12:24 +12:00
Grant Murphy
bd7069a9e0
Adjust options when changed
...
The existing options for the console were not being updated when a new
addon was added. This triggers the changed blinker signal when an option
is added, and also recreates self.opts when this signal is received.
Fixes #3147
2018-05-25 11:38:08 +10:00
Aldo Cortesi
2db0245233
Merge pull request #3116 from cortesi/fixes
...
Misc fixes
2018-05-12 13:32:57 +12:00
Aldo Cortesi
45c435592f
Merge pull request #3115 from cortesi/cmds
...
commands fixes and improvements
2018-05-12 11:46:28 +12:00
Aldo Cortesi
ac7880132e
Merge pull request #3028 from madt1m/Fix#3011
...
Fix buggy keybindings in Data Viewer overlays
2018-05-12 11:24:32 +12:00
Aldo Cortesi
a70b50fe3a
console: implement positions for flow list walker
...
This papers over an urwid bug until they fix it.
fixes #2973
2018-05-12 11:10:33 +12:00
Aldo Cortesi
75d30212c2
console: fix bug that caused addon commands not to appear in command list
2018-05-11 15:00:32 +12:00
Aldo Cortesi
be27bde4d4
cmdline: --conf -> --confdir, which specifies the config directory, not the yaml options file
...
This is a much more sensible behaviour for the flag.
2018-05-10 17:35:37 +12:00
Aldo Cortesi
8c63a8818d
keymap: read keys from CONFDIR/keys.yaml by default
2018-05-10 16:06:52 +12:00
Aldo Cortesi
9830e5b597
cadir -> confdir
...
We store a lot more than just the CAs in our configuration directory. Clarify
the option name.
2018-05-10 11:40:33 +12:00
Aldo Cortesi
3438912236
console keybindings: define YAML-based format for console key binding persistence
2018-05-10 11:30:51 +12:00
Aldo Cortesi
f7d7e31f06
options: add the concept of deferred settings
...
We've had a perpetual sequencing problem with addon startup. Users need to be
able to specify options to addons on the command-line, before addons are
actually loaded. This is only exacerbated with the new async core, where load
order can't be relied on.
This patch introduces deferred options. Options passed with "--set" on the
command line are deferred if they are unknown, and are automatically applied by
the addon manager once matching addons are registered and their options are defined.
2018-05-08 10:56:00 +12:00
Aldo Cortesi
39e5f94cf1
Zap some commands.call invocations that were missed in the rename
2018-05-07 18:46:17 +12:00
Aldo Cortesi
f380a77dee
Remove the tick event
...
Mitmproxy: the tickless wonder.
2018-05-02 14:29:15 +12:00
Aldo Cortesi
2f3ba1f66d
Catch some stray command.call invocations
2018-05-02 12:08:15 +12:00
Aldo Cortesi
22a4b1d5d4
Redesign keepserving
...
- Instead of listening for a pseudo-event, we periodically check whether client
replay, server replay or file reading is active.
- Adjust server replay not to
use tick.
- Adjust readfile to expose a command to check whether reading is in progress.
2018-05-02 11:26:40 +12:00
Aldo Cortesi
e963408434
console: use replay count commands in statusbar
...
Also add a periodic refresh every 0.5 seconds for the statusbar. This is in
addition to refreshes upon event update notifications, and picks up replay
status changes not linked to flow events.
2018-05-02 09:43:42 +12:00
Aldo Cortesi
204726349d
client replay: replaying flows in-flight should be added to count()
2018-05-02 08:50:17 +12:00
Aldo Cortesi
00d790fe84
commands: clarify command call interface, fix web app replay
2018-05-02 08:36:15 +12:00
Aldo Cortesi
09c36a8c7c
client replay: use count command for console statusbar
2018-05-01 09:04:59 +12:00
Aldo Cortesi
28d53d5a24
client replay: move all client replay-related code into addon
2018-04-27 16:34:56 +12:00
CorTal
ab01406585
call_soon->ensure_future
2018-04-18 10:31:43 +02:00
Aldo Cortesi
e6538cdb1f
mitmweb: don't blort all over my config file
...
Temporarily disable config saving until we can look at this more closely.
Config saving should:
- Only happen when explicitly requested by the user
- Only save changed values
2018-04-18 09:01:42 +12:00
Aldo Cortesi
8396244729
mitmweb: shift to use new run_loop wrapper on master
...
Fixes #3067
2018-04-18 08:21:08 +12:00
Aldo Cortesi
df83c0eef7
asyncio: fix exit behavior for console
...
- Add a master.run_loop function. This encapsulates our run behaviour so that
it can be used by implementations that need to manage their own run loop (like urwid).
- Shift crash exit message to the common core. I'm not convinced we really need
this, but if we want it it should be centralised.
- Clean up an extra exception that can be thrown by asyncio itself on "dirty"
termination after a mitmproxy crash.
2018-04-17 10:42:40 +12:00
Aldo Cortesi
ef4db52887
Ignore signal errors on windows + various fixes
...
- Ignore the NotImplementedError raised by add_signal_handler on Windows.
- Entrypoints return an integer exit code, or None. Adjust our type annotations
and code to suit.
Fixes #3061
2018-04-17 08:20:52 +12:00
Aldo Cortesi
565146311a
asyncio: clarify shutdown semantics
...
This patch clarifies proxy shutdown, and specifies that the master.shutdown()
method is thread-save.
2018-04-16 10:16:51 +12:00
Aldo Cortesi
5f74adc2df
Merge pull request #3059 from obscure76/enh/issue-3053
...
fix Python 3.6 variable type annotations #3053
2018-04-16 07:35:20 +12:00
oscure76
0e984e1442
fix Python 3.6 variable type annotations #3053
2018-04-14 16:24:41 -07:00
Aldo Cortesi
909a02ea03
mitmdump: also set dumper_filter to default filter on startup
...
Fixes #3051
2018-04-14 13:30:13 +12:00
Aldo Cortesi
8609de6f31
readfile: add a readfile_filter option
...
* Add a readfile_filter option that filters flows on read.
* Adjust test suite for asyncio.
* Add asynctest as a dev dependency.
2018-04-14 11:52:02 +12:00
Aldo Cortesi
214498f01c
asyncio: adjust readfile.py addon for async
2018-04-14 11:52:02 +12:00
Aldo Cortesi
6a08ef465f
asyncio: remove master.add_log, in favor of a persistent log.Log instance
2018-04-07 09:02:10 +12:00
Aldo Cortesi
0fa1280daa
asyncio simplify: we don't need a queue for proxy->main loop comms
...
Instead, we just schedule coroutines directly onto the core loop.
2018-04-07 08:59:08 +12:00
Aldo Cortesi
780cd989d5
Merge pull request #3029 from cortesi/eventloop
...
shift core event loop to asyncio
2018-04-04 15:47:01 +12:00
Emil Stahl
8ea8f31e3f
Fixed --no-mouse parameter message
...
`--no-mouse` is deprecated. Changed parameter to `--set console_mouse=false`
2018-04-03 18:56:12 +02:00
Aldo Cortesi
14f461c5d5
asyncio: cleanup and lint
...
Also fix a racy websocket test.
2018-04-02 16:41:49 +12:00
Aldo Cortesi
1f33c1c1a5
asyncio: rebase mitmweb Tornado event loop on asyncio
2018-04-02 15:00:13 +12:00
Aldo Cortesi
2ac4f9e255
asyncio: shift console over to asyncio eventloop
2018-04-02 11:21:52 +12:00