aboutsummaryrefslogtreecommitdiffstats
path: root/examples/mitmproxywrapper.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2015-06-01 12:32:03 +1200
committerAldo Cortesi <aldo@nullcube.com>2015-06-01 12:32:03 +1200
commit7439e244a6ac0bc5ef4ffcbfbf312b91373de0ef (patch)
treea4131e57c04eef26db39c57e79a69899f6e06069 /examples/mitmproxywrapper.py
parent50df036db5bd38a2639955674726a70cc643f32d (diff)
parentc28cc6fe96becc3dae860f0abca4b00149372743 (diff)
downloadmitmproxy-7439e244a6ac0bc5ef4ffcbfbf312b91373de0ef.tar.gz
mitmproxy-7439e244a6ac0bc5ef4ffcbfbf312b91373de0ef.tar.bz2
mitmproxy-7439e244a6ac0bc5ef4ffcbfbf312b91373de0ef.zip
Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy
Diffstat (limited to 'examples/mitmproxywrapper.py')
-rwxr-xr-xexamples/mitmproxywrapper.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/mitmproxywrapper.py b/examples/mitmproxywrapper.py
index 239642d7..7ea10715 100755
--- a/examples/mitmproxywrapper.py
+++ b/examples/mitmproxywrapper.py
@@ -32,14 +32,14 @@ class Wrapper(object):
return dict([re.findall(r'([^:]+): (.*)', line)[0] for line in state])
def enable_proxy_for_service(self, service):
- print 'Enabling proxy on {}...'.format(service)
+ print('Enabling proxy on {}...'.format(service))
for subcommand in ['-setwebproxy', '-setsecurewebproxy']:
self.run_networksetup_command(
subcommand, service, '127.0.0.1', str(
self.port))
def disable_proxy_for_service(self, service):
- print 'Disabling proxy on {}...'.format(service)
+ print('Disabling proxy on {}...'.format(service))
for subcommand in ['-setwebproxystate', '-setsecurewebproxystate']:
self.run_networksetup_command(subcommand, service, 'Off')
@@ -129,7 +129,7 @@ class Wrapper(object):
@classmethod
def ensure_superuser(cls):
if os.getuid() != 0:
- print 'Relaunching with sudo...'
+ print('Relaunching with sudo...')
os.execv('/usr/bin/sudo', ['/usr/bin/sudo'] + sys.argv)
@classmethod