Commit 74a67740 authored by Medicean's avatar Medicean

(Enhance:Database) 检测数据库函数支持(ASP, ASPX)

parent 5fb08ba3
......@@ -11,7 +11,7 @@
### 数据管理
* 新增「测试连接」功能
* 新增「检测」功能, 检测支持的数据库函数(目前仅 PHP 有效)
* 新增「检测」功能, 检测支持的数据库函数(目前仅 PHP,ASP,ASPX 有效, ASP(X)仅检测使用到的组件是否存在)
* 新增 php sqlsrv 连接方式, php5.3之后 mssql 默认不存在,可使用该类型连接 sqlserver >= 2008
> 如果直连shell本地sqlserver, host 部分填 localhost 或者 (local)
......
......@@ -7,6 +7,15 @@ module.exports = () => ({
info:
`Dim S:SET C=CreateObject("Scripting.FileSystemObject"):If Err Then:S="ERROR:// "&Err.Description:Err.Clear:Else:S=Server.Mappath(".")&chr(9):For Each D in C.Drives:S=S&D.DriveLetter&chr(58):Next:End If:Response.Write(S)`,
probedb: // 检测数据库函数支持
``.replace(/\n\s+/g, ''),
`Function fe(strobj):
on error resume next:
fe=0:
server.CreateObject(strobj):
If -2147221005 <> Err then:fe=1:End If:
End Function:
m="Adodb.Connection|Adodb.RecordSet":
m=split(m,"|"):
for i=0 to ubound(m):
Response.Write(m(i)&chr(9)&fe(m(i))&chr(10)):
next:`.replace(/\n\s+/g, ''),
})
......@@ -7,6 +7,10 @@ module.exports = () => ({
info:
`var c=System.IO.Directory.GetLogicalDrives();Response.Write(Server.MapPath(".")+"\t");for(var i=0;i<=c.length-1;i++)Response.Write(c[i][0]+":");Response.Write("\t"+Environment.OSVersion+"\t");Response.Write(Environment.UserName);`,
probedb: // 检测数据库函数支持
``.replace(/\n\s+/g, ''),
`function fe(S:String){try{new ActiveXObject(S);return 1;}catch(Exception){return 0;}};
var n="Adodb.Connection|Adodb.RecordSet";
n=n.Split("|");
for(var i=0;i<n.length;i++)Response.Write(n[i]+"\\t"+fe(n[i])+"\\n");
`.replace(/\n\s+/g, ''),
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment