Commit Graph

50 Commits

Author SHA1 Message Date
Maximilian Hils
247f27d821 minor stylistic fixes 2015-11-14 03:46:34 +01:00
Chris Czub
e72a9a62a1 Feedback from PR #832 2015-11-13 16:55:27 -05:00
Chris Czub
d3feaa3bc6 Add custom content view plugin support for mitmproxy/mitmdump 2015-11-13 15:09:05 -05:00
Maximilian Hils
3739e1fe82 fix scripteditor bug 2015-11-10 04:48:30 +01:00
sethp-jive
fd8c921a2f Allow reading scripts from an anonymous pipe
Bash (and many other shells) provide a nifty feature in "anonymous pipe" or "anonymous fifo" whereby the output of a subshell may be treated as a simple file by the parent shell: http://unix.stackexchange.com/a/156088

Unfortunately, libmproxy complains because that "file" is not a regular file, as os.path.isfile checks, e.g. giving the error "Not a file: /dev/fd/11". This patch is intended to provide for the following use-case:

```
mitmdump -s <(echo "def response(context, flow):\n  flow.response.headers['newheader'] = [`hostname`]")
```

where `hostname` may be replaced with a more complicated lookup.
2015-09-30 15:55:43 -07:00
Maximilian Hils
457025df9a Merge pull request #751 from mitmproxy/readthedocs
Move Docs to readthedocs
2015-09-16 02:53:01 +02:00
Maximilian Hils
c573d8c292 inline scripts: provide __file__ 2015-09-10 10:31:01 +02:00
Maximilian Hils
4b8e162a8b Merge branch 'master' into readthedocs 2015-09-08 15:36:37 +02:00
Maximilian Hils
8dfa15c2d4 whitelist next_layer for @concurrent 2015-09-07 16:05:16 +02:00
Maximilian Hils
2d1c382f38 docs, docs, docs! 2015-09-04 00:45:47 +02:00
Maximilian Hils
7bf8088d80 improve inline scripts, fix #683, fix #684 2015-07-24 02:57:56 +02:00
Maximilian Hils
9960565359 fix #653 2015-07-04 15:46:45 +02:00
Aldo Cortesi
776f0a9669 Minor typo in script error. 2015-06-02 11:58:16 +12:00
Aldo Cortesi
a05a70d816 Add coding style check, reformat. 2015-05-30 12:03:28 +12:00
Maximilian Hils
9a32193005 fix #110 2015-02-07 16:37:59 +01:00
Maximilian Hils
53fadd05f4 fix #451 2015-02-07 16:26:19 +01:00
Maximilian Hils
ebd539b49f update examples, fix #353 2014-09-08 17:03:34 +02:00
Maximilian Hils
58ea198698 fix #349 2014-09-07 15:58:27 +02:00
Maximilian Hils
0e0cff638c Merge branch 'master' into issue_341 2014-09-06 12:42:52 +02:00
Maximilian Hils
3a8f648807 fix race condition with the concurrent decorator 2014-09-06 12:42:23 +02:00
Maximilian Hils
b0cfeff06d fix #341 - work on flows instead of request/response internally. 2014-09-03 16:57:56 +02:00
Maximilian Hils
94fbf066f7 fix script tests 2014-08-18 01:47:39 +02:00
Maximilian Hils
0acda9a684 fix #324 2014-08-17 23:49:08 +02:00
Maximilian Hils
c01b294d8d fix script path escaping on windows, refs #293 2014-08-08 02:27:28 +02:00
Maximilian Hils
c6911a4158 docs: add docs for script args, fix #293 2014-08-07 01:30:47 +02:00
Maximilian Hils
9cba4f8d39 fix #267 2014-05-15 14:16:05 +02:00
Maximilian Hils
4d9799f103 add support for log levels 2014-03-13 01:04:45 +01:00
Maximilian Hils
aefb30ea60 restrict -e to mitmproxy only (not mitmdump) 2014-03-12 22:13:00 +01:00
Maximilian Hils
c1fff51b1b always use relative imports, fix status bar bug 2014-03-10 22:36:47 +01:00
Maximilian Hils
545fc2506b Achievement Unlocked: Proxy Chain 2014-02-07 07:08:59 +01:00
Aldo Cortesi
4f69eef8f3 Extract command parsing and use in script grid editor 2014-01-13 14:15:17 +13:00
Aldo Cortesi
42d4a2fae9 Script refactoring: move script command parsing into script module. 2014-01-12 23:02:29 +13:00
Aldo Cortesi
e5776b8be3 Clean up and clarify script API 2014-01-12 13:59:32 +13:00
Aldo Cortesi
58e1b3a47f Start refactoring scripts
- Move ScriptContext into script module
- Use mock module instead of hand-rolled mock objects in tests
2014-01-12 12:49:19 +13:00
Maximilian Hils
e643759ef6 merge smurfix/fix2, add serverconnect hook docs, adjust tests 2013-12-16 22:10:06 +01:00
Maximilian Hils
605950bfdf add @concurrent decorator for inline scripts, fixes #176 2013-12-15 02:43:16 +01:00
Maximilian Hils
729677cd85 Merge branch 'master' into 0.10 2013-08-17 13:30:36 +02:00
Aldo Cortesi
edb10e33aa Remove GPL notices left in source files after our change to the MIT license.
Thanks to Roy Shamir for reporting this.
2013-08-01 11:08:00 +12:00
Maximilian Hils
d462b444b7 update tests to reflect changes to options.scripts 2013-06-17 16:48:06 +02:00
Maximilian Hils
2b4af8d475 add support for multiple scripts and script arguments. refs #76 2013-06-13 16:09:38 +02:00
Aldo Cortesi
b36e37f9da Fix a traceback that sometimes occurred when an invalid limit was entered. 2012-06-02 18:41:44 -07:00
Aldo Cortesi
554047da85 License notifications, minor docs. 2012-02-23 15:52:01 +13:00
Aldo Cortesi
b51aac8a86 Code cleanliness - appease pychecker. 2011-08-04 10:34:34 +12:00
Aldo Cortesi
730c78ac53 Move script.Context to flow.ScriptContext 2011-08-04 10:14:44 +12:00
Aldo Cortesi
179cf75862 Add script hooks, enable new engine for mitmdump. 2011-08-03 16:36:20 +12:00
Aldo Cortesi
12d2b1f926 Rip out old script interface, start replacing with new stubs.
Scripts are broken for now.
2011-08-03 13:20:36 +12:00
Aldo Cortesi
357502fe03 General cleanup.
Cut out unused variables and code, generally shut up pychecker as much as is
reasonable.
2011-08-02 16:14:33 +12:00
Aldo Cortesi
7769e5a898 Whitespace in mitmdump output. 2011-02-17 15:56:54 +13:00
Aldo Cortesi
d8cb826361 Test suite rejiggering and cleanup. 2011-02-03 12:16:03 +13:00
Aldo Cortesi
b886f808be Add an external script API.
External scripts can read a flow, modify it, and then return it to mitmproxy
using a simple API.

The "|" keyboard shortcut within mitmproxy prompts the user for a script.
2011-01-31 13:26:56 +13:00