Commit Graph

6758 Commits

Author SHA1 Message Date
Aldo Cortesi
169baabcab Basic outline of the command subsystem
- Add a command manager
- Sketch out the type system with a few simple supported types
2017-04-27 11:09:40 +12:00
Aldo Cortesi
2a46f3851a Merge pull request #2265 from cortesi/addons
Addons and addon testing
2017-04-27 07:40:14 +12:00
Maximilian Hils
ab07b79138 Merge pull request #2270 from F1ashhimself/master
Update readme for complex examples
2017-04-26 17:15:34 +02:00
Maksim Beloborodko
90a5b90b0d Update readme for complex examples 2017-04-26 17:14:41 +03:00
Maximilian Hils
0f9081b18d Merge pull request #2269 from mhils/issue-2250
fix #2250, add type info to cookie module
2017-04-26 14:42:48 +02:00
Maximilian Hils
87610cc8b2 fix #2250, add type info to cookie module 2017-04-26 14:17:14 +02:00
Maximilian Hils
d5ea08db62 Merge pull request #2258 from mhils/readfile
Integrate readstdin into readfile
2017-04-26 13:40:51 +02:00
Maximilian Hils
0a8e54edea Merge pull request #2268 from mhils/issue-2257
fix #2257
2017-04-26 13:39:19 +02:00
Maximilian Hils
cef01ac164 Merge pull request #2267 from MatthewShao/jest-dev
[web] Add coverage for js/utils.js, js/flow/utils.js
2017-04-26 13:38:54 +02:00
Maximilian Hils
1aa6d9d324 fix #2257 2017-04-26 12:26:49 +02:00
Maximilian Hils
ca2827886a separate reading from stdin into its own addon 2017-04-26 12:11:37 +02:00
Maximilian Hils
7607240c30 Merge pull request #2259 from mhils/2228
fix #2228
2017-04-26 12:10:39 +02:00
Maximilian Hils
df7701bb6d fix #2228 2017-04-26 11:32:24 +02:00
Maximilian Hils
07cb83597b clarify that --cert expects a leaf certificate
refs #2254
2017-04-26 11:18:27 +02:00
Matthew Shao
ec7d90f9be [web] Add coverage for js/utils.js, js/flow/utils.js 2017-04-26 17:06:50 +08:00
Maximilian Hils
b3a1143338 integrate readstdin into readfile addon 2017-04-26 10:56:32 +02:00
Maximilian Hils
2b500f234f typecheck: add support for typing.Any 2017-04-26 10:54:36 +02:00
Aldo Cortesi
5327756377 Addons and addon testing
- Fix some loading sequence bugs affecting command-line script invocation
- Allow addons to over-ride existing options (with a warning). We need this for
reloading.
- Convert har_dump to new-style arguments, fix and re-instate its test suite.
- Covnert miscelaneous other exmples to new-style args.
2017-04-26 19:56:33 +12:00
Aldo Cortesi
e32efcae49 Merge pull request #2262 from Kriechi/reduced-coverage++
improve tests (extracted from #2011)
2017-04-26 19:52:33 +12:00
Aldo Cortesi
1daf0b3f0a Merge pull request #2264 from cortesi/options
Change the way addons handle options
2017-04-26 11:23:48 +12:00
Aldo Cortesi
b72f139093 configure(options, updated) -> configure(updated)
Options are now available globally on ctx, so the first argument of configure
is redundant.
2017-04-26 11:01:27 +12:00
Aldo Cortesi
f90b4c2ff0 Move options into ctx
Many addons currently save options on configure(), either as individual options
or sometimes by saving the entire options object. The current options should
simply be available on the ctx object, simplifying state management for addons
considerably.
2017-04-26 10:25:56 +12:00
Aldo Cortesi
02c82b1b60 Merge pull request #2261 from cortesi/addonrevamp
Revamp how addons work
2017-04-26 09:03:03 +12:00
Aldo Cortesi
7aa2081894 Remove watchdog, solidify script testing
- Remove the watchdog dependency. We now just stat the script file every 2
seconds to check for an updated mtime.
- Further solidify our script testing, and in particular make the example tests
nicer. These should exemplify how we want users to test their own addon
scripts. More work on addon testing to follow.
2017-04-26 09:01:40 +12:00
Thomas Kriechbaumer
a35a377cbb improve tests 2017-04-25 20:49:49 +02:00
Maximilian Hils
7ee0abbe0c Merge pull request #2219 from MatthewShao/jest-dev
[web] Coverage++ for ducks/flows.js
2017-04-25 20:26:45 +02:00
Matthew Shao
6962a2c3f2 Fix the tests for flows actions. 2017-04-25 19:29:52 +08:00
Matthew Shao
dcac976a47 Merge branch 'jest-dev' of https://github.com/MatthewShao/mitmproxy into jest-dev 2017-04-25 19:27:53 +08:00
Aldo Cortesi
e6eeab6094 Revamp how addons work
- Addons now nest, which means that addons can manage addons. This has a number
of salutary effects - the scripts addon no longer has to poke into the global
addons list, we no longer have to replace/remove/boot-outof parent addons when
we load scripts, and this paves the way for making our top-level tools into
addons themselves.
- All addon calls are now wrapped in a safe execution environment where
exceptions are caught, and output to stdout/stderr are intercepted and turned
into logs.
- We no longer support script arguments in sys.argv - creating an option
properly is the only way to pass arguments. This means that all scripts are
always directly controllable from interctive tooling, and that arguments are
type-checked.

For now, I've disabled testing of the har dump example - it needs to be moved
to the new argument handling, and become a class addon. I'll address that in a
separate patch.
2017-04-25 22:13:44 +12:00
Maximilian Hils
161cdff25e simplify selectRelative, add example for action testing 2017-04-24 15:13:45 +02:00
Matthew Shao
ae71ec1d30 [web] Coverage++ for ducks/flows.js 2017-04-24 14:18:12 +02:00
Thomas Kriechbaumer
90c425bd14 Merge pull request #2256 from ujjwal96/ip-formatting
Fixed formatting in mitmdump
2017-04-22 10:33:07 +02:00
Ujjwal Verma
73692b909b Fixed formatting in mitmdump 2017-04-22 11:24:22 +05:30
Maximilian Hils
6af72160bf [requires.io] dependency update on master branch (#2252) 2017-04-20 15:29:42 +02:00
Maximilian Hils
3d7cde058b [requires.io] dependency update on master branch (#2241) 2017-04-17 10:49:17 +02:00
Thomas Kriechbaumer
9c18f0ba09 Merge pull request #2240 from mitmproxy/requires-io-master
[requires.io] dependency update on master branch
2017-04-16 22:12:04 +02:00
Maximilian Hils
3aa7f24992 Update setup.py 2017-04-16 19:44:26 +02:00
requires.io
3afeb7c7e9 [requires.io] dependency update 2017-04-16 19:42:32 +02:00
Maximilian Hils
be5e276d45 Merge pull request #2239 from Kriechi/update-kaitai
update kaitai and recompile formats
2017-04-16 19:42:19 +02:00
Thomas Kriechbaumer
83a428e0b7 manually fix imports 2017-04-16 15:51:12 +02:00
Thomas Kriechbaumer
dadb50946e update kaitai and recompile formats 2017-04-16 15:51:11 +02:00
Maximilian Hils
ec6be96f2a Merge pull request #2234 from ujjwal96/ip-formatting
Fixes IP address formatting #2109
2017-04-10 20:24:15 +02:00
Ujjwal Verma
742127ef7b Fixes #2109 2017-04-09 18:55:20 +05:30
Maximilian Hils
c7b5012752 Merge pull request #2232 from r1b/master
fixes ipv6 authority form parsing in CONNECT
2017-04-09 01:15:50 +02:00
Robert C Jensen
7365f18542 fixes ipv6 authority form parsing in CONNECT 2017-04-07 15:46:21 -04:00
Maximilian Hils
c76620c19f Merge pull request #2227 from vinaydargar/grammarphrasing
Replace phrase 'the the' in 2 places
2017-04-04 02:26:10 +02:00
Vinay Dargar
55ba6ed14d Replace phrase 'the the' in 2 places
Replaced with the appropriate "in the" and "to the".
There are multiple other occurences of this but they are in upstream python modules.
2017-04-02 21:37:38 +05:30
Thomas Kriechbaumer
8567300dd6 Merge pull request #2224 from jonathanrfisher1/patch-1
Replace phrase "an TLS" with "a TLS"
2017-03-29 20:43:14 +02:00
jonathanrfisher1
677b9186ae Replace phrase "an TLS" with "a TLS"
Updating usage of 'a' or 'an' to be more consistent with general English grammatical rules. TLS is pronounced with a consonant sound for both the expanded and abbreviated versions.
2017-03-29 14:12:33 -04:00
Thomas Kriechbaumer
9e3edd16c2 Merge pull request #2223 from krsoninikhil/empty-logbuffer
Add tests for set_focus
2017-03-29 16:57:37 +02:00