mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
minor update regarding Sybase support
This commit is contained in:
parent
de7ca5a27c
commit
e0efe453ab
56
lib/core/dicts.py
Normal file
56
lib/core/dicts.py
Normal file
|
@ -0,0 +1,56 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
$Id$
|
||||
|
||||
Copyright (c) 2006-2010 sqlmap developers (http://sqlmap.sourceforge.net/)
|
||||
See the file 'doc/COPYING' for copying permission
|
||||
"""
|
||||
|
||||
firebirdTypes = {
|
||||
"261":"BLOB",
|
||||
"14":"CHAR",
|
||||
"40":"CSTRING",
|
||||
"11":"D_FLOAT",
|
||||
"27":"DOUBLE",
|
||||
"10":"FLOAT",
|
||||
"16":"INT64",
|
||||
"8":"INTEGER",
|
||||
"9":"QUAD",
|
||||
"7":"SMALLINT",
|
||||
"12":"DATE",
|
||||
"13":"TIME",
|
||||
"35":"TIMESTAMP",
|
||||
"37":"VARCHAR"
|
||||
}
|
||||
|
||||
sybaseTypes = {
|
||||
"14","floatn"
|
||||
"8","float"
|
||||
"15","datetimn"
|
||||
"12","datetime"
|
||||
"23","real"
|
||||
"28","numericn"
|
||||
"10","numeric"
|
||||
"27","decimaln"
|
||||
"26","decimal"
|
||||
"17","moneyn"
|
||||
"11","money"
|
||||
"21","smallmoney"
|
||||
"22","smalldatetime"
|
||||
"13","intn"
|
||||
"7","int"
|
||||
"6","smallint"
|
||||
"5","tinyint"
|
||||
"16","bit"
|
||||
"2","varchar"
|
||||
"18","sysname"
|
||||
"25","nvarchar"
|
||||
"1","char"
|
||||
"24","nchar"
|
||||
"4","varbinary"
|
||||
"80","timestamp"
|
||||
"3","binary"
|
||||
"19","text"
|
||||
"20","image"
|
||||
}
|
|
@ -36,6 +36,8 @@ from lib.core.data import kb
|
|||
from lib.core.data import logger
|
||||
from lib.core.data import paths
|
||||
from lib.core.data import queries
|
||||
from lib.core.dicts import firebirdTypes
|
||||
from lib.core.dicts import sybaseTypes
|
||||
from lib.core.enums import DBMS
|
||||
from lib.core.enums import EXPECTED
|
||||
from lib.core.enums import PAYLOAD
|
||||
|
@ -957,23 +959,6 @@ class Enumeration:
|
|||
else:
|
||||
return columnExists(paths.COMMON_COLUMNS)
|
||||
|
||||
firebirdTypes = {
|
||||
"261":"BLOB",
|
||||
"14":"CHAR",
|
||||
"40":"CSTRING",
|
||||
"11":"D_FLOAT",
|
||||
"27":"DOUBLE",
|
||||
"10":"FLOAT",
|
||||
"16":"INT64",
|
||||
"8":"INTEGER",
|
||||
"9":"QUAD",
|
||||
"7":"SMALLINT",
|
||||
"12":"DATE",
|
||||
"13":"TIME",
|
||||
"35":"TIMESTAMP",
|
||||
"37":"VARCHAR"
|
||||
}
|
||||
|
||||
rootQuery = queries[Backend.getIdentifiedDbms()].columns
|
||||
condition = rootQuery.blind.condition if 'condition' in rootQuery.blind else None
|
||||
|
||||
|
|
|
@ -507,8 +507,8 @@
|
|||
<blind query="SELECT MIN(name) FROM %s..sysobjects WHERE type IN ('U') AND name > '%s'" count="SELECT LTRIM(STR(COUNT(name))) FROM %s..sysobjects WHERE type IN ('U')"/>
|
||||
</tables>
|
||||
<columns>
|
||||
<inband query="SELECT %s..syscolumns.name, TYPE_NAME(%s..syscolumns.xtype) FROM %s..syscolumns, %s..sysobjects WHERE %s..syscolumns.id=%s..sysobjects.id AND %s..sysobjects.name='%s'" condition="[DB]..syscolumns.name"/>
|
||||
<blind query="SELECT %s..syscolumns.name FROM %s..syscolumns, %s..sysobjects WHERE %s..syscolumns.id=%s..sysobjects.id AND %s..sysobjects.name='%s'" query2="SELECT TYPE_NAME(%s..syscolumns.xtype) FROM %s..syscolumns, %s..sysobjects WHERE %s..syscolumns.name='%s' AND %s..syscolumns.id=%s..sysobjects.id AND %s..sysobjects.name='%s'" count="SELECT LTRIM(STR(COUNT(name))) FROM %s..syscolumns WHERE id=(SELECT id FROM %s..sysobjects WHERE name='%s')" condition="[DB]..syscolumns.name"/>
|
||||
<inband query="SELECT %s..syscolumns.name,%s..syscolumns.usertype FROM %s..syscolumns, %s..sysobjects WHERE %s..syscolumns.id=%s..sysobjects.id AND %s..sysobjects.name='%s'" condition="[DB]..syscolumns.name"/>
|
||||
<blind/>
|
||||
</columns>
|
||||
<dump_table>
|
||||
<inband query="SELECT %s FROM %s..%s"/>
|
||||
|
|
Loading…
Reference in New Issue
Block a user