From 89292ce1f9be40558299b6db9350cca4bd849e57 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sun, 30 Aug 2015 22:52:24 +0200 Subject: [PATCH] Closes #1376 --- lib/core/wordlist.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/core/wordlist.py b/lib/core/wordlist.py index bc4e486a1..e7c902beb 100644 --- a/lib/core/wordlist.py +++ b/lib/core/wordlist.py @@ -41,7 +41,13 @@ class Wordlist(object): else: self.current = self.filenames[self.index] if os.path.splitext(self.current)[1].lower() == ".zip": - _ = zipfile.ZipFile(self.current, 'r') + try: + _ = zipfile.ZipFile(self.current, 'r') + except zipfile.error, ex: + errMsg = "something seems to be wrong with " + errMsg += "the file '%s' ('%s'). Please make " % (self.current, ex) + errMsg += "sure that you haven't made any changes to it" + raise SqlmapInstallationException, errMsg if len(_.namelist()) == 0: errMsg = "no file(s) inside '%s'" % self.current raise SqlmapDataException(errMsg)