aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/contrib/wbxml/ASCommandResponse.py
diff options
context:
space:
mode:
Diffstat (limited to 'mitmproxy/contrib/wbxml/ASCommandResponse.py')
-rw-r--r--mitmproxy/contrib/wbxml/ASCommandResponse.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mitmproxy/contrib/wbxml/ASCommandResponse.py b/mitmproxy/contrib/wbxml/ASCommandResponse.py
index 2d60eb2d..34755cbe 100644
--- a/mitmproxy/contrib/wbxml/ASCommandResponse.py
+++ b/mitmproxy/contrib/wbxml/ASCommandResponse.py
@@ -63,8 +63,9 @@ if __name__ == "__main__":
listOfSamples = os.listdir(samplesDir)
for filename in listOfSamples:
- byteWBXML = open(samplesDir + os.sep + filename, "rb").read()
-
+ with open(samplesDir + os.sep + filename, "rb") as f:
+ byteWBXML = f.read()
+
logging.info("-"*100)
logging.info(filename)
logging.info("-"*100)