Reverting set() brace form because of Python 2.6 compatibility issues

This commit is contained in:
Miroslav Stampar
2018-01-31 11:24:28 +01:00
parent 0a8bc52910
commit 10fd004dec
8 changed files with 18 additions and 15 deletions

View File

@@ -770,7 +770,7 @@ def getManualDirectories():
checkFile(listPath)
directories = getFileItems(listPath)
elif choice == '4':
targets = {conf.hostname}
targets = set([conf.hostname])
_ = conf.hostname.split('.')
if _[0] == "www":

View File

@@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
from lib.core.enums import OS
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.2.1.22"
VERSION = "1.2.1.23"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@@ -205,7 +205,7 @@ class Web:
if readInput(message, default='Y', boolean=True):
headers = {}
been = {conf.url}
been = set([conf.url])
for match in re.finditer(r"=['\"]((https?):)?(//[^/'\"]+)?(/[\w/.-]*)\bwp-", kb.originalPage or "", re.I):
url = "%s%s" % (conf.url.replace(conf.path, match.group(4)), "wp-content/wp-db.php")

View File

@@ -126,7 +126,7 @@ def crawl(target):
dataToStdout("\r[%s] [INFO] %s" % (time.strftime("%X"), status), True)
threadData.shared.deeper = set()
threadData.shared.unprocessed = {target}
threadData.shared.unprocessed = set([target])
if not conf.sitemapUrl:
message = "do you want to check for the existence of "

View File

@@ -180,7 +180,7 @@ class Response:
"size": len(self.content or "")
}
binary = {'\0', '\1'}
binary = set(['\0', '\1'])
if any(c in binary for c in self.content):
content["encoding"] = "base64"
content["text"] = base64.b64encode(self.content)