diff options
| author | Aldo Cortesi <aldo@corte.si> | 2016-10-17 17:03:02 +1300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-17 17:03:02 +1300 |
| commit | ae3ff8ee1edc646e7a640219df1a312c27f7c339 (patch) | |
| tree | 490697113ceaf12cc704c418357139e60a0190f3 /examples | |
| parent | 3fbce7e981cab5d20b3ef17a50f14b34e8c60fa3 (diff) | |
| parent | ce98a9219e060b729d4b0d2dc28bf4510649f0fd (diff) | |
| download | mitmproxy-ae3ff8ee1edc646e7a640219df1a312c27f7c339.tar.gz mitmproxy-ae3ff8ee1edc646e7a640219df1a312c27f7c339.tar.bz2 mitmproxy-ae3ff8ee1edc646e7a640219df1a312c27f7c339.zip | |
Merge pull request #1615 from cortesi/python3a
exterminate six
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/sslstrip.py | 2 | ||||
| -rw-r--r-- | examples/upsidedownternet.py | 6 |
2 files changed, 4 insertions, 4 deletions
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" |
