mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-09 16:10:35 +03:00
fixes for Sybase
This commit is contained in:
parent
4d51fa8155
commit
4188df0501
|
@ -167,6 +167,14 @@ class Enumeration(GenericEnumeration):
|
||||||
|
|
||||||
conf.db = safeSQLIdentificatorNaming(conf.db)
|
conf.db = safeSQLIdentificatorNaming(conf.db)
|
||||||
|
|
||||||
|
if conf.col:
|
||||||
|
colList = conf.col.split(",")
|
||||||
|
else:
|
||||||
|
colList = []
|
||||||
|
|
||||||
|
for col in colList:
|
||||||
|
colList[colList.index(col)] = safeSQLIdentificatorNaming(col)
|
||||||
|
|
||||||
if conf.tbl:
|
if conf.tbl:
|
||||||
tblList = conf.tbl.split(",")
|
tblList = conf.tbl.split(",")
|
||||||
else:
|
else:
|
||||||
|
@ -202,6 +210,12 @@ class Enumeration(GenericEnumeration):
|
||||||
|
|
||||||
return { conf.db: kb.data.cachedColumns[conf.db]}
|
return { conf.db: kb.data.cachedColumns[conf.db]}
|
||||||
|
|
||||||
|
if colList:
|
||||||
|
table = {}
|
||||||
|
table[unsafeSQLIdentificatorNaming(tbl)] = dict(map(lambda x: (x, None), colList))
|
||||||
|
kb.data.cachedColumns[unsafeSQLIdentificatorNaming(conf.db)] = table
|
||||||
|
continue
|
||||||
|
|
||||||
infoMsg = "fetching columns "
|
infoMsg = "fetching columns "
|
||||||
infoMsg += "for table '%s' " % tbl
|
infoMsg += "for table '%s' " % tbl
|
||||||
infoMsg += "on database '%s'" % conf.db
|
infoMsg += "on database '%s'" % conf.db
|
||||||
|
@ -219,8 +233,8 @@ class Enumeration(GenericEnumeration):
|
||||||
for name, type_ in zip(retVal[0]["%s.name" % randStr], retVal[0]["%s.usertype" % randStr]):
|
for name, type_ in zip(retVal[0]["%s.name" % randStr], retVal[0]["%s.usertype" % randStr]):
|
||||||
columns[name] = sybaseTypes.get(type_, type_)
|
columns[name] = sybaseTypes.get(type_, type_)
|
||||||
|
|
||||||
table[tbl] = columns
|
table[unsafeSQLIdentificatorNaming(tbl)] = columns
|
||||||
kb.data.cachedColumns[conf.db] = table
|
kb.data.cachedColumns[unsafeSQLIdentificatorNaming(conf.db)] = table
|
||||||
|
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
|
@ -524,7 +524,7 @@
|
||||||
<blind/>
|
<blind/>
|
||||||
</columns>
|
</columns>
|
||||||
<dump_table>
|
<dump_table>
|
||||||
<inband query="SELECT %s FROM %s..%s"/>
|
<inband query="SELECT %s FROM %s.%s"/>
|
||||||
<blind query="SELECT MIN(%s) FROM %s WHERE CONVERT(NVARCHAR(4000),%s)>'%s'" query2="SELECT MAX(%s) FROM %s WHERE CONVERT(NVARCHAR(4000),%s) LIKE '%s'" count="SELECT COUNT(*) FROM %s" count2="SELECT COUNT(*) FROM (SELECT DISTINCT %s FROM %s) AS value_table"/>
|
<blind query="SELECT MIN(%s) FROM %s WHERE CONVERT(NVARCHAR(4000),%s)>'%s'" query2="SELECT MAX(%s) FROM %s WHERE CONVERT(NVARCHAR(4000),%s) LIKE '%s'" count="SELECT COUNT(*) FROM %s" count2="SELECT COUNT(*) FROM (SELECT DISTINCT %s FROM %s) AS value_table"/>
|
||||||
</dump_table>
|
</dump_table>
|
||||||
<search_db>
|
<search_db>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user