diff --git a/mitmproxy/addons/cut.py b/mitmproxy/addons/cut.py index 4fcea3427..c75c14ca7 100644 --- a/mitmproxy/addons/cut.py +++ b/mitmproxy/addons/cut.py @@ -107,8 +107,8 @@ class Cut: fp.write(v.encode("utf8")) ctx.log.alert("Saved single cut.") else: - with open(path, "a" if append else "w", newline='', encoding="utf8") as fp: - writer = csv.writer(fp) + with open(path, "a" if append else "w", newline='', encoding="utf8") as tfp: + writer = csv.writer(tfp) for f in flows: vals = [extract(c, f) for c in cuts] writer.writerow( diff --git a/mitmproxy/contrib/kaitaistruct/__init__.py b/mitmproxy/contrib/kaitaistruct/__init__.py new file mode 100644 index 000000000..e69de29bb