Commit Graph

1778 Commits

Author SHA1 Message Date
Shadab Zafar
152e395fa4 Copy as raw request
Issue #807

I am not entirely sure what needs to be returned in this case.
2016-01-13 19:21:13 +05:30
Shadab Zafar
34ec2d1370 Export/Copy request as python code
Press E followed by p to copy code to clipboard.

The code uses the python requests module.

Only GET methods are currently supported, but can easily be extended
to POST etc.
2016-01-13 16:40:05 +05:30
Shadab Zafar
1079e00641 Use signals.status_message for empty content 2016-01-13 16:36:44 +05:30
Shadab Zafar
0bb13c61d6 Refactor copy_as_curl_command 2016-01-13 16:17:01 +05:30
Marcelo Glezer
9facd190c6 refactored export as curl to be 'E' to export and 'c' to as curl command 2016-01-13 15:29:44 +05:30
Marcelo Glezer
b2e3d2ce70 headers enumartion was failing in copy as curl and protocol was None when copy to clipboard was called. first wip fix 2016-01-13 15:29:44 +05:30
Marcelo Glezer
fa007a7707 fixed TypeError: ask_save_overwrite() takes exactly 2 arguments (xxxxx given) 2016-01-13 15:28:32 +05:30
Ryan Welton
6a235a1b11 Was needlessly passing un-used parameters + clean up misspelling 2016-01-13 15:28:32 +05:30
Ryan Welton
b424c1d43f Switch to single quotes 2016-01-13 15:28:32 +05:30
Ryan Welton
dde0ff50a5 Add copy as curl command 2016-01-13 15:28:32 +05:30
Matthew Shao
181c2973e6 PollingObserver() fixed on Linux and OS X. 2016-01-12 22:24:18 +08:00
MatthewShao
201fdea6e5 Change Observer() to PollingObserver(). 2016-01-12 21:36:59 +08:00
Matthew Shao
89679bc386 Fix observer in same dir situation. 2016-01-12 20:50:33 +08:00
MatthewShao
e72663be08 Fix script reloader on OS X. 2016-01-12 11:45:03 +08:00
Michael J. Bazzinotti
e766838a1a Add Inline Script Hooks to TCP mode 2016-01-10 13:05:01 -05:00
Thomas Kriechbaumer
aea3837d4a remove code duplication 2016-01-10 11:57:39 +01:00
Chris Czub
493302d180 Support writing to outfile from mitmweb 2016-01-10 11:57:37 +01:00
Sandor Nemes
fe77dd35c6 Fixed a problem with the bind address not being used as the source address on outgoing TCP packets 2016-01-08 18:55:13 +01:00
Maximilian Hils
11215e46ec fix #659 2016-01-02 15:12:36 +01:00
Michael J. Bazzinotti
09168e1274 client-cert: Simplify and cleanup
simplify the error message when cert path does not exist.
During tests, reset the clientcerts proxy config setting to None
Remove now-unused clientcerts code from class ProxTestBase
2015-12-29 11:48:02 -05:00
Michael J. Bazzinotti
80690b7906 [docs/libmproxy/test] Support single client-side cert file as argument to
--client-certs
2015-12-28 15:20:45 -05:00
Jorge Villacorta
ba53c7c9a2 Add default ciphers to avoid issue with iOS9 App Transport Security 2015-12-11 11:09:02 -05:00
David Weinstein
78fc092b94 TLS verification warnings write to stderr 2015-12-10 11:43:58 -05:00
Maximilian Hils
e6bf033cbd bump version 2015-12-03 18:13:24 +01:00
Maximilian Hils
46ae8b0e30 Revert "make setup.py wheel-ready"
This reverts commit 51bd98d5b1.
2015-12-03 17:28:52 +01:00
Maximilian Hils
51bd98d5b1 make setup.py wheel-ready 2015-12-03 16:25:49 +01:00
Maximilian Hils
1619af1486 flow format compat: 0.14 -> 0.15 2015-12-03 14:45:26 +01:00
Maximilian Hils
d1ce1aa993 fix #839 2015-12-02 21:19:41 +01:00
Maximilian Hils
3963a2191b add import capability for old flows, fix #840 2015-12-02 19:50:08 +01:00
Maximilian Hils
43ed82062f fix #847 2015-11-27 21:21:04 +01:00
Maximilian Hils
a88004f1ce fix #831 2015-11-26 23:20:31 +01:00
Maximilian Hils
6a239526e5 http: catch all exceptions 2015-11-26 23:19:43 +01:00
Maximilian Hils
a9f64c22f8 simplify Client/ServerConnection.__repr__ 2015-11-26 23:15:21 +01:00
Maximilian Hils
89013eb7af establish tls with client even if server connection fails 2015-11-26 23:13:06 +01:00
Maximilian Hils
3eea7f1216 script reloader: minor fixes 2015-11-26 14:59:54 +01:00
Maximilian Hils
5d332e7218 fix #842 2015-11-26 14:58:08 +01:00
Maximilian Hils
d2f69da235 disable script reloader
This currently throws some errors on OSX.
2015-11-24 18:54:16 +01:00
Matthew Shao
b7bea03c68 fix #835 , can display unicode character correctly 2015-11-16 20:47:58 +08:00
Maximilian Hils
d6bd1cb4a6 fix HTTPS Proxy-Authentication, refs #824 2015-11-14 21:55:02 +01:00
Maximilian Hils
0d98b9dcc5 finalize script reloading 🎉 2015-11-14 05:57:02 +01:00
Maximilian Hils
4499ab61c0 structure libmproxy.script 2015-11-14 04:21:38 +01:00
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
Chris Czub
d7239d665e Add new contentviews' content type mappings 2015-11-13 15:08:52 -05:00
Chris Czub
82a90511bc Add "add" ContentView method & test 2015-11-13 15:07:56 -05:00
Matthew Shao
cd0b9e01be Decouple libmproxy.script from libmproxy.flow 2015-11-13 21:08:39 +08:00
Matthew Shao
2522ba69fa Move the observer initalization to the constructor of Script
class.Should work with both mitmproxy and mitmdump now.
Change the names in PEP8 style.
2015-11-11 20:59:12 +08:00
Matthew Shao
3f6521f912 Use watchdog to reload scripts automatically. 2015-11-11 09:03:05 +08:00
Maximilian Hils
3739e1fe82 fix scripteditor bug 2015-11-10 04:48:30 +01:00
Aldo Cortesi
58aeb2b843 Bump version for next release cycle 2015-11-07 09:30:38 +13:00
Aldo Cortesi
9beae933ba Bump version, update CONTRIBUTORS, CHANGELOG 2015-11-06 13:52:08 +13:00
Aldo Cortesi
6135e16482 Catch and ignore thread errors on exit
Keyboard interrupts bugger up Queues in some way, which causes a traceback on
exit in many of our tools. The issue seems easiest to reproduce with binary
builds on OSX.
2015-11-06 11:35:54 +13:00
Marcelo Glezer
6b6b0a9416 fix copy to clipboard command when copying content 2015-11-05 00:09:22 -03:00
Maximilian Hils
fb463f50ed Merge pull request #809 from zbuc/pfctl_errhandling
Better error handling/reporting for pfctl failures on OS X
2015-11-04 21:32:12 +01:00
Chris Czub
9398d5896b PR 809 make code more pythonic 2015-11-04 15:04:18 -05:00
Maximilian Hils
1bf34e6f45 Merge branch 'master' of https://github.com/mitmproxy/mitmproxy 2015-11-01 18:39:55 +01:00
Maximilian Hils
978eb17d66 fix #811 2015-11-01 18:37:20 +01:00
gecko655
6aa7454f92 Use ctrl+f and ctrl+b to scroll a page 2015-10-30 12:48:38 +09:00
Chris Czub
88451ef245 Declare & define insufficient_priv 2015-10-29 16:01:24 -04:00
Chris Czub
70c28f5d34 Better error handling/reporting for pfctl failures on OS X 2015-10-29 15:56:43 -04:00
Maximilian Hils
65c08ec899 Merge pull request #791 from tunz/master
Prevent flowview from creating duplicated windows
2015-10-28 13:10:38 +01:00
Maximilian Hils
726b70ccdc fix #800 2015-10-22 02:38:00 +02:00
Maximilian Hils
7d8191ee37 update web builds, use watchify 2015-10-08 12:43:55 +02:00
Choongwoo Han
9c0efdf2ec Refresh flowview instead of reopen the same flowview 2015-10-08 11:31:33 +09:00
Colin Bendell
a85e4bc75c default should not be None
Fixed default value when self.address has not been set
2015-10-07 21:46:08 -04:00
Colin Bendell
77aeac11a9 Check if server connection hasn't yet been initiated
This fixes #761 when NoneType error is thrown when non-TLS requests initiate a client request but the server connection hasn't yet been initiated.
2015-10-07 20:30:31 -04:00
Choongwoo Han
45494d1c79 Prevent flowview from creating duplicated windows 2015-10-04 14:21:51 +09:00
Maximilian Hils
ce38a05a20 Merge remote-tracking branch 'origin/master' 2015-10-03 23:59:13 +02:00
Maximilian Hils
26631621ee fix #786 2015-10-03 14:48:51 +02: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
c6811bd0e8 fix #773 2015-09-28 14:55:13 +02:00
Maximilian Hils
86ef19b450 fix tests 2015-09-28 14:04:41 +02:00
Maximilian Hils
c11ab3676d Merge branch 'http-models' 2015-09-28 13:54:53 +02:00
Maximilian Hils
6661770d4e handle Expect: 100-continue header, fix #770 2015-09-28 10:59:10 +02:00
Maximilian Hils
1b6ea5caf3 adjust to netlib response changes + docs 2015-09-26 17:41:14 +02:00
Maximilian Hils
b13acd7956 adjust to netlib request changes + docs 2015-09-26 01:23:59 +02:00
Maximilian Hils
bba5ec7144 experimental: run tests using py.tests 2015-09-21 18:31:30 +02:00
Maximilian Hils
88375ad64a fix minor bugs, add py.test compatibility 2015-09-21 02:26:47 +02:00
Maximilian Hils
6d27901b6f fix replay functionality 2015-09-19 11:59:05 +02:00
Maximilian Hils
42bbd3c928 don't cache changed messages, fix #777 2015-09-19 11:50:02 +02:00
Maximilian Hils
2d4a5fb116 experimental: don't interfere with headers, fix #93 2015-09-18 18:07:38 +02:00
Maximilian Hils
66d21fa4ba trigger inline script hooks for artifical responses, fix #775 2015-09-18 13:51:05 +02:00
Maximilian Hils
5df5ee15f2 remove old server replay workaround, fix #774 2015-09-18 13:27:05 +02:00
Maximilian Hils
906360f63f code -> status_code, httpversion -> http_version 2015-09-17 15:16:33 +02:00
Maximilian Hils
12984f149c move body assembly to netlib 2015-09-17 02:40:08 +02:00
Maximilian Hils
14a5f405fd use new netlib exceptions 2015-09-17 02:13:28 +02:00
Maximilian Hils
8fbed971ae Merge pull request #768 from mitmproxy/netlib-http1-refactor
Adjust to netlib changes
2015-09-16 20:24:48 +02:00
Maximilian Hils
0af0608978 adjust to netlib changes 2015-09-16 18:45:22 +02: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
436a9ea839 minor fixes 2015-09-14 23:58:06 +02:00
Maximilian Hils
eb2264e91a improve display of non-ascii contents
fixes #283
2015-09-12 17:10:38 +02:00
Maximilian Hils
049d253a83 simplify contentview api 2015-09-12 13:49:16 +02:00
Maximilian Hils
9c31669211 mitmdump: colorize output, add content views 2015-09-11 19:03:50 +02:00
Maximilian Hils
b7b46bac46 content view: fix fallback 2015-09-11 16:40:58 +02:00
Maximilian Hils
960f62f363 fix bugs 2015-09-11 13:37:52 +02:00
Maximilian Hils
625a719eb1 completely remove console from contentviews 2015-09-11 12:26:52 +02:00
Maximilian Hils
7c186a4edb Merge branch 'master' into contentviews 2015-09-11 12:13:39 +02:00
Maximilian Hils
dd414e4852 better error messages, remove error cause 2015-09-11 02:17:04 +02:00
Maximilian Hils
40ce06e780 tls layer: fix early peek 2015-09-11 01:47:13 +02:00
Maximilian Hils
ffdf143be4 better exception handling 2015-09-11 01:39:33 +02:00
Maximilian Hils
c159c8ca13 fix chunked encoding 2015-09-11 01:18:17 +02:00
Maximilian Hils
30f0ee40c5 nicer error messages 2015-09-11 00:49:37 +02:00
Maximilian Hils
d1bc966e5b polish for release: introduce http2 and rawtcp as command line switches 2015-09-11 00:00:00 +02:00
Maximilian Hils
33c0d36530 fix exception re-raise 2015-09-10 18:36:50 +02:00
Maximilian Hils
35a99d2faf start reraising exceptions properly 2015-09-10 16:24:22 +02:00
Maximilian Hils
ebba79b655 raw tcp mode: use ssl_read_select 2015-09-10 11:33:03 +02:00
Maximilian Hils
3b6140dfff fix send_response if content is missing 2015-09-10 10:32:08 +02:00
Maximilian Hils
c573d8c292 inline scripts: provide __file__ 2015-09-10 10:31:01 +02:00
Maximilian Hils
cf2b2e0cc7 simplify streaming http layer 2015-09-10 10:20:11 +02:00
Maximilian Hils
61f4319491 http protocol: use new tls attribute 2015-09-09 18:49:32 +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
d002371d30 expose next_layer to inline scripts 2015-09-07 13:52:58 +02:00
Maximilian Hils
eb2334c6cb Merge branch 'master' into readthedocs 2015-09-06 01:37:19 +02:00
Maximilian Hils
5125c669cc adjust to new netlib Headers class 2015-09-05 20:45:58 +02:00
Maximilian Hils
b62498e125 remove urwid from contentviews 2015-09-04 17:33:21 +02:00
Maximilian Hils
018c693dee remove urwid from contentviews (wip) 2015-09-04 17:07:14 +02:00
Maximilian Hils
00561d280c speed up filters 2015-09-04 02:11:09 +02:00
Maximilian Hils
e88c7e4c58 Merge branch 'master' into readthedocs 2015-09-04 00:47:04 +02:00
Maximilian Hils
2d1c382f38 docs, docs, docs! 2015-09-04 00:45:47 +02:00
Thomas Kriechbaumer
47ab7f04ea http2: Ping frames are handled in netlib 2015-09-03 21:23:19 +02:00
Maximilian Hils
14457f29b3 docs++ 2015-09-03 18:55:38 +02:00
Maximilian Hils
99126f62ed remove depth attribute from set_server 2015-09-03 18:25:36 +02:00
Maximilian Hils
8da683a638 Merge branch 'master' of https://github.com/mitmproxy/mitmproxy 2015-09-03 17:01:37 +02:00
Maximilian Hils
f4272de5ec remove ServerConnectionMixin.reconnect 2015-09-03 17:01:25 +02:00
Thomas Kriechbaumer
3a229f60e3 http2: fix ping response 2015-09-03 14:26:36 +02:00
Thomas Kriechbaumer
1f6d05f89f http2: server can send WindowUpdate frames as well 2015-09-03 14:09:59 +02:00
Thomas Kriechbaumer
bc93600a66 http2: add GoAway support for client 2015-09-03 13:55:13 +02:00
Thomas Kriechbaumer
b4d6f2e12b http2: fix PingFrame again 2015-09-03 13:55:13 +02:00
Thomas Kriechbaumer
29ae2bbf91 http2: fix multiple stream per connection
fixes #746
2015-09-03 13:54:58 +02:00
Thomas Kriechbaumer
bde4bdd1d2 http2: fix unhandled frames 2015-09-03 13:40:35 +02:00
Maximilian Hils
a0f3803233 Merge pull request #748 from Kriechi/tls-ciphers
pass-through ciphers from client to server
2015-09-03 12:57:56 +02:00
Thomas Kriechbaumer
37e6b3c401 http2: improve unexpected frame handling and shutdown 2015-09-03 11:09:59 +02:00
Maximilian Hils
cc2a6a3919 fix circular imports 2015-09-02 20:56:19 +02:00
Thomas Kriechbaumer
c79af62763 ignore http2 priority frames 2015-09-02 20:50:50 +02:00
Thomas Kriechbaumer
0047ac4cdc pass-through ciphers from client to server 2015-09-02 20:46:14 +02:00
Chris Czub
b4e0be9052 PR #700
Start moving the contentview up a level
Started shifting the contentview class up to libmproxy
2015-09-02 20:30:58 +02:00
Maximilian Hils
f1c8b47b1e better tls error messages, fix #672 2015-09-01 19:24:36 +02:00
Thomas Kriechbaumer
c4d6b35726 do not log WindowUpdateFrame frames 2015-08-31 22:22:10 +02:00
Maximilian Hils
481cc6ea84 we don't support socks auth, refs #738 2015-08-31 17:29:14 +02:00
Maximilian Hils
b04e6e56ab update inline script hooks 2015-08-31 17:05:52 +02:00
Maximilian Hils
41e6e538df fix layer initialization 2015-08-31 13:49:47 +02:00
Maximilian Hils
7450bef615 fix dns_spoofing example, avoid connecting to itself 2015-08-31 13:43:30 +02:00
Maximilian Hils
1e9aef5b1e fix upstream proxy server change, update example 2015-08-31 00:14:42 +02:00
Maximilian Hils
63ad4a4f51 coverage++ 2015-08-30 15:59:50 +02:00
Maximilian Hils
a86ec56012 move files around 2015-08-30 15:27:29 +02:00
Maximilian Hils
421b241ff0 remove http2http references 2015-08-30 13:40:23 +02:00
Maximilian Hils
3873e08339 remove old code 2015-08-30 03:42:11 +02:00
Maximilian Hils
08655cb956 Merge remote-tracking branch 'origin/master' into proxy-refactor-cb 2015-08-30 03:24:05 +02:00