str() -> unicode()

This commit is contained in:
Miroslav Stampar
2010-05-28 13:05:02 +00:00
parent f24187f251
commit a3db3c03c1
17 changed files with 31 additions and 31 deletions

View File

@@ -94,7 +94,7 @@ class Fingerprint(GenericFingerprint):
for i in xrange(len(table)):
version, checks = table[i]
failed = False
check = checks[randomRange(0,len(checks)-1)].replace("%d", str(randomRange(1,100)))
check = checks[randomRange(0,len(checks)-1)].replace("%d", unicode(randomRange(1,100)))
payload = agent.fullPayload(check)
result = Request.queryPage(payload)
if result:

View File

@@ -217,7 +217,7 @@ class Fingerprint(GenericFingerprint):
for sp in sps:
query = "(SELECT LEN(%s) FROM %s WHERE %s " % (self.tblField, self.fileTblName, self.tblField)
query += "LIKE '%Service Pack " + str(sp) + "%')>0"
query += "LIKE '%Service Pack " + unicode(sp) + "%')>0"
query = agent.forgeCaseStatement(query)
if inject.getValue(query, charsetType=1) == "1":

View File

@@ -76,7 +76,7 @@ class Fingerprint(GenericFingerprint):
for version in range(element[0], element[1] + 1):
randInt = randomInt()
version = str(version)
version = unicode(version)
query = agent.prefixQuery(" /*!%s AND %d=%d*/" % (version, randInt, randInt + 1))
query = agent.postfixQuery(query)
payload = agent.payload(newValue=query)
@@ -168,7 +168,7 @@ class Fingerprint(GenericFingerprint):
infoMsg = "testing MySQL"
logger.info(infoMsg)
randInt = str(randomInt(1))
randInt = unicode(randomInt(1))
payload = agent.fullPayload(" AND CONNECTION_ID()=CONNECTION_ID()")
result = Request.queryPage(payload)

View File

@@ -97,7 +97,7 @@ class Fingerprint(GenericFingerprint):
infoMsg = "testing PostgreSQL"
logger.info(infoMsg)
randInt = str(randomInt(1))
randInt = unicode(randomInt(1))
payload = agent.fullPayload(" AND %s::int=%s" % (randInt, randInt))
result = Request.queryPage(payload)