mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 13:14:13 +03:00
Implementation for an Issue #67
This commit is contained in:
parent
4fc462c4d9
commit
dcf8a27f12
|
@ -935,7 +935,7 @@ def setPaths():
|
||||||
paths.SQL_KEYWORDS = os.path.join(paths.SQLMAP_TXT_PATH, "keywords.txt")
|
paths.SQL_KEYWORDS = os.path.join(paths.SQLMAP_TXT_PATH, "keywords.txt")
|
||||||
paths.SMALL_DICT = os.path.join(paths.SQLMAP_TXT_PATH, "smalldict.txt")
|
paths.SMALL_DICT = os.path.join(paths.SQLMAP_TXT_PATH, "smalldict.txt")
|
||||||
paths.USER_AGENTS = os.path.join(paths.SQLMAP_TXT_PATH, "user-agents.txt")
|
paths.USER_AGENTS = os.path.join(paths.SQLMAP_TXT_PATH, "user-agents.txt")
|
||||||
paths.WORDLIST = os.path.join(paths.SQLMAP_TXT_PATH, "wordlist.txt")
|
paths.WORDLIST = os.path.join(paths.SQLMAP_TXT_PATH, "wordlist.zip")
|
||||||
paths.PHPIDS_RULES_XML = os.path.join(paths.SQLMAP_XML_PATH, "phpids_rules.xml")
|
paths.PHPIDS_RULES_XML = os.path.join(paths.SQLMAP_XML_PATH, "phpids_rules.xml")
|
||||||
paths.ERRORS_XML = os.path.join(paths.SQLMAP_XML_PATH, "errors.xml")
|
paths.ERRORS_XML = os.path.join(paths.SQLMAP_XML_PATH, "errors.xml")
|
||||||
paths.PAYLOADS_XML = os.path.join(paths.SQLMAP_XML_PATH, "payloads.xml")
|
paths.PAYLOADS_XML = os.path.join(paths.SQLMAP_XML_PATH, "payloads.xml")
|
||||||
|
|
|
@ -5,6 +5,11 @@ Copyright (c) 2006-2012 sqlmap developers (http://sqlmap.org/)
|
||||||
See the file 'doc/COPYING' for copying permission
|
See the file 'doc/COPYING' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
import zipfile
|
||||||
|
|
||||||
|
from lib.core.exception import sqlmapDataException
|
||||||
|
|
||||||
class Wordlist:
|
class Wordlist:
|
||||||
"""
|
"""
|
||||||
Iterator for looping over a large dictionaries
|
Iterator for looping over a large dictionaries
|
||||||
|
@ -32,7 +37,14 @@ class Wordlist:
|
||||||
self.iter = iter(self.custom)
|
self.iter = iter(self.custom)
|
||||||
else:
|
else:
|
||||||
current = self.filenames[self.index]
|
current = self.filenames[self.index]
|
||||||
self.fp = open(current, "r")
|
if os.path.splitext(current)[1].lower() == ".zip":
|
||||||
|
_ = zipfile.ZipFile(current, 'r')
|
||||||
|
if len(_.namelist()) == 0:
|
||||||
|
errMsg = "no file(s) inside '%s'" % current
|
||||||
|
raise sqlmapDataException, errMsg
|
||||||
|
self.fp = _.open(_.namelist()[0])
|
||||||
|
else:
|
||||||
|
self.fp = open(current, 'r')
|
||||||
self.iter = iter(self.fp)
|
self.iter = iter(self.fp)
|
||||||
|
|
||||||
self.index += 1
|
self.index += 1
|
||||||
|
|
907684
txt/wordlist.txt
907684
txt/wordlist.txt
File diff suppressed because it is too large
Load Diff
BIN
txt/wordlist.zip
Normal file
BIN
txt/wordlist.zip
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user