Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
antSword
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HuangJunbo
antSword
Commits
74a67740
Commit
74a67740
authored
Mar 06, 2019
by
Medicean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Enhance:Database) 检测数据库函数支持(ASP, ASPX)
parent
5fb08ba3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
CHANGELOG.md
CHANGELOG.md
+1
-1
base.js
source/core/asp/template/base.js
+11
-2
base.js
source/core/aspx/template/base.js
+5
-1
No files found.
CHANGELOG.md
View file @
74a67740
...
...
@@ -11,7 +11,7 @@
### 数据管理
*
新增「测试连接」功能
*
新增「检测」功能, 检测支持的数据库函数(目前仅 PHP
有效
)
*
新增「检测」功能, 检测支持的数据库函数(目前仅 PHP
,ASP,ASPX 有效, ASP(X)仅检测使用到的组件是否存在
)
*
新增 php sqlsrv 连接方式, php5.3之后 mssql 默认不存在,可使用该类型连接 sqlserver >= 2008
> 如果直连shell本地sqlserver, host 部分填 localhost 或者 (local)
...
...
source/core/asp/template/base.js
View file @
74a67740
...
...
@@ -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
,
''
),
})
source/core/aspx/template/base.js
View file @
74a67740
...
...
@@ -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
,
''
),
})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment