From ce98a9219e060b729d4b0d2dc28bf4510649f0fd Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Mon, 17 Oct 2016 16:38:31 +1300 Subject: test & examples: zap six --- examples/sslstrip.py | 2 +- examples/upsidedownternet.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/sslstrip.py b/examples/sslstrip.py index 41cce896..b5e46397 100644 --- a/examples/sslstrip.py +++ b/examples/sslstrip.py @@ -1,5 +1,5 @@ import re -from six.moves import urllib +import urllib # set of SSL/TLS capable hosts secure_hosts = set() diff --git a/examples/upsidedownternet.py b/examples/upsidedownternet.py index d5059092..d4de7e25 100644 --- a/examples/upsidedownternet.py +++ b/examples/upsidedownternet.py @@ -1,13 +1,13 @@ -from six.moves import cStringIO as StringIO +import io from PIL import Image def response(flow): if flow.response.headers.get("content-type", "").startswith("image"): try: - s = StringIO(flow.response.content) + s = io.StringIO(flow.response.content) img = Image.open(s).rotate(180) - s2 = StringIO() + s2 = io.StringIO() img.save(s2, "png") flow.response.content = s2.getvalue() flow.response.headers["content-type"] = "image/png" -- cgit v1.2.3