Comments (2)
这个问题很早在 2.0-beta 中已经修了,给你看一下 diff 文件
diff --git a/source/core/asp/template/database/sqlserver.js b/source/core/asp/template/database/sqlserver.js
index d2053a0..01d6b13 100644
--- a/source/core/asp/template/database/sqlserver.js
+++ b/source/core/asp/template/database/sqlserver.js
@@ -6,13 +6,13 @@ module.exports = (arg1, arg2, arg3, arg4, arg5, arg6) => ({
// 显示所有数据库
show_databases: {
_:
- `Set Conn=Server.CreateObject("Adodb.connection"):Dim SI:Conn.Open bd(Request("z1")):If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:Set Rs=CreateObject("Adodb.Recordset"):Rs.open "select [name] from master.dbo.sysdatabases order by 1",Conn,1,1:If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:Do While Not(Rs.Eof Or Rs.Bof):SI=SI&Rs(0)&chr(9):Rs.MoveNext:Loop:Rs.Close:End If:Set Rs=Nothing:Conn.Close:End If:Set Conn=Nothing:Response.Write(SI)`,
+ `Set Conn=Server.CreateObject("Adodb.connection"):Dim SI:Conn.Open bd(Request("${arg1}")):If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:Set Rs=CreateObject("Adodb.Recordset"):Rs.open "select [name] from master.dbo.sysdatabases order by 1",Conn,1,1:If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:Do While Not(Rs.Eof Or Rs.Bof):SI=SI&Rs(0)&chr(9):Rs.MoveNext:Loop:Rs.Close:End If:Set Rs=Nothing:Conn.Close:End If:Set Conn=Nothing:Response.Write(SI)`,
[arg1]: '#{hex::conn}'
},
// 显示数据库所有表
show_tables: {
_:
- `Set Conn=Server.CreateObject("Adodb.connection"):Dim SI:Conn.Open ""&bd(Request("z1"))&"":If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:Set Rs=Conn.Execute("USE ["&Request("z2")&"];SELECT [name] FROM sysobjects WHERE (xtype=\'U\') ORDER BY 1"):If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:Do While Not(Rs.Eof Or Rs.Bof):SI=SI&Rs(0)&chr(9):Rs.MoveNext:Loop:End If:Set Rs=Nothing:Conn.Close:End If:Set Conn=Nothing:Response.Write(SI)`,
+ `Set Conn=Server.CreateObject("Adodb.connection"):Dim SI:Conn.Open ""&bd(Request("${arg1}"))&"":If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:Set Rs=Conn.Execute("USE ["&Request("${arg2}")&"];SELECT [name] FROM sysobjects WHERE (xtype=\'U\') ORDER BY 1"):If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:Do While Not(Rs.Eof Or Rs.Bof):SI=SI&Rs(0)&chr(9):Rs.MoveNext:Loop:End If:Set Rs=Nothing:Conn.Close:End If:Set Conn=Nothing:Response.Write(SI)`,
[arg1]: '#{hex::conn}',
[arg2]: '#{dbname}'
},
from antsword.
这是数据库和表的。但是这两项获取是正常的。问题在于获取字段,发出 Request 请求都没有。奈何我太菜了,不知如何Debug.(顺便问下,为啥console.log()无法打印变量)但可以判断出问题在这里。
this.core.request(
this.core[`database_${conf['type']}`].show_columns({
conn: conf['conn'],
table: conf['type'] === 'oracle' ? `SELECT * FROM (SELECT A.*,ROWNUM N FROM ${table} A) WHERE N=1` : `SELECT TOP 10 * FROM ${table}`
})
)
from antsword.
Related Issues (20)
- 命令执行bug
- Mime 库大小写导致 Ubuntu、Kali 下载入报错 HOT 8
- 更新antSword-2.1.15后 数据库连接正常可是无法操作数据库,使用antSword-2.1.14 正常 HOT 2
- 域名证书过期,连不上,错误{"code":"CERT_HAS_EXPIRED"} HOT 1
- download 操作 response 支持加密,并且能够通过编写解码器自定义回显及解析 HOT 2
- 出错 请求超时 请将时间间隔调大 HOT 1
- bug HOT 2
- 插件市场多次尝试打不开 HOT 2
- v2.1.15版本不支持Linux HOT 4
- antSword-2.1.15 php webshell 查询数据库报错 HOT 1
- burp代理服务器无法代理,但burp可以抓取浏览器的数据包 HOT 1
- 数据库连接端口设置 HOT 4
- 关于base64出现的一些报错 HOT 7
- BUG:此处需要物件 HOT 2
- 为什么不支持$_GET类型的啊 HOT 4
- Linux端无法关闭程序的情况 HOT 4
- 客户端连接报错:"code":"DEPTH_ZERO_SELF_SIGNED_CERT" HOT 1
- 为什么我初始化后打开只显示一只猫 HOT 3
- 在linux上启动报错 HOT 1
- php webshell 连接mysql数据库执行SQL语句卡死一直转圈 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from antsword.