├── README.md
├── wpe.ico
├── ProcessInjector
├── wpe.ico
├── EasyHook32.dll
├── EasyHook64.dll
├── EasyLoad32.dll
├── EasyLoad64.dll
├── EasyHook32Svc.exe
├── EasyHook64Svc.exe
├── packages.config
├── App.config
├── Properties
│ ├── Settings.settings
│ ├── AssemblyInfo.cs
│ ├── Settings.Designer.cs
│ ├── Resources.Designer.cs
│ ├── app.manifest
│ └── Resources.resx
├── ListViewNF.designer.cs
├── ListViewNF.cs
├── Program.cs
├── ComputerInfo.cs
├── ProcessList_Form.cs
├── Injector_Form.cs
├── Injector_Form.Designer.cs
├── ProcessInjector.csproj
├── ProcessList_Form.Designer.cs
└── ProcessList_Form.resx
├── WPELibrary
├── EasyHook32.dll
├── EasyHook64.dll
├── EasyLoad32.dll
├── EasyLoad64.dll
├── EasyHook32Svc.exe
├── EasyHook64Svc.exe
├── packages.config
├── Lib
│ ├── SocketEvent.cs
│ ├── SocketSend.cs
│ ├── MainClass.cs
│ ├── SocketPacket.cs
│ ├── SocketInfo.cs
│ ├── WinSockHook.cs
│ └── SocketOperation.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── WPELibrary.csproj
├── SocketSend_Form.cs
├── SocketBatchSend_Form.resx
├── SocketBatchSend_Form.cs
├── SocketSend_Form.resx
├── DLL_Form.cs
├── SocketBatchSend_Form.Designer.cs
└── SocketSend_Form.Designer.cs
├── packages
└── repositories.config
├── .gitignore
└── WinPacketsEdit.sln
/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvtx/WinPacketsEdit/HEAD/README.md
--------------------------------------------------------------------------------
/wpe.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvtx/WinPacketsEdit/HEAD/wpe.ico
--------------------------------------------------------------------------------
/ProcessInjector/wpe.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvtx/WinPacketsEdit/HEAD/ProcessInjector/wpe.ico
--------------------------------------------------------------------------------
/WPELibrary/EasyHook32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvtx/WinPacketsEdit/HEAD/WPELibrary/EasyHook32.dll
--------------------------------------------------------------------------------
/WPELibrary/EasyHook64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvtx/WinPacketsEdit/HEAD/WPELibrary/EasyHook64.dll
--------------------------------------------------------------------------------
/WPELibrary/EasyLoad32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvtx/WinPacketsEdit/HEAD/WPELibrary/EasyLoad32.dll
--------------------------------------------------------------------------------
/WPELibrary/EasyLoad64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvtx/WinPacketsEdit/HEAD/WPELibrary/EasyLoad64.dll
--------------------------------------------------------------------------------
/WPELibrary/EasyHook32Svc.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvtx/WinPacketsEdit/HEAD/WPELibrary/EasyHook32Svc.exe
--------------------------------------------------------------------------------
/WPELibrary/EasyHook64Svc.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvtx/WinPacketsEdit/HEAD/WPELibrary/EasyHook64Svc.exe
--------------------------------------------------------------------------------
/ProcessInjector/EasyHook32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvtx/WinPacketsEdit/HEAD/ProcessInjector/EasyHook32.dll
--------------------------------------------------------------------------------
/ProcessInjector/EasyHook64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvtx/WinPacketsEdit/HEAD/ProcessInjector/EasyHook64.dll
--------------------------------------------------------------------------------
/ProcessInjector/EasyLoad32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvtx/WinPacketsEdit/HEAD/ProcessInjector/EasyLoad32.dll
--------------------------------------------------------------------------------
/ProcessInjector/EasyLoad64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvtx/WinPacketsEdit/HEAD/ProcessInjector/EasyLoad64.dll
--------------------------------------------------------------------------------
/ProcessInjector/EasyHook32Svc.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvtx/WinPacketsEdit/HEAD/ProcessInjector/EasyHook32Svc.exe
--------------------------------------------------------------------------------
/ProcessInjector/EasyHook64Svc.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvtx/WinPacketsEdit/HEAD/ProcessInjector/EasyHook64Svc.exe
--------------------------------------------------------------------------------
/WPELibrary/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProcessInjector/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProcessInjector/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/packages/repositories.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/ProcessInjector/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/WPELibrary/Lib/SocketEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace WPELibrary.Lib
8 | {
9 | public class SocketEvent
10 | {
11 | public delegate void SocketPacketReceived(SocketInfo si);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
3 | ################################################################################
4 |
5 | /.vs/WinPacketsEdit/v14
6 | /Build
7 | /packages/EasyHook.2.7.7097
8 | /ProcessInjector/obj
9 | /WPELibrary/obj
10 |
--------------------------------------------------------------------------------
/WPELibrary/Lib/SocketSend.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Data;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace WPELibrary.Lib
9 | {
10 | class SocketSend
11 | {
12 | public static int iUseSocket = 0;
13 | public static bool bHasBatchSendForm = false;
14 | public static DataTable dtSocketBatchSend = new DataTable();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/WPELibrary/Lib/MainClass.cs:
--------------------------------------------------------------------------------
1 | using EasyHook;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Runtime.InteropServices;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using System.Windows.Forms;
9 |
10 | namespace WPELibrary.Lib
11 | {
12 | public class MainClass : IEntryPoint
13 | {
14 | [DllImport("user32.dll")]
15 | private static extern bool SetProcessDPIAware();
16 |
17 | public MainClass(RemoteHooking.IContext context, string channelName)
18 | {
19 |
20 | }
21 |
22 | public void Run(RemoteHooking.IContext context, string channelName)
23 | {
24 | if (Environment.OSVersion.Version.Major >= 6)
25 | {
26 | SetProcessDPIAware();
27 | }
28 |
29 | Application.EnableVisualStyles();
30 | Application.SetCompatibleTextRenderingDefault(false);
31 | Application.Run(new DLL_Form());
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/ProcessInjector/ListViewNF.designer.cs:
--------------------------------------------------------------------------------
1 | namespace ProcessInjector
2 | {
3 | partial class ListViewNF
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region 组件设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要修改
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | components = new System.ComponentModel.Container();
32 | }
33 |
34 | #endregion
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/WPELibrary/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("WPELibrary")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("X-NAS")]
12 | [assembly: AssemblyProduct("WPELibrary")]
13 | [assembly: AssemblyCopyright("Copyright © 2021")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("14612b06-5b07-47a4-8fe5-d3568aabaa8a")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.16")]
36 | [assembly: AssemblyFileVersion("1.0.0.16")]
37 |
--------------------------------------------------------------------------------
/ProcessInjector/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("封包拦截器")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("X-NAS")]
12 | [assembly: AssemblyProduct("ProcessInjector")]
13 | [assembly: AssemblyCopyright("Copyright © 2021")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("b5ed16ed-abd5-438b-a589-e8acc2377432")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.16")]
36 | [assembly: AssemblyFileVersion("1.0.0.16")]
37 |
--------------------------------------------------------------------------------
/ProcessInjector/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ProcessInjector.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/ProcessInjector/ListViewNF.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Diagnostics;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using System.Windows.Forms;
9 |
10 | namespace ProcessInjector
11 | {
12 | public partial class ListViewNF : ListView
13 | {
14 | public ListViewNF()
15 | {
16 | InitializeComponent();
17 | // 开启双缓冲
18 | this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
19 |
20 | // Enable the OnNotifyMessage event so we get a chance to filter out
21 | // Windows messages before they get to the form's WndProc
22 | this.SetStyle(ControlStyles.EnableNotifyMessage, true);
23 | }
24 |
25 | public ListViewNF(IContainer container)
26 | {
27 | container.Add(this);
28 |
29 | InitializeComponent();
30 | }
31 |
32 | protected override void OnNotifyMessage(Message m)
33 | {
34 | //Filter out the WM_ERASEBKGND message
35 | if (m.Msg != 0x14)
36 | {
37 | base.OnNotifyMessage(m);
38 | }
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/WinPacketsEdit.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProcessInjector", "ProcessInjector\ProcessInjector.csproj", "{C2A6A6AD-C8DB-4209-88E4-256FC823C05C}"
7 | ProjectSection(ProjectDependencies) = postProject
8 | {351B0F87-2972-4681-A7B7-38742F2F9710} = {351B0F87-2972-4681-A7B7-38742F2F9710}
9 | EndProjectSection
10 | EndProject
11 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPELibrary", "WPELibrary\WPELibrary.csproj", "{351B0F87-2972-4681-A7B7-38742F2F9710}"
12 | EndProject
13 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "说明文档", "说明文档", "{6B499F22-A635-4385-9F73-08801292F3C5}"
14 | ProjectSection(SolutionItems) = preProject
15 | README.md = README.md
16 | EndProjectSection
17 | EndProject
18 | Global
19 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
20 | Debug|Any CPU = Debug|Any CPU
21 | Release|Any CPU = Release|Any CPU
22 | EndGlobalSection
23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
24 | {C2A6A6AD-C8DB-4209-88E4-256FC823C05C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25 | {C2A6A6AD-C8DB-4209-88E4-256FC823C05C}.Debug|Any CPU.Build.0 = Debug|Any CPU
26 | {C2A6A6AD-C8DB-4209-88E4-256FC823C05C}.Release|Any CPU.ActiveCfg = Release|Any CPU
27 | {C2A6A6AD-C8DB-4209-88E4-256FC823C05C}.Release|Any CPU.Build.0 = Release|Any CPU
28 | {351B0F87-2972-4681-A7B7-38742F2F9710}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29 | {351B0F87-2972-4681-A7B7-38742F2F9710}.Debug|Any CPU.Build.0 = Debug|Any CPU
30 | {351B0F87-2972-4681-A7B7-38742F2F9710}.Release|Any CPU.ActiveCfg = Release|Any CPU
31 | {351B0F87-2972-4681-A7B7-38742F2F9710}.Release|Any CPU.Build.0 = Release|Any CPU
32 | EndGlobalSection
33 | GlobalSection(SolutionProperties) = preSolution
34 | HideSolutionNode = FALSE
35 | EndGlobalSection
36 | EndGlobal
37 |
--------------------------------------------------------------------------------
/ProcessInjector/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.Linq;
5 | using System.Runtime.InteropServices;
6 | using System.Security.Principal;
7 | using System.Threading.Tasks;
8 | using System.Windows.Forms;
9 |
10 | namespace ProcessInjector
11 | {
12 | static class Program
13 | {
14 | public static int PID = -1;
15 | public static string PNAME = string.Empty;
16 | public static string PATH = string.Empty;
17 |
18 | [DllImport("user32.dll")]
19 | private static extern bool SetProcessDPIAware();
20 |
21 | ///
22 | /// 应用程序的主入口点。
23 | ///
24 | [STAThread]
25 | static void Main()
26 | {
27 | try
28 | {
29 | if (Environment.OSVersion.Version.Major >= 6)
30 | {
31 | SetProcessDPIAware();
32 | }
33 |
34 | Application.EnableVisualStyles();
35 | Application.SetCompatibleTextRenderingDefault(false);
36 | if (!new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator))
37 | {
38 | ProcessStartInfo startInfo = new ProcessStartInfo {
39 | UseShellExecute = true,
40 | WorkingDirectory = Environment.CurrentDirectory,
41 | FileName = Application.ExecutablePath,
42 | Verb = "runas"
43 | };
44 | try
45 | {
46 | Process.Start(startInfo);
47 | }
48 | catch
49 | {
50 | return;
51 | }
52 | Application.Exit();
53 | }
54 | else
55 | {
56 | Application.Run(new Injector_Form());
57 | }
58 | }
59 | catch (Exception ex)
60 | {
61 | string message = ex.Message;
62 | }
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/WPELibrary/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WPELibrary.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WPELibrary.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 使用此强类型资源类,为所有资源查找
51 | /// 重写当前线程的 CurrentUICulture 属性。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/ProcessInjector/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本: 4.0.30319.42000
5 | //
6 | // 对此文件的更改可能导致不正确的行为,如果
7 | // 重新生成代码,则所做更改将丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ProcessInjector.Properties
12 | {
13 |
14 |
15 | ///
16 | /// 强类型资源类,用于查找本地化字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// 返回此类使用的缓存 ResourceManager 实例。
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ProcessInjector.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// 覆盖当前线程的 CurrentUICulture 属性
56 | /// 使用此强类型的资源类的资源查找。
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/WPELibrary/Lib/SocketPacket.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.InteropServices;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace WPELibrary.Lib
9 | {
10 | public class SocketPacket
11 | {
12 | private string type;
13 | private int socket;
14 | private int length;
15 | private byte[] buffer;
16 | private sockaddr addr;
17 |
18 | [StructLayout(LayoutKind.Sequential)]
19 | public struct in_addr
20 | {
21 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
22 | public byte[] sin_addr;
23 | }
24 |
25 | [StructLayout(LayoutKind.Sequential)]
26 | public struct sockaddr
27 | {
28 | public short sin_family;
29 | public ushort sin_port;
30 | public SocketPacket.in_addr sin_addr;
31 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
32 | public byte[] sin_zero;
33 | }
34 |
35 | public SocketPacket(string type, int socket, int length, byte[] buffer, sockaddr addr)
36 | {
37 | this.type = type;
38 | this.socket = socket;
39 | this.length = length;
40 | this.buffer = buffer;
41 | this.Addr = addr;
42 | }
43 |
44 | public string Type
45 | {
46 | get
47 | {
48 | return type;
49 | }
50 |
51 | set
52 | {
53 | type = value;
54 | }
55 | }
56 |
57 | public int Socket
58 | {
59 | get
60 | {
61 | return socket;
62 | }
63 |
64 | set
65 | {
66 | socket = value;
67 | }
68 | }
69 |
70 | public int Length
71 | {
72 | get
73 | {
74 | return length;
75 | }
76 |
77 | set
78 | {
79 | length = value;
80 | }
81 | }
82 |
83 | public byte[] Buffer
84 | {
85 | get
86 | {
87 | return buffer;
88 | }
89 |
90 | set
91 | {
92 | buffer = value;
93 | }
94 | }
95 |
96 | public sockaddr Addr
97 | {
98 | get
99 | {
100 | return addr;
101 | }
102 |
103 | set
104 | {
105 | addr = value;
106 | }
107 | }
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/ProcessInjector/Properties/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
51 |
58 |
59 |
60 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/WPELibrary/Lib/SocketInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace WPELibrary.Lib
8 | {
9 | public class SocketInfo
10 | {
11 | private int index;
12 | private string type;
13 | private int socket;
14 | private string from;
15 | private string to;
16 | private int length;
17 | private string data;
18 | private byte[] buffer;
19 |
20 | public SocketInfo(int index, string type, int socket, string from, string to, int length, string data, byte[] buffer)
21 | {
22 | this.Index = index;
23 | this.Type = type;
24 | this.Socket = socket;
25 | this.From = from;
26 | this.To = to;
27 | this.Length = length;
28 | this.Data = data;
29 | this.Buffer = buffer;
30 | }
31 |
32 | public int Index
33 | {
34 | get
35 | {
36 | return index;
37 | }
38 |
39 | set
40 | {
41 | index = value;
42 | }
43 | }
44 |
45 | public string Type
46 | {
47 | get
48 | {
49 | return type;
50 | }
51 |
52 | set
53 | {
54 | type = value;
55 | }
56 | }
57 |
58 | public int Socket
59 | {
60 | get
61 | {
62 | return socket;
63 | }
64 |
65 | set
66 | {
67 | socket = value;
68 | }
69 | }
70 |
71 | public string From
72 | {
73 | get
74 | {
75 | return from;
76 | }
77 |
78 | set
79 | {
80 | from = value;
81 | }
82 | }
83 |
84 | public string To
85 | {
86 | get
87 | {
88 | return to;
89 | }
90 |
91 | set
92 | {
93 | to = value;
94 | }
95 | }
96 |
97 | public int Length
98 | {
99 | get
100 | {
101 | return length;
102 | }
103 |
104 | set
105 | {
106 | length = value;
107 | }
108 | }
109 |
110 | public string Data
111 | {
112 | get
113 | {
114 | return data;
115 | }
116 |
117 | set
118 | {
119 | data = value;
120 | }
121 | }
122 |
123 | public byte[] Buffer
124 | {
125 | get
126 | {
127 | return buffer;
128 | }
129 |
130 | set
131 | {
132 | buffer = value;
133 | }
134 | }
135 | }
136 | }
137 |
--------------------------------------------------------------------------------
/ProcessInjector/ComputerInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Management;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace ProcessInjector
9 | {
10 | class ComputerInfo
11 | {
12 | ///
13 | /// 获取 cpu 序列号
14 | ///
15 | ///
16 | public string GetCPUInfo()
17 | {
18 | string cpuInfo = string.Empty;
19 | ManagementObjectSearcher searcher = new ManagementObjectSearcher("Select * from Win32_Processor");
20 | foreach (ManagementObject obj in searcher.Get())
21 | {
22 | cpuInfo += obj["Name"].ToString() + ",";
23 | }
24 | searcher.Dispose();
25 | return ("CPU:" + cpuInfo.TrimEnd(new char[] { ',' }));
26 | }
27 |
28 | public string GetGPUInfo()
29 | {
30 | string gpuInfo = string.Empty;
31 | ManagementObjectSearcher searcher = new ManagementObjectSearcher("Select * from Win32_VideoController");
32 | foreach (ManagementObject obj in searcher.Get())
33 | {
34 | gpuInfo += obj["Name"].ToString() + ",";
35 | }
36 | searcher.Dispose();
37 | return ("显卡:" + gpuInfo.TrimEnd(new char[] { ',' }));
38 | }
39 |
40 | public string GetHDInfo()
41 | {
42 | string hdInfo = "硬盘:";
43 | ManagementClass mc = new ManagementClass("win32_DiskDrive");
44 | ManagementObjectCollection moc = mc.GetInstances();
45 | double diskSize = 0.0;
46 | foreach (ManagementObject obj in moc)
47 | {
48 | diskSize += ((long.Parse(obj.Properties["Size"].Value.ToString()) / 1024) / 1024) / 1024;
49 | }
50 | moc.Dispose();
51 | mc.Dispose();
52 | return (hdInfo + diskSize.ToString() + "G");
53 | }
54 |
55 | public string GetMACInfo()
56 | {
57 | string macInfo = null;
58 | foreach (ManagementObject obj in new ManagementClass("Win32_NetworkAdapterConfiguration").GetInstances())
59 | {
60 | if (Convert.ToBoolean(obj["IPEnabled"]))
61 | {
62 | macInfo = obj["MacAddress"].ToString().Replace(':', '-');
63 | }
64 | obj.Dispose();
65 | }
66 | return macInfo;
67 | }
68 |
69 | public string GetMEMInfo()
70 | {
71 | string memInfo = "内存:";
72 | ManagementClass mc = new ManagementClass("Win32_PhysicalMemory");
73 | ManagementObjectCollection moc = mc.GetInstances();
74 | double capacity = 0.0;
75 | foreach (ManagementObject obj in moc)
76 | {
77 | capacity += Math.Round((double)(((double)((long.Parse(obj.Properties["Capacity"].Value.ToString()) / 1024) / 1024)) / 1024), 1);
78 | }
79 | moc.Dispose();
80 | mc.Dispose();
81 | return (memInfo + capacity.ToString() + "G");
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/ProcessInjector/ProcessList_Form.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Diagnostics;
6 | using System.Drawing;
7 | using System.IO;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 |
13 | namespace ProcessInjector
14 | {
15 | public partial class ProcessList_Form : Form
16 | {
17 | public ProcessList_Form()
18 | {
19 | InitializeComponent();
20 | this.GetProcess();
21 | }
22 |
23 | private void bCreate_Click(object sender, EventArgs e)
24 | {
25 | //点击弹出对话框
26 | OpenFileDialog openFileDialog = new OpenFileDialog();
27 | //设置对话框的标题
28 | openFileDialog.Title = "请选择要注入的应用程序";
29 | //设置对话框可以多选
30 | openFileDialog.Multiselect = false;
31 | //设置对话框的初始目录
32 | openFileDialog.InitialDirectory = "";
33 | //设置对话框的文件类型
34 | openFileDialog.Filter = "应用程序|*.exe|所有文件|*.*";
35 |
36 | //展示对话框
37 | openFileDialog.ShowDialog();
38 | //获得在打开的对话框中选中文件的路径
39 | Program.PID = -1;
40 | Program.PATH = openFileDialog.FileName;
41 | Program.PNAME = Path.GetFileName(Program.PATH);
42 | base.Close();
43 | }
44 |
45 | private void bRefresh_Click(object sender, EventArgs e)
46 | {
47 | this.GetProcess();
48 | }
49 |
50 | private void bSelected_Click(object sender, EventArgs e)
51 | {
52 | if (this.lvProcessList.SelectedItems.Count == 1)
53 | {
54 | Program.PID = int.Parse(this.lvProcessList.SelectedItems[0].SubItems[1].Text.ToString().Trim());
55 | Program.PNAME = this.lvProcessList.SelectedItems[0].SubItems[0].Text.ToString().Trim();
56 | base.Close();
57 | }
58 | else
59 | {
60 | MessageBox.Show("请选择一个进程!");
61 | }
62 | }
63 |
64 | private void lvProcessList_DoubleClick(object sender, EventArgs e)
65 | {
66 | this.bSelected_Click(sender, e);
67 | }
68 |
69 | private void lvProcessList_KeyUp(object sender, KeyEventArgs e)
70 | {
71 | if (e.KeyCode == Keys.Enter)
72 | {
73 | this.bSelected_Click(sender, e);
74 | }
75 | }
76 |
77 | public void GetProcess()
78 | {
79 | DataTable table = new DataTable();
80 | table.Columns.Add("ProcessName", typeof(string));
81 | table.Columns.Add("PID", typeof(int));
82 | table.Columns.Add("RAM", typeof(long));
83 | this.lvProcessList.Items.Clear();
84 | Process[] processes = Process.GetProcesses();
85 | int length = processes.Length;
86 | foreach (Process process in processes)
87 | {
88 | DataRow row = table.NewRow();
89 | row[0] = process.ProcessName;
90 | row[1] = process.Id;
91 | row[2] = process.PrivateMemorySize64;
92 | table.Rows.Add(row);
93 | }
94 | DataView defaultView = table.DefaultView;
95 | defaultView.Sort = "ProcessName";
96 | foreach (DataRow row in defaultView.ToTable().Rows)
97 | {
98 | ListViewItem item = new ListViewItem
99 | {
100 | Text = row[0].ToString(),
101 | SubItems = {
102 | row[1].ToString(),
103 | row[2].ToString()
104 | }
105 | };
106 | this.lvProcessList.Items.Add(item);
107 | }
108 | this.lProcessCNT.Text = "进程数:" + length.ToString();
109 | }
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/WPELibrary/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 | text/microsoft-resx
91 |
92 |
93 | 1.3
94 |
95 |
96 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
97 |
98 |
99 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
100 |
101 |
--------------------------------------------------------------------------------
/ProcessInjector/Injector_Form.cs:
--------------------------------------------------------------------------------
1 | using EasyHook;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.Data;
6 | using System.Diagnostics;
7 | using System.Drawing;
8 | using System.IO;
9 | using System.Linq;
10 | using System.Reflection;
11 | using System.Runtime.InteropServices;
12 | using System.Text;
13 | using System.Threading.Tasks;
14 | using System.Windows.Forms;
15 |
16 | namespace ProcessInjector
17 | {
18 | public partial class Injector_Form : Form
19 | {
20 | private string Version = "";
21 | private string ProcessName = "";
22 | private string ProcessPath = "";
23 | private int ProcessID = -1;
24 | private ComputerInfo ci = new ComputerInfo();
25 |
26 | public Injector_Form()
27 | {
28 | InitializeComponent();
29 | this.Text = "进程注入器(x86, x64自适应)by RNShinoa";
30 | this.Version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
31 | this.ShowLog("当前内核版本:" + this.Version);
32 | }
33 |
34 | private void bSelectProcess_Click(object sender, EventArgs e)
35 | {
36 | new ProcessList_Form().ShowDialog();
37 | if ((Program.PID != -1) && (Program.PNAME != string.Empty))
38 | {
39 | this.tbProcessID.Text = Program.PNAME + " [" + Program.PID.ToString() + "]";
40 | }
41 | else if (((Program.PID == -1) && !string.IsNullOrEmpty(Program.PNAME)) && !string.IsNullOrEmpty(Program.PATH))
42 | {
43 | this.tbProcessID.Text = Program.PNAME;
44 | }
45 | }
46 |
47 | private void bInject_Click(object sender, EventArgs e)
48 | {
49 | this.rtbLog.Clear();
50 | this.ProcessID = Program.PID;
51 | this.ProcessPath = Program.PATH;
52 | this.ProcessName = Program.PNAME;
53 | string library = "WPELibrary.dll";
54 | try
55 | {
56 | if (string.IsNullOrEmpty(this.ProcessPath) && string.IsNullOrEmpty(this.ProcessName))
57 | {
58 | MessageBox.Show("请先选择要注入的进程!");
59 | }
60 | else
61 | {
62 | this.ShowLog("开始注入目标进程 =>> " + this.ProcessName);
63 | string inLibraryPath_x86 = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), library);
64 | string inLibraryPath_x64 = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), library);
65 | object[] inPassThruArgs = new object[] { "" };
66 | if (this.ProcessID > -1)
67 | {
68 | RemoteHooking.Inject(
69 | this.ProcessID,
70 | inLibraryPath_x86,
71 | inLibraryPath_x64,
72 | inPassThruArgs);
73 | }
74 | else
75 | {
76 | RemoteHooking.CreateAndInject(
77 | this.ProcessPath,
78 | string.Empty,
79 | 0,
80 | inLibraryPath_x86,
81 | inLibraryPath_x64,
82 | out this.ProcessID,
83 | inPassThruArgs);
84 | }
85 | this.ShowLog(string.Format("目标进程是{0}位程序,已自动调用{0}位的注入模块!",
86 | this.IsWin64Process(this.ProcessID) ? 64 : 32));
87 | this.ShowLog("开始注入目标进程 =>> " + this.ProcessName);
88 | this.ShowLog($"已成功注入目标进程 =>> {this.ProcessName}[{this.ProcessID}]");
89 | this.ShowLog("注入完成,可关闭当前注入器.");
90 | //this.bInject.Enabled = false;
91 | }
92 | }
93 | catch (Exception ex)
94 | {
95 | this.ShowLog("出现错误:" + ex.Message);
96 | }
97 | }
98 |
99 | private bool IsWin64Process(int ProcessID)
100 | {
101 | bool retVal = false;
102 | Process process = Process.GetProcessById(ProcessID);
103 |
104 | if (process != null)
105 | {
106 | if ((Environment.OSVersion.Version.Major == 5 && Environment.OSVersion.Version.Minor >= 1) ||
107 | Environment.OSVersion.Version.Major > 5)
108 | {
109 | IsWow64Process(process.Handle, out retVal);
110 | return !retVal;
111 | }
112 | }
113 | return retVal;
114 | }
115 |
116 | [return: MarshalAs(UnmanagedType.Bool)]
117 | [DllImport("kernel32.dll", SetLastError = true)]
118 | internal static extern bool IsWow64Process([In] IntPtr process, [Out] out bool wow64Process);
119 |
120 | private void ShowLog(string ShowInfo)
121 | {
122 | this.rtbLog.AppendText(ShowInfo + "\n");
123 | }
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/ProcessInjector/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/WPELibrary/WPELibrary.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {351B0F87-2972-4681-A7B7-38742F2F9710}
8 | Library
9 | Properties
10 | WPELibrary
11 | WPELibrary
12 | v4.5.2
13 | 512
14 |
15 |
16 | true
17 | full
18 | false
19 | ..\Build\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | ..\Build\Release\
28 | TRACE
29 | prompt
30 | 4
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | ..\packages\EasyHook.2.7.7097\lib\net40\EasyHook.dll
39 | True
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | Form
56 |
57 |
58 | DLL_Form.cs
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | True
69 | True
70 | Resources.resx
71 |
72 |
73 |
74 | Form
75 |
76 |
77 | SocketBatchSend_Form.cs
78 |
79 |
80 | Form
81 |
82 |
83 | SocketSend_Form.cs
84 |
85 |
86 |
87 |
88 | DLL_Form.cs
89 |
90 |
91 | ResXFileCodeGenerator
92 | Resources.Designer.cs
93 |
94 |
95 | SocketBatchSend_Form.cs
96 |
97 |
98 | SocketSend_Form.cs
99 |
100 |
101 |
102 |
103 | PreserveNewest
104 |
105 |
106 | PreserveNewest
107 |
108 |
109 | PreserveNewest
110 |
111 |
112 | PreserveNewest
113 |
114 |
115 | PreserveNewest
116 |
117 |
118 | PreserveNewest
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
133 |
--------------------------------------------------------------------------------
/ProcessInjector/Injector_Form.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ProcessInjector
2 | {
3 | partial class Injector_Form
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows 窗体设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要修改
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Injector_Form));
32 | this.pTop = new System.Windows.Forms.Panel();
33 | this.bInject = new System.Windows.Forms.Button();
34 | this.bSelectProcess = new System.Windows.Forms.Button();
35 | this.tbProcessID = new System.Windows.Forms.TextBox();
36 | this.lProcessName = new System.Windows.Forms.Label();
37 | this.pFill = new System.Windows.Forms.Panel();
38 | this.rtbLog = new System.Windows.Forms.RichTextBox();
39 | this.pTop.SuspendLayout();
40 | this.pFill.SuspendLayout();
41 | this.SuspendLayout();
42 | //
43 | // pTop
44 | //
45 | this.pTop.Controls.Add(this.bInject);
46 | this.pTop.Controls.Add(this.bSelectProcess);
47 | this.pTop.Controls.Add(this.tbProcessID);
48 | this.pTop.Controls.Add(this.lProcessName);
49 | this.pTop.Dock = System.Windows.Forms.DockStyle.Top;
50 | this.pTop.Location = new System.Drawing.Point(0, 0);
51 | this.pTop.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
52 | this.pTop.Name = "pTop";
53 | this.pTop.Size = new System.Drawing.Size(432, 45);
54 | this.pTop.TabIndex = 0;
55 | //
56 | // bInject
57 | //
58 | this.bInject.Location = new System.Drawing.Point(352, 9);
59 | this.bInject.Name = "bInject";
60 | this.bInject.Size = new System.Drawing.Size(66, 30);
61 | this.bInject.TabIndex = 3;
62 | this.bInject.Text = "注 入";
63 | this.bInject.UseVisualStyleBackColor = true;
64 | this.bInject.Click += new System.EventHandler(this.bInject_Click);
65 | //
66 | // bSelectProcess
67 | //
68 | this.bSelectProcess.Location = new System.Drawing.Point(300, 12);
69 | this.bSelectProcess.Name = "bSelectProcess";
70 | this.bSelectProcess.Size = new System.Drawing.Size(37, 25);
71 | this.bSelectProcess.TabIndex = 2;
72 | this.bSelectProcess.Text = "...";
73 | this.bSelectProcess.UseVisualStyleBackColor = true;
74 | this.bSelectProcess.Click += new System.EventHandler(this.bSelectProcess_Click);
75 | //
76 | // tbProcessID
77 | //
78 | this.tbProcessID.Location = new System.Drawing.Point(73, 13);
79 | this.tbProcessID.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
80 | this.tbProcessID.Name = "tbProcessID";
81 | this.tbProcessID.Size = new System.Drawing.Size(221, 23);
82 | this.tbProcessID.TabIndex = 1;
83 | //
84 | // lProcessName
85 | //
86 | this.lProcessName.AutoSize = true;
87 | this.lProcessName.Location = new System.Drawing.Point(5, 16);
88 | this.lProcessName.Name = "lProcessName";
89 | this.lProcessName.Size = new System.Drawing.Size(68, 17);
90 | this.lProcessName.TabIndex = 0;
91 | this.lProcessName.Text = "进程名称:";
92 | //
93 | // pFill
94 | //
95 | this.pFill.Controls.Add(this.rtbLog);
96 | this.pFill.Dock = System.Windows.Forms.DockStyle.Fill;
97 | this.pFill.Location = new System.Drawing.Point(0, 45);
98 | this.pFill.Name = "pFill";
99 | this.pFill.Size = new System.Drawing.Size(432, 125);
100 | this.pFill.TabIndex = 1;
101 | //
102 | // rtbLog
103 | //
104 | this.rtbLog.BackColor = System.Drawing.Color.Black;
105 | this.rtbLog.Dock = System.Windows.Forms.DockStyle.Fill;
106 | this.rtbLog.ForeColor = System.Drawing.Color.LawnGreen;
107 | this.rtbLog.Location = new System.Drawing.Point(0, 0);
108 | this.rtbLog.Name = "rtbLog";
109 | this.rtbLog.ReadOnly = true;
110 | this.rtbLog.Size = new System.Drawing.Size(432, 125);
111 | this.rtbLog.TabIndex = 0;
112 | this.rtbLog.Text = "";
113 | //
114 | // Injector_Form
115 | //
116 | this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
117 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
118 | this.ClientSize = new System.Drawing.Size(432, 170);
119 | this.Controls.Add(this.pFill);
120 | this.Controls.Add(this.pTop);
121 | this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
122 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
123 | this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
124 | this.MaximizeBox = false;
125 | this.Name = "Injector_Form";
126 | this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
127 | this.Text = "进程注入器 by RNShinoa";
128 | this.pTop.ResumeLayout(false);
129 | this.pTop.PerformLayout();
130 | this.pFill.ResumeLayout(false);
131 | this.ResumeLayout(false);
132 |
133 | }
134 |
135 | #endregion
136 |
137 | private System.Windows.Forms.Panel pTop;
138 | private System.Windows.Forms.Panel pFill;
139 | private System.Windows.Forms.Button bSelectProcess;
140 | private System.Windows.Forms.TextBox tbProcessID;
141 | private System.Windows.Forms.Label lProcessName;
142 | private System.Windows.Forms.Button bInject;
143 | private System.Windows.Forms.RichTextBox rtbLog;
144 | }
145 | }
146 |
147 |
--------------------------------------------------------------------------------
/ProcessInjector/ProcessInjector.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {C2A6A6AD-C8DB-4209-88E4-256FC823C05C}
8 | WinExe
9 | Properties
10 | ProcessInjector
11 | ProcessInjector
12 | v4.5.2
13 | 512
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | ..\Build\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | ..\Build\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 | wpe.ico
37 |
38 |
39 | LocalIntranet
40 |
41 |
42 | false
43 |
44 |
45 |
46 | Properties\app.manifest
47 |
48 |
49 |
50 | ..\packages\EasyHook.2.7.7097\lib\net40\EasyHook.dll
51 | True
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | Form
71 |
72 |
73 | Injector_Form.cs
74 |
75 |
76 | Component
77 |
78 |
79 | ListViewNF.cs
80 |
81 |
82 | Form
83 |
84 |
85 | ProcessList_Form.cs
86 |
87 |
88 |
89 |
90 | Injector_Form.cs
91 |
92 |
93 | ProcessList_Form.cs
94 |
95 |
96 | ResXFileCodeGenerator
97 | Resources.Designer.cs
98 | Designer
99 |
100 |
101 | True
102 | Resources.resx
103 |
104 |
105 |
106 |
107 | SettingsSingleFileGenerator
108 | Settings.Designer.cs
109 |
110 |
111 | True
112 | Settings.settings
113 | True
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 | PreserveNewest
122 |
123 |
124 | PreserveNewest
125 |
126 |
127 | PreserveNewest
128 |
129 |
130 | PreserveNewest
131 |
132 |
133 | PreserveNewest
134 |
135 |
136 | PreserveNewest
137 |
138 |
139 | PreserveNewest
140 |
141 |
142 |
143 |
144 |
151 |
--------------------------------------------------------------------------------
/ProcessInjector/ProcessList_Form.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ProcessInjector
2 | {
3 | partial class ProcessList_Form
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows 窗体设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要修改
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | this.lvProcessList = new ProcessInjector.ListViewNF(this.components);
33 | this.chPName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
34 | this.chPID = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
35 | this.chRAM = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
36 | this.lProcessCNT = new System.Windows.Forms.Label();
37 | this.bCreate = new System.Windows.Forms.Button();
38 | this.bRefresh = new System.Windows.Forms.Button();
39 | this.bSelected = new System.Windows.Forms.Button();
40 | this.SuspendLayout();
41 | //
42 | // lvProcessList
43 | //
44 | this.lvProcessList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
45 | this.chPName,
46 | this.chPID,
47 | this.chRAM});
48 | this.lvProcessList.FullRowSelect = true;
49 | this.lvProcessList.GridLines = true;
50 | this.lvProcessList.HideSelection = false;
51 | this.lvProcessList.Location = new System.Drawing.Point(2, 4);
52 | this.lvProcessList.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
53 | this.lvProcessList.MultiSelect = false;
54 | this.lvProcessList.Name = "lvProcessList";
55 | this.lvProcessList.Size = new System.Drawing.Size(400, 406);
56 | this.lvProcessList.TabIndex = 0;
57 | this.lvProcessList.UseCompatibleStateImageBehavior = false;
58 | this.lvProcessList.View = System.Windows.Forms.View.Details;
59 | this.lvProcessList.DoubleClick += new System.EventHandler(this.lvProcessList_DoubleClick);
60 | this.lvProcessList.KeyUp += new System.Windows.Forms.KeyEventHandler(this.lvProcessList_KeyUp);
61 | //
62 | // chPName
63 | //
64 | this.chPName.Text = "进程名称";
65 | this.chPName.Width = 210;
66 | //
67 | // chPID
68 | //
69 | this.chPID.Text = "PID";
70 | //
71 | // chRAM
72 | //
73 | this.chRAM.Text = "RAM";
74 | this.chRAM.Width = 100;
75 | //
76 | // lProcessCNT
77 | //
78 | this.lProcessCNT.AutoSize = true;
79 | this.lProcessCNT.Location = new System.Drawing.Point(14, 428);
80 | this.lProcessCNT.Name = "lProcessCNT";
81 | this.lProcessCNT.Size = new System.Drawing.Size(44, 17);
82 | this.lProcessCNT.TabIndex = 1;
83 | this.lProcessCNT.Text = "进程数";
84 | //
85 | // bCreate
86 | //
87 | this.bCreate.Location = new System.Drawing.Point(127, 420);
88 | this.bCreate.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
89 | this.bCreate.Name = "bCreate";
90 | this.bCreate.Size = new System.Drawing.Size(87, 33);
91 | this.bCreate.TabIndex = 2;
92 | this.bCreate.Text = "选择程序(&O)";
93 | this.bCreate.UseVisualStyleBackColor = true;
94 | this.bCreate.Click += new System.EventHandler(this.bCreate_Click);
95 | //
96 | // bRefresh
97 | //
98 | this.bRefresh.Location = new System.Drawing.Point(220, 420);
99 | this.bRefresh.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
100 | this.bRefresh.Name = "bRefresh";
101 | this.bRefresh.Size = new System.Drawing.Size(87, 33);
102 | this.bRefresh.TabIndex = 3;
103 | this.bRefresh.Text = "刷新(&R)";
104 | this.bRefresh.UseVisualStyleBackColor = true;
105 | this.bRefresh.Click += new System.EventHandler(this.bRefresh_Click);
106 | //
107 | // bSelected
108 | //
109 | this.bSelected.Location = new System.Drawing.Point(315, 420);
110 | this.bSelected.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
111 | this.bSelected.Name = "bSelected";
112 | this.bSelected.Size = new System.Drawing.Size(87, 33);
113 | this.bSelected.TabIndex = 4;
114 | this.bSelected.Text = "确定";
115 | this.bSelected.UseVisualStyleBackColor = true;
116 | this.bSelected.Click += new System.EventHandler(this.bSelected_Click);
117 | //
118 | // ProcessList_Form
119 | //
120 | this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
121 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
122 | this.ClientSize = new System.Drawing.Size(405, 463);
123 | this.Controls.Add(this.bSelected);
124 | this.Controls.Add(this.bRefresh);
125 | this.Controls.Add(this.bCreate);
126 | this.Controls.Add(this.lProcessCNT);
127 | this.Controls.Add(this.lvProcessList);
128 | this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
129 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
130 | this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
131 | this.MaximizeBox = false;
132 | this.Name = "ProcessList_Form";
133 | this.ShowInTaskbar = false;
134 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
135 | this.Text = "进程列表 by RNShinoa";
136 | this.ResumeLayout(false);
137 | this.PerformLayout();
138 |
139 | }
140 |
141 | #endregion
142 |
143 | private ProcessInjector.ListViewNF lvProcessList;
144 | private System.Windows.Forms.ColumnHeader chPName;
145 | private System.Windows.Forms.ColumnHeader chPID;
146 | private System.Windows.Forms.ColumnHeader chRAM;
147 | private System.Windows.Forms.Label lProcessCNT;
148 | private System.Windows.Forms.Button bCreate;
149 | private System.Windows.Forms.Button bRefresh;
150 | private System.Windows.Forms.Button bSelected;
151 | }
152 | }
--------------------------------------------------------------------------------
/ProcessInjector/ProcessList_Form.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | True
122 |
123 |
124 | True
125 |
126 |
127 | True
128 |
129 |
130 | True
131 |
132 |
133 | True
134 |
135 |
136 | True
137 |
138 |
--------------------------------------------------------------------------------
/WPELibrary/Lib/WinSockHook.cs:
--------------------------------------------------------------------------------
1 | using EasyHook;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Runtime.InteropServices;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace WPELibrary.Lib
10 | {
11 | public class WinSockHook
12 | {
13 | public Queue _SocketQueue = new Queue();
14 | public bool Interecept_Recv;
15 | public bool Interecept_RecvFrom;
16 | public bool Interecept_Send;
17 | public bool Interecept_SendTo;
18 | public bool Display_Recv;
19 | public bool Display_RecvFrom;
20 | public bool Display_Send;
21 | public bool Display_SendTo;
22 | public bool Reset_CNT;
23 | public int Interecept_CNT = 0;
24 | public int Recv_CNT = 0;
25 | public int Send_CNT = 0;
26 | private LocalHook lhSend = null;
27 | private LocalHook lhSendTo = null;
28 | private LocalHook lhRecv = null;
29 | private LocalHook lhRecvFrom = null;
30 |
31 | [DllImport("ws2_32.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode, SetLastError = true)]
32 | private static extern int send(int socket, IntPtr buffer, int length, int flags);
33 |
34 | [DllImport("ws2_32.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode, SetLastError = true)]
35 | private static extern int sendto(int socket, IntPtr buffer, int length, int flags, ref SocketPacket.sockaddr To, ref int toLenth);
36 |
37 | [DllImport("ws2_32.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode, SetLastError = true)]
38 | private static extern int recv(int socket, IntPtr buffer, int length, int flags);
39 |
40 | [DllImport("ws2_32.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode, SetLastError = true)]
41 | private static extern int recvfrom(int socket, IntPtr buffer, int length, int flags, ref SocketPacket.sockaddr from, ref int fromLen);
42 |
43 | [UnmanagedFunctionPointer(CallingConvention.StdCall, SetLastError = true)]
44 | private delegate int RecvFromHook(int socket, IntPtr buffer, int length, int flags, ref SocketPacket.sockaddr from, ref int fromLen);
45 |
46 | [UnmanagedFunctionPointer(CallingConvention.StdCall, SetLastError = true)]
47 | private delegate int RecvHook(int s, IntPtr buf, int length, int flags);
48 |
49 | [UnmanagedFunctionPointer(CallingConvention.StdCall, SetLastError = true)]
50 | private delegate int SendHook(int s, IntPtr buf, int length, int flags);
51 |
52 | [UnmanagedFunctionPointer(CallingConvention.StdCall, SetLastError = true)]
53 | private delegate int SendToHook(int socket, IntPtr buffer, int length, int flags, ref SocketPacket.sockaddr To, ref int toLenth);
54 |
55 | private int Send_Hook(int s, IntPtr buf, int length, int flags)
56 | {
57 | int iLen = 0;
58 | if (this.Interecept_Send)
59 | {
60 | if (length > 0)
61 | {
62 | this.Interecept_CNT++;
63 | }
64 | iLen = length;
65 | }
66 | else
67 | {
68 | iLen = send(s, buf, length, flags);
69 | }
70 | if ((iLen > 0) && this.Display_Send)
71 | {
72 | this.Send_CNT++;
73 | this.SocketEnqueue(s, buf, iLen, "S", new SocketPacket.sockaddr());
74 | }
75 | return iLen;
76 | }
77 |
78 | private int SendTo_Hook(int socket, IntPtr buffer, int length, int flags, ref SocketPacket.sockaddr To, ref int toLenth)
79 | {
80 | int iLen = 0;
81 | if (this.Interecept_SendTo)
82 | {
83 | if (length > 0)
84 | {
85 | this.Interecept_CNT++;
86 | }
87 | iLen = length;
88 | }
89 | else
90 | {
91 | iLen = sendto(socket, buffer, length, flags, ref To, ref toLenth);
92 | }
93 | if ((iLen > 0) && this.Display_SendTo)
94 | {
95 | this.Send_CNT++;
96 | this.SocketEnqueue(socket, buffer, iLen, "ST", To);
97 | }
98 | return iLen;
99 | }
100 |
101 | private int Recv_Hook(int s, IntPtr buf, int length, int flags)
102 | {
103 | int iLen = 0;
104 | if (this.Interecept_Recv)
105 | {
106 | if (length > 0)
107 | {
108 | this.Interecept_CNT++;
109 | }
110 | iLen = length;
111 | }
112 | else
113 | {
114 | iLen = recv(s, buf, length, flags);
115 | }
116 | if ((iLen > 0) && this.Display_Recv)
117 | {
118 | this.Recv_CNT++;
119 | this.SocketEnqueue(s, buf, iLen, "R", new SocketPacket.sockaddr());
120 | }
121 | return iLen;
122 | }
123 | private int RecvFrom_Hook(int socket, IntPtr buffer, int length, int flags, ref SocketPacket.sockaddr from, ref int fromLen)
124 | {
125 | int iLen = 0;
126 | if (this.Interecept_RecvFrom)
127 | {
128 | if (length > 0)
129 | {
130 | this.Interecept_CNT++;
131 | }
132 | iLen = length;
133 | }
134 | else
135 | {
136 | iLen = recvfrom(socket, buffer, length, flags, ref from, ref fromLen);
137 | }
138 | if ((iLen > 0) && this.Display_RecvFrom)
139 | {
140 | this.Recv_CNT++;
141 | this.SocketEnqueue(socket, buffer, iLen, "RF", from);
142 | }
143 | return iLen;
144 | }
145 |
146 | private void ResetCNT()
147 | {
148 | if (this.Reset_CNT)
149 | {
150 | this.Interecept_CNT = 0;
151 | this.Recv_CNT = 0;
152 | this.Send_CNT = 0;
153 | this._SocketQueue.Clear();
154 | }
155 | }
156 |
157 | public bool SendPacket(int socket, IntPtr buffer, int length)
158 | {
159 | return send(socket, buffer, length, 0) > 0;
160 | }
161 |
162 | private void SocketEnqueue(int iSocket, IntPtr ipBuff, int iLen, string sType, SocketPacket.sockaddr sAddr)
163 | {
164 | byte[] destination = new byte[iLen];
165 | Marshal.Copy(ipBuff, destination, 0, iLen);
166 | SocketPacket item = new SocketPacket(sType, iSocket, iLen, destination, sAddr);
167 | this._SocketQueue.Enqueue(item);
168 | }
169 |
170 | public void StartHook()
171 | {
172 | this.ResetCNT();
173 | this.lhRecv = LocalHook.Create(LocalHook.GetProcAddress("ws2_32.dll", "recv"), new RecvHook(this.Recv_Hook), this);
174 | this.lhRecv.ThreadACL.SetExclusiveACL(new int[1]);
175 | this.lhRecvFrom = LocalHook.Create(LocalHook.GetProcAddress("ws2_32.dll", "recvfrom"), new RecvFromHook(this.RecvFrom_Hook), this);
176 | this.lhRecvFrom.ThreadACL.SetExclusiveACL(new int[1]);
177 | this.lhSend = LocalHook.Create(LocalHook.GetProcAddress("ws2_32.dll", "send"), new SendHook(this.Send_Hook), this);
178 | this.lhSend.ThreadACL.SetExclusiveACL(new int[1]);
179 | this.lhSendTo = LocalHook.Create(LocalHook.GetProcAddress("ws2_32.dll", "sendto"), new SendToHook(this.SendTo_Hook), this);
180 | this.lhSendTo.ThreadACL.SetExclusiveACL(new int[1]);
181 | }
182 |
183 | public void StopHook()
184 | {
185 | this.lhRecv.Dispose();
186 | this.lhSend.Dispose();
187 | this.lhRecvFrom.Dispose();
188 | this.lhSendTo.Dispose();
189 | }
190 | }
191 | }
192 |
--------------------------------------------------------------------------------
/WPELibrary/SocketSend_Form.cs:
--------------------------------------------------------------------------------
1 | using EasyHook;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.Data;
6 | using System.Diagnostics;
7 | using System.Drawing;
8 | using System.Linq;
9 | using System.Runtime.InteropServices;
10 | using System.Text;
11 | using System.Threading;
12 | using System.Threading.Tasks;
13 | using System.Windows.Forms;
14 | using WPELibrary.Lib;
15 |
16 | namespace WPELibrary
17 | {
18 | public partial class SocketSend_Form : Form
19 | {
20 | private int SendPacketCNT = 0;
21 | private int Send_Success_CNT = 0;
22 | private int Send_Fail_CNT = 0;
23 | private WinSockHook ws = new WinSockHook();
24 | private SocketOperation so = new SocketOperation();
25 | public string Send_Index;
26 | public string Send_Socket;
27 | public string Send_Len;
28 | public string Send_IPTo;
29 | public byte[] Send_Byte;
30 |
31 | public SocketSend_Form()
32 | {
33 | InitializeComponent();
34 | }
35 |
36 | private void SocketSend_Form_Load(object sender, EventArgs e)
37 | {
38 | string processName = Process.GetCurrentProcess().ProcessName;
39 | int currentProcessId = RemoteHooking.GetCurrentProcessId();
40 | this.Text = $"发送封包 -【 序号 {this.Send_Index} 】- {processName} [{currentProcessId.ToString()}] by RNShinoa";
41 | this.bSend.Enabled = true;
42 | this.bSendStop.Enabled = false;
43 | this.InitSendSocketInfo();
44 | this.ShowStepValue();
45 | }
46 |
47 | private void tSend_Tick(object sender, EventArgs e)
48 | {
49 | this.tlSendPacket_CNT.Text = this.SendPacketCNT.ToString();
50 | this.tlSend_Success_CNT.Text = this.Send_Success_CNT.ToString();
51 | this.tlSend_Fail_CNT.Text = this.Send_Fail_CNT.ToString();
52 | }
53 |
54 | private void nudStepIndex_ValueChanged(object sender, EventArgs e)
55 | {
56 | this.ShowStepValue();
57 | }
58 |
59 | private void nudStepLen_ValueChanged(object sender, EventArgs e)
60 | {
61 | this.ShowStepValue();
62 | }
63 |
64 | private void bSend_Click(object sender, EventArgs e)
65 | {
66 | if (this.cbStep.Checked)
67 | {
68 | string sIndex = this.lStepIndex.Text.Trim();
69 | string sLen = this.lStepLen.Text.Trim();
70 | if (string.IsNullOrEmpty(sIndex) || string.IsNullOrEmpty(sLen))
71 | {
72 | MessageBox.Show("请正确设置递进位置!");
73 | return;
74 | }
75 | }
76 | this.bSend.Enabled = false;
77 | this.bSendStop.Enabled = true;
78 | this.SendPacketCNT = 0;
79 | this.Send_Success_CNT = 0;
80 | this.Send_Fail_CNT = 0;
81 | if (!this.bgwSendPacket.IsBusy)
82 | {
83 | this.bgwSendPacket.RunWorkerAsync();
84 | }
85 | }
86 |
87 | private void bSendStop_Click(object sender, EventArgs e)
88 | {
89 | this.bgwSendPacket.CancelAsync();
90 | this.bSend.Enabled = true;
91 | this.bSendStop.Enabled = false;
92 | }
93 |
94 | private void cmsSocketSend_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
95 | {
96 | if (e.ClickedItem.Text.Equals("添加到发送列表"))
97 | {
98 | string socket = this.txtSend_Socket.Text.Trim();
99 | string length = this.txtSend_Len.Text.Trim();
100 | string data = this.rtbSocketSend_Data.Text.Trim();
101 | string count = this.txtSend_CNT.Text.Trim();
102 | string times = this.txtSend_Int.Text.Trim();
103 | byte[] buffer = this.so.Hex_To_Byte(data);
104 | DataRow row = SocketSend.dtSocketBatchSend.NewRow();
105 | row[0] = int.Parse(this.Send_Index);
106 | row[1] = int.Parse(socket);
107 | row[2] = this.Send_IPTo;
108 | row[3] = buffer.Length;
109 | row[4] = data;
110 | row[5] = buffer;
111 | SocketSend.dtSocketBatchSend.Rows.Add(row);
112 | if (!SocketSend.bHasBatchSendForm)
113 | {
114 | new SocketBatchSend_Form().Show();
115 | }
116 | }
117 | }
118 |
119 | private void bgwSendPacket_DoWork(object sender, DoWorkEventArgs e)
120 | {
121 | this.SendPacket();
122 | this.bSend.Enabled = true;
123 | this.bSendStop.Enabled = false;
124 | }
125 |
126 | private void InitSendSocketInfo()
127 | {
128 | try
129 | {
130 | this.txtSend_Socket.Text = this.Send_Socket;
131 | this.txtSend_Len.Text = this.Send_Len;
132 | this.txtSend_IP.Text = this.Send_IPTo.Split(':')[0];
133 | this.txtSend_Port.Text = this.Send_IPTo.Split(':')[1];
134 | this.rtbSocketSend_Data.Text = this.so.Byte_To_Hex(this.Send_Byte);
135 | }
136 | catch (Exception)
137 | {
138 | }
139 | }
140 |
141 | public void SendPacket()
142 | {
143 | int number = int.Parse(this.txtSend_CNT.Text.Trim());
144 | int times = int.Parse(this.txtSend_Int.Text.Trim());
145 | string data = this.rtbSocketSend_Data.Text;
146 |
147 | for (int i = 0; i < number; i++)
148 | {
149 | if (this.bgwSendPacket.CancellationPending) break;
150 |
151 | try
152 | {
153 | int socket = int.Parse(this.txtSend_Socket.Text.Trim());
154 | int len = int.Parse(this.txtSend_Len.Text.Trim());
155 | if (this.cbStep.Checked)
156 | {
157 | int iIndex = int.Parse(this.nudStepIndex.Value.ToString()) - 1;
158 | int iLen = int.Parse(this.nudStepLen.Value.ToString());
159 | data = this.so.ReplaceValueByIndexAndLen_HEX(data, iIndex, iLen);
160 | if (string.IsNullOrEmpty(data))
161 | {
162 | this.Send_Fail_CNT++;
163 | break;
164 | }
165 | }
166 | byte[] source = this.so.Hex_To_Byte(data);
167 | IntPtr buffer = Marshal.AllocHGlobal(source.Length);
168 | Marshal.Copy(source, 0, buffer, source.Length);
169 |
170 | if (socket > 0 && (source.Length != 0))
171 | {
172 | if (this.ws.SendPacket(socket, buffer, source.Length))
173 | {
174 | this.Send_Success_CNT++;
175 | }
176 | else
177 | {
178 | this.Send_Fail_CNT++;
179 | }
180 | int cnt = number - this.SendPacketCNT;
181 | if (cnt > 0)
182 | {
183 | this.txtSend_CNT.Text = cnt.ToString();
184 | }
185 | Thread.Sleep(times);
186 | }
187 | }
188 | catch
189 | {
190 | this.Send_Fail_CNT++;
191 | }
192 | this.SendPacketCNT++;
193 | }
194 | }
195 |
196 | private void ShowStepValue()
197 | {
198 | int iIndex = int.Parse(this.nudStepIndex.Value.ToString()) - 1;
199 | int iLen = int.Parse(this.nudStepLen.Value.ToString());
200 | string sHex = this.rtbSocketSend_Data.Text.Trim();
201 | string sIndex = this.so.GetValueByIndex_HEX(sHex, iIndex);
202 | string sLen = this.so.GetValueByLen_HEX(sIndex, iLen);
203 | this.lStepIndex.Text = sIndex;
204 | this.lStepLen.Text = sLen;
205 | }
206 | }
207 | }
208 |
--------------------------------------------------------------------------------
/WPELibrary/SocketBatchSend_Form.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 293, 17
122 |
123 |
124 | 431, 17
125 |
126 |
127 | True
128 |
129 |
130 | True
131 |
132 |
133 | True
134 |
135 |
136 | True
137 |
138 |
139 | True
140 |
141 |
142 | True
143 |
144 |
145 | True
146 |
147 |
148 | True
149 |
150 |
151 | True
152 |
153 |
154 | True
155 |
156 |
157 | 596, 17
158 |
159 |
160 | 742, 17
161 |
162 |
163 | 17, 17
164 |
165 |
166 | True
167 |
168 |
169 | True
170 |
171 |
172 | True
173 |
174 |
175 | True
176 |
177 |
178 | 153, 17
179 |
180 |
181 | True
182 |
183 |
--------------------------------------------------------------------------------
/WPELibrary/SocketBatchSend_Form.cs:
--------------------------------------------------------------------------------
1 | using EasyHook;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.Data;
6 | using System.Diagnostics;
7 | using System.Drawing;
8 | using System.IO;
9 | using System.Linq;
10 | using System.Runtime.InteropServices;
11 | using System.Text;
12 | using System.Threading;
13 | using System.Threading.Tasks;
14 | using System.Windows.Forms;
15 | using WPELibrary.Lib;
16 |
17 | namespace WPELibrary
18 | {
19 | public partial class SocketBatchSend_Form : Form
20 | {
21 | private WinSockHook ws = new WinSockHook();
22 | private SocketOperation so = new SocketOperation();
23 | private int SendBatchCNT = 0;
24 | private int Send_Success_CNT = 0;
25 | private int Send_Fail_CNT = 0;
26 |
27 | public SocketBatchSend_Form()
28 | {
29 | InitializeComponent();
30 | }
31 |
32 | private void SocketBatchSend_Form_Load(object sender, EventArgs e)
33 | {
34 | string processName = Process.GetCurrentProcess().ProcessName;
35 | int currentProcessId = RemoteHooking.GetCurrentProcessId();
36 | this.Text = $"发送列表 - {processName} [{currentProcessId.ToString()}] by RNShinoa";
37 | SocketSend.bHasBatchSendForm = true;
38 | this.dgBatchSend.AutoGenerateColumns = false;
39 | this.bSend.Enabled = true;
40 | this.bSendStop.Enabled = false;
41 | this.InitBatchSendSocketInfo();
42 | }
43 |
44 | private void SocketBatchSend_Form_FormClosed(object sender, FormClosedEventArgs e)
45 | {
46 | SocketSend.bHasBatchSendForm = false;
47 | }
48 |
49 | private void bLoadSocket_Click(object sender, EventArgs e)
50 | {
51 | int success = 0;
52 | int fail = 0;
53 | try
54 | {
55 | this.ofdLoadSocket.ShowDialog();
56 | string fileName = this.ofdLoadSocket.FileName;
57 | if (!string.IsNullOrEmpty(fileName))
58 | {
59 | string[] send_list = File.ReadAllLines(fileName, Encoding.Default);
60 | SocketSend.dtSocketBatchSend.Rows.Clear();
61 | foreach (string packet in send_list)
62 | {
63 | try
64 | {
65 | string[] send_data = packet.Split('|');
66 | string index = send_data[0];
67 | string socket = send_data[1];
68 | string to = send_data[2];
69 | string length = send_data[3];
70 | string data = send_data[4];
71 | byte[] buffer = this.so.Hex_To_Byte(data);
72 | DataRow row = SocketSend.dtSocketBatchSend.NewRow();
73 | row[0] = int.Parse(index);
74 | row[1] = int.Parse(socket);
75 | row[2] = to;
76 | row[3] = length;
77 | row[4] = data;
78 | row[5] = buffer;
79 | SocketSend.dtSocketBatchSend.Rows.Add(row);
80 | success++;
81 | }
82 | catch
83 | {
84 | fail++;
85 | }
86 | }
87 | }
88 | MessageBox.Show("加载完毕,成功【" + success.ToString() + "】失败【" + fail.ToString() + "】!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
89 | }
90 | catch (Exception ex)
91 | {
92 | MessageBox.Show("加载失败!错误:" + ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
93 | }
94 | }
95 |
96 | private void bSaveSocket_Click(object sender, EventArgs e)
97 | {
98 | int success = 0;
99 | int fail = 0;
100 | if ((this.dgBatchSend.Rows.Count > 0) && (this.sfdSaveSocket.ShowDialog() == DialogResult.OK))
101 | {
102 | try
103 | {
104 | FileStream stream = new FileStream(this.sfdSaveSocket.FileName, FileMode.Create);
105 | StreamWriter writer = new StreamWriter(stream);
106 | for (int i = 0; i < this.dgBatchSend.Rows.Count; i++)
107 | {
108 | try
109 | {
110 | byte[] data = (byte[])SocketSend.dtSocketBatchSend.Rows[i]["字节"];
111 | string index = (i + 1).ToString();
112 | string socket = this.dgBatchSend.Rows[i].Cells[1].Value.ToString().Trim();
113 | string to = this.dgBatchSend.Rows[i].Cells[2].Value.ToString().Trim();
114 | string length = this.dgBatchSend.Rows[i].Cells[3].Value.ToString().Trim();
115 | string buffer = this.so.Byte_To_Hex(data);
116 | string text = string.Concat(new string[] { index, "|", socket, "|", to, "|", length, "|", buffer });
117 | writer.WriteLine(text);
118 | success++;
119 | }
120 | catch
121 | {
122 | fail++;
123 | }
124 | }
125 | writer.Flush();
126 | writer.Close();
127 | stream.Close();
128 | MessageBox.Show("保存完毕,成功【" + success.ToString() + "】失败【" + fail.ToString() + "】!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
129 | }
130 | catch (Exception ex)
131 | {
132 | MessageBox.Show("保存失败!错误:" + ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
133 | }
134 | }
135 | }
136 |
137 | private void bSend_Click(object sender, EventArgs e)
138 | {
139 | bool flag = true;
140 | if (this.cbUseSocket.Checked)
141 | {
142 | string socket = this.txtUseSocket.Text.Trim();
143 | if (string.IsNullOrEmpty(socket))
144 | {
145 | flag = false;
146 | }
147 | else
148 | {
149 | try
150 | {
151 | if (int.Parse(socket) <= 0)
152 | {
153 | flag = false;
154 | }
155 | }
156 | catch
157 | {
158 | flag = false;
159 | }
160 | }
161 | }
162 | if (flag)
163 | {
164 | this.bSend.Enabled = false;
165 | this.bSendStop.Enabled = true;
166 | this.cbUseSocket.Enabled = false;
167 | this.txtUseSocket.Enabled = false;
168 | this.SendBatchCNT = 0;
169 | this.Send_Success_CNT = 0;
170 | this.Send_Fail_CNT = 0;
171 | if (!this.bgwSendPacket.IsBusy)
172 | {
173 | this.bgwSendPacket.RunWorkerAsync();
174 | }
175 | }
176 | else
177 | {
178 | MessageBox.Show("请正确设置套接字!");
179 | }
180 | }
181 |
182 | private void bSendStop_Click(object sender, EventArgs e)
183 | {
184 | this.bgwSendPacket.CancelAsync();
185 | this.bSend.Enabled = true;
186 | this.bSendStop.Enabled = false;
187 | }
188 |
189 | private void cmsBatchSend_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
190 | {
191 | string text = e.ClickedItem.Text;
192 | if (text.Equals("从列表中移除"))
193 | {
194 | if (this.dgBatchSend.SelectedRows.Count == 1)
195 | {
196 | int index = this.dgBatchSend.SelectedRows[0].Index;
197 | SocketSend.dtSocketBatchSend.Rows[index].Delete();
198 | }
199 | }
200 | else if (text.Equals("清空发送列表"))
201 | {
202 | SocketSend.dtSocketBatchSend.Rows.Clear();
203 | }
204 | }
205 |
206 | private void bgwSendPacket_DoWork(object sender, DoWorkEventArgs e)
207 | {
208 | this.SendPacket();
209 | this.bSend.Enabled = true;
210 | this.bSendStop.Enabled = false;
211 | this.cbUseSocket.Enabled = true;
212 | this.txtUseSocket.Enabled = true;
213 | }
214 |
215 | private void tSend_Tick(object sender, EventArgs e)
216 | {
217 | this.tlSendBatch_CNT.Text = this.SendBatchCNT.ToString();
218 | this.tlSend_Success_CNT.Text = this.Send_Success_CNT.ToString();
219 | this.tlSend_Fail_CNT.Text = this.Send_Fail_CNT.ToString();
220 | }
221 |
222 | private void InitBatchSendSocketInfo()
223 | {
224 | if (SocketSend.iUseSocket > 0)
225 | {
226 | this.txtUseSocket.Text = SocketSend.iUseSocket.ToString();
227 | }
228 | this.dgBatchSend.DataSource = SocketSend.dtSocketBatchSend;
229 | }
230 |
231 | public void SendPacket()
232 | {
233 | try
234 | {
235 | int number = int.Parse(this.txtSend_CNT.Text.Trim());
236 | int times = int.Parse(this.txtSend_Int.Text.Trim());
237 | for (int i = 0; i < number; i++)
238 | {
239 | for (int j = 0; j < SocketSend.dtSocketBatchSend.Rows.Count; j++)
240 | {
241 | if (this.bgwSendPacket.CancellationPending)
242 | {
243 | return;
244 | }
245 | int socket = 0;
246 | if (this.cbUseSocket.Checked)
247 | {
248 | socket = int.Parse(this.txtUseSocket.Text.Trim());
249 | }
250 | else
251 | {
252 | socket = int.Parse(SocketSend.dtSocketBatchSend.Rows[j]["套接字"].ToString());
253 | }
254 | int len = int.Parse(SocketSend.dtSocketBatchSend.Rows[j]["长度"].ToString());
255 | byte[] buffer = (byte[])SocketSend.dtSocketBatchSend.Rows[j]["字节"];
256 | if ((socket > 0) && (buffer.Length != 0))
257 | {
258 | IntPtr destination = Marshal.AllocHGlobal(buffer.Length);
259 | Marshal.Copy(buffer, 0, destination, buffer.Length);
260 | if (this.ws.SendPacket(socket, destination, buffer.Length))
261 | {
262 | this.Send_Success_CNT++;
263 | }
264 | else
265 | {
266 | this.Send_Fail_CNT++;
267 | }
268 | Thread.Sleep(times);
269 | }
270 | }
271 | this.SendBatchCNT++;
272 | int cnt = number - this.SendBatchCNT;
273 | if (cnt > 0)
274 | {
275 | this.txtSend_CNT.Text = cnt.ToString();
276 | }
277 | }
278 | }
279 | catch
280 | {
281 | }
282 | }
283 | }
284 | }
285 |
--------------------------------------------------------------------------------
/WPELibrary/Lib/SocketOperation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.InteropServices;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace WPELibrary.Lib
9 | {
10 | public class SocketOperation
11 | {
12 | public bool Filter_Size = false;
13 | public bool Filter_Socket = false;
14 | public bool Filter_IP = false;
15 | public bool Filter_Packet = false;
16 | public string Filter_Size_From = string.Empty;
17 | public string Filter_Size_To = string.Empty;
18 | public string Filter_Socket_txt = string.Empty;
19 | public string Filter_IP_txt = string.Empty;
20 | public string Filter_Packet_txt = string.Empty;
21 |
22 | [DllImport("ws2_32.dll")]
23 | private static extern IntPtr inet_ntoa(SocketPacket.in_addr a);
24 | [DllImport("ws2_32.dll")]
25 | private static extern ushort ntohs(ushort netshort);
26 |
27 | [DllImport("ws2_32.dll")]
28 | private static extern int getsockname(int s, ref SocketPacket.sockaddr Address, ref int namelen);
29 | [DllImport("ws2_32.dll")]
30 | private static extern int getpeername(int s, ref SocketPacket.sockaddr Address, ref int namelen);
31 |
32 | ///
33 | /// 字节转二进制
34 | ///
35 | /// 字节数据
36 | /// 二进制字符串
37 | public string Byte_To_Bin(byte[] buffer)
38 | {
39 | string strResult = string.Empty;
40 | foreach (byte bytes in buffer)
41 | {
42 | string strTemp = Convert.ToString(bytes, 2);
43 | strTemp = strTemp.Insert(0, new string('0', 8 - strTemp.Length));
44 | strResult += strTemp + " ";
45 | }
46 | strResult.Trim();
47 | return strResult;
48 | }
49 |
50 | ///
51 | /// 字节转十进制
52 | ///
53 | /// 字节数据
54 | /// 十进制字符串
55 | public string Byte_To_Dec(byte[] buffer)
56 | {
57 | string strResult = string.Empty;
58 | foreach (byte bytes in buffer)
59 | {
60 | strResult += bytes.ToString("D3") + " ";
61 | }
62 | return strResult;
63 | }
64 |
65 | ///
66 | /// 字节转字符
67 | ///
68 | /// 字节数据
69 | /// 字符串
70 | public string Byte_To_Default(byte[] buffer)
71 | {
72 | return Encoding.Default.GetString(buffer);
73 | }
74 |
75 | ///
76 | /// 字节转GB2312
77 | ///
78 | /// 字节数据
79 | /// GB2312字符串
80 | public string Byte_To_GB2312(byte[] buffer)
81 | {
82 | return Encoding.GetEncoding("gb2312").GetString(buffer);
83 | }
84 |
85 | ///
86 | /// 字节转十六进制
87 | ///
88 | /// 字节数据
89 | /// 十六进制字符串
90 | public string Byte_To_Hex(byte[] buffer)
91 | {
92 | string strResult = string.Empty;
93 | foreach (byte bytes in buffer)
94 | {
95 | strResult += bytes.ToString("X2") + " ";
96 | }
97 | strResult.Trim();
98 | return strResult;
99 | }
100 |
101 | ///
102 | /// 字节转UNICODE
103 | ///
104 | /// 字节数据
105 | /// UNICODE字符串
106 | public string Byte_To_Unicode(byte[] buffer)
107 | {
108 | return Encoding.GetEncoding("utf-16").GetString(buffer);
109 | }
110 |
111 | ///
112 | /// 字节转UTF-8
113 | ///
114 | /// 字节数据
115 | /// UTF-8字符串
116 | public string Byte_To_UTF8(byte[] buffer)
117 | {
118 | return Encoding.GetEncoding("utf-8").GetString(buffer);
119 | }
120 |
121 | private bool DoFilter_IP(string sIP_From, string sIP_To)
122 | {
123 | if (this.Filter_IP)
124 | {
125 | try
126 | {
127 | string[] strArray = this.Filter_IP_txt.Split(';');
128 | foreach (string str in strArray)
129 | {
130 | if ((sIP_From.IndexOf(str) >= 0) || (sIP_To.IndexOf(str) >= 0))
131 | {
132 | return true;
133 | }
134 | }
135 | }
136 | catch
137 | {
138 | }
139 | }
140 | return false;
141 | }
142 |
143 | private bool DoFilter_Packet(string sPacket)
144 | {
145 | if (this.Filter_Packet)
146 | {
147 | try
148 | {
149 | string[] strArray = this.Filter_Packet_txt.Split(';');
150 | foreach (string str in strArray)
151 | {
152 | if (sPacket.IndexOf(str) >= 0)
153 | {
154 | return true;
155 | }
156 | }
157 | }
158 | catch
159 | {
160 | }
161 | }
162 | return false;
163 | }
164 |
165 | private bool DoFilter_Size(int iLength)
166 | {
167 | bool flag = false;
168 | if (this.Filter_Size)
169 | {
170 | try
171 | {
172 | int size_from = int.Parse(this.Filter_Size_From);
173 | int size_to = int.Parse(this.Filter_Size_To);
174 | if ((iLength >= size_from) && (iLength <= size_to))
175 | {
176 | return false;
177 | }
178 | flag = true;
179 | }
180 | catch
181 | {
182 | }
183 | }
184 | return flag;
185 | }
186 |
187 | private bool DoFilter_Socket(int iSocket)
188 | {
189 | if (this.Filter_Socket)
190 | {
191 | try
192 | {
193 | string[] strArray = this.Filter_Socket_txt.Split(';');
194 | foreach (string str in strArray)
195 | {
196 | if (iSocket == int.Parse(str))
197 | {
198 | return true;
199 | }
200 | }
201 | }
202 | catch
203 | {
204 | }
205 | }
206 | return false;
207 | }
208 |
209 | public bool Filter(SocketPacket s)
210 | {
211 | int socket = s.Socket;
212 | byte[] buffer = s.Buffer;
213 | int length = s.Length;
214 | string sIP_From = this.GetSocketIP(socket, "F");
215 | string sIP_To = this.GetSocketIP(socket, "T");
216 | if (this.DoFilter_Size(length))
217 | {
218 | return false;
219 | }
220 | if (this.DoFilter_Socket(socket))
221 | {
222 | return false;
223 | }
224 | if (this.DoFilter_IP(sIP_From, sIP_To))
225 | {
226 | return false;
227 | }
228 | string sPacket = this.Byte_To_Hex(buffer);
229 | if (this.DoFilter_Packet(sPacket))
230 | {
231 | return false;
232 | }
233 | return true;
234 | }
235 |
236 | public bool Filter_Default(SocketPacket s)
237 | {
238 | int socket = s.Socket;
239 | string sIP_From = this.GetSocketIP(socket, "F");
240 | string sIP_To = this.GetSocketIP(socket, "T");
241 | if (sIP_From.Equals("0.0.0.0:0") || sIP_To.Equals("0.0.0.0:0"))
242 | {
243 | return false;
244 | }
245 | return true;
246 | }
247 |
248 | private string GetAddr_IP(SocketPacket.in_addr in_Addr)
249 | {
250 | return Marshal.PtrToStringAnsi(inet_ntoa(in_Addr));
251 | }
252 |
253 | private string GetAddr_Port(ushort NetPort)
254 | {
255 | return ntohs(NetPort).ToString();
256 | }
257 |
258 | public string GetSocketIP(int iSocket, string sIP_Type)
259 | {
260 | string sIP = string.Empty;
261 | string sPort = string.Empty;
262 | SocketPacket.sockaddr structure = new SocketPacket.sockaddr();
263 | int namelen = Marshal.SizeOf(structure);
264 | if (sIP_Type.Equals("F"))
265 | {
266 | getsockname(iSocket, ref structure, ref namelen);
267 | }
268 | else if (sIP_Type.Equals("T"))
269 | {
270 | getpeername(iSocket, ref structure, ref namelen);
271 | }
272 | sIP = this.GetAddr_IP(structure.sin_addr);
273 | sPort = this.GetAddr_Port(structure.sin_port);
274 | return (sIP + ":" + sPort);
275 | }
276 |
277 | public string GetSocketIP(SocketPacket.in_addr in_Addr, ushort NetPort)
278 | {
279 | string sIP = string.Empty;
280 | string sPort = string.Empty;
281 | sIP = this.GetAddr_IP(in_Addr);
282 | sPort = this.GetAddr_Port(NetPort);
283 | return (sIP + ":" + sPort);
284 | }
285 |
286 | public string GetValueByIndex_HEX(string sHex, int iIndex)
287 | {
288 | string hexString = string.Empty;
289 | try
290 | {
291 | string[] strArray = sHex.Split(' ');
292 | if (strArray.Length > iIndex)
293 | {
294 | hexString = strArray[iIndex];
295 | }
296 | }
297 | catch
298 | {
299 | }
300 | return hexString;
301 | }
302 |
303 | public string GetValueByLen_HEX(string sHex, int iLen)
304 | {
305 | string hexString = string.Empty;
306 | try
307 | {
308 | hexString = (Convert.ToInt32(sHex, 0x10) + iLen).ToString("X2");
309 | }
310 | catch
311 | {
312 | }
313 | return hexString;
314 | }
315 |
316 | public byte[] Hex_To_Byte(string hexString)
317 | {
318 | hexString = hexString.Replace(" ", "");
319 | if ((hexString.Length % 2) != 0)
320 | {
321 | hexString = hexString + " ";
322 | }
323 | byte[] buffer = new byte[hexString.Length / 2];
324 | for (int i = 0; i < buffer.Length; i++)
325 | {
326 | buffer[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 0x10);
327 | }
328 | return buffer;
329 | }
330 |
331 | public string ReplaceValueByIndexAndLen_HEX(string sHex, int iIndex, int iLen)
332 | {
333 | string strResult = string.Empty;
334 | try
335 | {
336 | string hexString = this.GetValueByIndex_HEX(sHex, iIndex);
337 | string sHexValue = this.GetValueByLen_HEX(hexString, iLen);
338 | int startIndex = iIndex * 3;
339 | strResult = sHex.Remove(startIndex, 2).Insert(startIndex, sHexValue);
340 | }
341 | catch
342 | {
343 | }
344 | return strResult;
345 | }
346 | }
347 | }
348 |
--------------------------------------------------------------------------------
/WPELibrary/SocketSend_Form.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 161, 17
122 |
123 |
124 | True
125 |
126 |
127 | True
128 |
129 |
130 | True
131 |
132 |
133 | True
134 |
135 |
136 | True
137 |
138 |
139 | True
140 |
141 |
142 | True
143 |
144 |
145 | True
146 |
147 |
148 | True
149 |
150 |
151 | True
152 |
153 |
154 | True
155 |
156 |
157 | True
158 |
159 |
160 | True
161 |
162 |
163 | True
164 |
165 |
166 | True
167 |
168 |
169 | True
170 |
171 |
172 | True
173 |
174 |
175 | True
176 |
177 |
178 | True
179 |
180 |
181 | True
182 |
183 |
184 | True
185 |
186 |
187 | True
188 |
189 |
190 | True
191 |
192 |
193 | True
194 |
195 |
196 | True
197 |
198 |
199 | True
200 |
201 |
202 | True
203 |
204 |
205 | True
206 |
207 |
208 | True
209 |
210 |
211 | True
212 |
213 |
214 | 293, 17
215 |
216 |
217 | 17, 17
218 |
219 |
220 | 439, 17
221 |
222 |
223 | True
224 |
225 |
226 | True
227 |
228 |
229 | True
230 |
231 |
232 | True
233 |
234 |
235 | True
236 |
237 |
238 | True
239 |
240 |
241 | True
242 |
243 |
244 | True
245 |
246 |
247 | True
248 |
249 |
250 | True
251 |
252 |
253 | True
254 |
255 |
--------------------------------------------------------------------------------
/WPELibrary/DLL_Form.cs:
--------------------------------------------------------------------------------
1 | using EasyHook;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.Data;
6 | using System.Diagnostics;
7 | using System.Drawing;
8 | using System.Linq;
9 | using System.Reflection;
10 | using System.Runtime.CompilerServices;
11 | using System.Runtime.InteropServices;
12 | using System.Text;
13 | using System.Threading;
14 | using System.Threading.Tasks;
15 | using System.Windows.Forms;
16 | using WPELibrary.Lib;
17 | using static WPELibrary.Lib.SocketEvent;
18 |
19 | namespace WPELibrary
20 | {
21 | public partial class DLL_Form : Form
22 | {
23 | private WinSockHook ws = new WinSockHook();
24 | private SocketOperation so = new SocketOperation();
25 | private BindingList lstRecPacket = new BindingList();
26 | private int Select_Index = -1;
27 | private int FilterCNT = 0;
28 | private int iShowDataLen = 50;
29 | private bool bDebug = true;
30 | private bool bWakeUp = true;
31 |
32 | public DLL_Form()
33 | {
34 | InitializeComponent();
35 | }
36 |
37 | private void DLL_Form_Load(object sender, EventArgs e)
38 | {
39 | this.Init();
40 | this.bStartHook.Enabled = true;
41 | this.bStopHook.Enabled = false;
42 | this.Text = "封包拦截器(无需代理)by RNShinoa";
43 | this.tlSystemInfo.Text = $"已注入目标进程 {Process.GetCurrentProcess().ProcessName} [{RemoteHooking.GetCurrentProcessId()}]";
44 | SocketSend.dtSocketBatchSend.Columns.Add("序号", typeof(int));
45 | SocketSend.dtSocketBatchSend.Columns.Add("套接字", typeof(int));
46 | SocketSend.dtSocketBatchSend.Columns.Add("目的地址", typeof(string));
47 | SocketSend.dtSocketBatchSend.Columns.Add("长度", typeof(int));
48 | SocketSend.dtSocketBatchSend.Columns.Add("数据", typeof(string));
49 | SocketSend.dtSocketBatchSend.Columns.Add("字节", typeof(byte[]));
50 | this.dgSocketInfo.AutoGenerateColumns = false;
51 | this.dgSocketInfo.DataSource = this.lstRecPacket;
52 | this.dgSocketInfo.GetType().GetProperty("DoubleBuffered", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(this.dgSocketInfo, true, null);
53 | this.RecSocketPacket += new SocketEvent.SocketPacketReceived(this.Event_RecSocketPacket);
54 | this.tSocketInfo.Enabled = true;
55 | }
56 |
57 | private void DLL_Form_FormClosed(object sender, FormClosedEventArgs e)
58 | {
59 | try
60 | {
61 | LocalHook.Release();
62 | }
63 | catch (Exception ex)
64 | {
65 | this.ShowDebug(ex.Message);
66 | }
67 | finally
68 | {
69 | if (this.bWakeUp)
70 | {
71 | RemoteHooking.WakeUpProcess();
72 | this.bWakeUp = false;
73 | }
74 | }
75 | }
76 |
77 | private void tSocketInfo_Tick(object sender, EventArgs e)
78 | {
79 | this.tlQueue_CNT.Text = this.ws._SocketQueue.Count.ToString();
80 | this.tlALL_CNT.Text = (this.ws.Recv_CNT + this.ws.Send_CNT).ToString();
81 | this.tlRecv_CNT.Text = this.ws.Recv_CNT.ToString();
82 | this.tlSend_CNT.Text = this.ws.Send_CNT.ToString();
83 | this.tlInterecept_CNT.Text = this.ws.Interecept_CNT.ToString();
84 | this.tlFilter_CNT.Text = this.FilterCNT.ToString();
85 | if (!this.bgwSocketInfo.IsBusy && (this.ws._SocketQueue.Count > 0))
86 | {
87 | this.bgwSocketInfo.RunWorkerAsync();
88 | }
89 | }
90 |
91 | private void bgwSocketInfo_DoWork(object sender, DoWorkEventArgs e)
92 | {
93 | this.ShowSocketInfo();
94 | }
95 |
96 | private void bStartHook_Click(object sender, EventArgs e)
97 | {
98 | this.Init();
99 | this.bStartHook.Enabled = false;
100 | this.bStopHook.Enabled = true;
101 | this.ws.StartHook();
102 |
103 | if (this.bWakeUp)
104 | {
105 | RemoteHooking.WakeUpProcess();
106 | this.bWakeUp = false;
107 | }
108 | }
109 |
110 | private void bStopHook_Click(object sender, EventArgs e)
111 | {
112 | this.bStartHook.Enabled = true;
113 | this.bStopHook.Enabled = false;
114 |
115 | this.ws.StopHook();
116 | }
117 |
118 | private void cmsSocketInfo_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
119 | {
120 | string text = e.ClickedItem.Text;
121 | if (text.Equals("查看发送列表"))
122 | {
123 | if (!SocketSend.bHasBatchSendForm)
124 | {
125 | new SocketBatchSend_Form().Show();
126 | }
127 | }
128 | else if (this.Select_Index > -1)
129 | {
130 | try
131 | {
132 | int index = this.lstRecPacket[this.Select_Index].Index;
133 | int socket = this.lstRecPacket[this.Select_Index].Socket;
134 | int length = this.lstRecPacket[this.Select_Index].Length;
135 | string to = this.lstRecPacket[this.Select_Index].To;
136 | string data = this.lstRecPacket[this.Select_Index].Data;
137 | byte[] buffer = this.lstRecPacket[this.Select_Index].Buffer;
138 | if (text.Equals("发送"))
139 | {
140 | if ((this.Select_Index > -1 && this.dgSocketInfo.SelectedRows.Count == 1) && this.lstRecPacket.Count > 0)
141 | {
142 | new SocketSend_Form
143 | {
144 | Send_Index = index.ToString(),
145 | Send_Socket = socket.ToString(),
146 | Send_Len = length.ToString(),
147 | Send_IPTo = to,
148 | Send_Byte = buffer
149 | }.Show();
150 | }
151 | }
152 | else if (text.Equals("添加到发送列表"))
153 | {
154 | DataRow row = SocketSend.dtSocketBatchSend.NewRow();
155 | row[0] = index;
156 | row[1] = socket;
157 | row[2] = to;
158 | row[3] = length;
159 | row[4] = data;
160 | row[5] = buffer;
161 | SocketSend.dtSocketBatchSend.Rows.Add(row);
162 | if (!SocketSend.bHasBatchSendForm)
163 | {
164 | new SocketBatchSend_Form().Show();
165 | }
166 | }
167 | else if (text.Equals("使用此套接字"))
168 | {
169 | SocketSend.iUseSocket = socket;
170 | }
171 | }
172 | catch (Exception ex)
173 | {
174 | this.ShowDebug(ex.Message);
175 | }
176 | }
177 | }
178 |
179 | private void dgSocketInfo_SelectionChanged(object sender, EventArgs e)
180 | {
181 | if (this.dgSocketInfo.SelectedRows.Count == 1)
182 | {
183 | this.Select_Index = this.dgSocketInfo.SelectedRows[0].Index;
184 | this.ShowPacketInfo();
185 | }
186 | }
187 |
188 | private void bSearch_Click(object sender, EventArgs e)
189 | {
190 | string str = this.txtSearch.Text.Trim();
191 | if (!str.Equals(""))
192 | {
193 | for (int i = 0; i < this.dgSocketInfo.Rows.Count; i++)
194 | {
195 | if (this.dgSocketInfo.Rows[i].Cells[6].Value.ToString().IndexOf(str) >= 0)
196 | {
197 | this.dgSocketInfo.Rows[i].Selected = true;
198 | this.dgSocketInfo.CurrentCell = this.dgSocketInfo.Rows[i].Cells[0];
199 | break;
200 | }
201 | }
202 | }
203 | }
204 |
205 | private void tcPacketInfo_SelectedIndexChanged(object sender, EventArgs e)
206 | {
207 | this.ShowPacketInfo();
208 | }
209 |
210 | [field: CompilerGenerated, DebuggerBrowsable(0)]
211 | public event SocketPacketReceived RecSocketPacket;
212 |
213 | private void Event_RecSocketPacket(SocketInfo si)
214 | {
215 | this.dgSocketInfo.Invoke((MethodInvoker)delegate
216 | {
217 | this.lstRecPacket.Add(si);
218 | });
219 | }
220 |
221 | private void Init()
222 | {
223 | this.ws.Interecept_Recv = this.cbInterecept_Recv.Checked;
224 | this.ws.Interecept_RecvFrom = this.cbInterecept_RecvFrom.Checked;
225 | this.ws.Interecept_Send = this.cbInterecept_Send.Checked;
226 | this.ws.Interecept_SendTo = this.cbInterecept_SendTo.Checked;
227 | this.ws.Display_Recv = this.cbDisplay_Recv.Checked;
228 | this.ws.Display_RecvFrom = this.cbDisplay_RecvFrom.Checked;
229 | this.ws.Display_Send = this.cbDisplay_Send.Checked;
230 | this.ws.Display_SendTo = this.cbDisplay_SendTo.Checked;
231 | this.ws.Reset_CNT = this.cbReset_CNT.Checked;
232 | this.so.Filter_Size = this.cbFilter_Size.Checked;
233 | this.so.Filter_Socket = this.cbFilter_Socket.Checked;
234 | this.so.Filter_IP = this.cbFilter_IP.Checked;
235 | this.so.Filter_Packet = this.cbFilter_Packet.Checked;
236 | this.so.Filter_Size_From = this.txtFilter_Size_From.Text.Trim();
237 | this.so.Filter_Size_To = this.txtFilter_Size_To.Text.Trim();
238 | this.so.Filter_Socket_txt = this.txtFilter_Socket.Text.Trim();
239 | this.so.Filter_IP_txt = this.txtFilter_IP.Text.Trim();
240 | this.so.Filter_Packet_txt = this.txtFilter_Packet.Text.Trim();
241 | if (this.cbReset_CNT.Checked)
242 | {
243 | this.FilterCNT = 0;
244 | this.dgSocketInfo.Rows.Clear();
245 | this.rtbHEX.Clear();
246 | this.rtbDEC.Clear();
247 | this.rtbBIN.Clear();
248 | this.rtbUNICODE.Clear();
249 | this.rtbUTF8.Clear();
250 | this.rtbGB2312.Clear();
251 | this.rtbDEBUG.Clear();
252 | }
253 | }
254 |
255 | private void ShowDebug(string sLog)
256 | {
257 | if (this.bDebug)
258 | {
259 | this.rtbDEBUG.Invoke((MethodInvoker)delegate { this.rtbDEBUG.AppendText(sLog + "\n"); });
260 | }
261 | }
262 |
263 | private void ShowPacketInfo()
264 | {
265 | try
266 | {
267 | if (this.Select_Index > -1)
268 | {
269 | byte[] bSelected = this.lstRecPacket[this.Select_Index].Buffer;
270 | switch (tcPacketInfo.SelectedIndex)
271 | {
272 | case 0:
273 | this.rtbHEX.Invoke((MethodInvoker)delegate { this.rtbHEX.Text = this.so.Byte_To_Hex(bSelected); });
274 | break;
275 | case 1:
276 | this.rtbDEC.Invoke((MethodInvoker)delegate { this.rtbDEC.Text = this.so.Byte_To_Dec(bSelected); });
277 | break;
278 | case 2:
279 | this.rtbBIN.Invoke((MethodInvoker)delegate { this.rtbBIN.Text = this.so.Byte_To_Bin(bSelected); });
280 | break;
281 | case 3:
282 | this.rtbUNICODE.Invoke((MethodInvoker)delegate { this.rtbUNICODE.Text = this.so.Byte_To_Unicode(bSelected); });
283 | break;
284 | case 4:
285 | this.rtbUTF8.Invoke((MethodInvoker)delegate { this.rtbUTF8.Text = this.so.Byte_To_UTF8(bSelected); });
286 | break;
287 | case 5:
288 | this.rtbGB2312.Invoke((MethodInvoker)delegate { this.rtbGB2312.Text = this.so.Byte_To_GB2312(bSelected); });
289 | break;
290 | }
291 | }
292 | }
293 | catch (Exception ex)
294 | {
295 | this.ShowDebug("ShowPacketInfo - " + ex.Message);
296 | }
297 | }
298 |
299 | private void ShowSocketInfo()
300 | {
301 | try
302 | {
303 | if (this.ws._SocketQueue.Count > 0)
304 | {
305 | SocketPacket s = this.ws._SocketQueue.Dequeue();
306 | if (this.so.Filter(s))
307 | {
308 | int index = this.dgSocketInfo.Rows.Count + 1;
309 | string type = s.Type;
310 | int socket = s.Socket;
311 | int length = s.Length;
312 | byte[] buffer = s.Buffer;
313 | string data = "";
314 | if (length > this.iShowDataLen)
315 | {
316 | byte[] buffer2 = new byte[this.iShowDataLen];
317 | for (int i = 0; i < this.iShowDataLen; i++)
318 | {
319 | buffer2[i] = buffer[i];
320 | }
321 | data = this.so.Byte_To_Hex(buffer2) + " ...";
322 | }
323 | else
324 | {
325 | data = this.so.Byte_To_Hex(buffer);
326 | }
327 | SocketPacket.sockaddr addr = s.Addr;
328 | string from = "";
329 | string to = "";
330 | if (type.Equals("R"))
331 | {
332 | type = "接收";
333 | from = this.so.GetSocketIP(socket, "T");
334 | to = this.so.GetSocketIP(socket, "F");
335 | }
336 | else if (type.Equals("S"))
337 | {
338 | type = "发送";
339 | from = this.so.GetSocketIP(socket, "F");
340 | to = this.so.GetSocketIP(socket, "T");
341 | }
342 | else if (type.Equals("ST"))
343 | {
344 | type = "发送到";
345 | from = this.so.GetSocketIP(socket, "F");
346 | to = this.so.GetSocketIP(addr.sin_addr, addr.sin_port);
347 | }
348 | else if (type.Equals("RF"))
349 | {
350 | type = "接收自";
351 | from = this.so.GetSocketIP(addr.sin_addr, addr.sin_port);
352 | to = this.so.GetSocketIP(socket, "F");
353 | }
354 | SocketInfo si = new SocketInfo(index, type, socket, from, to, length, data, buffer);
355 | if (this.RecSocketPacket != null)
356 | {
357 | this.RecSocketPacket(si);
358 | }
359 | }
360 | else
361 | {
362 | this.FilterCNT++;
363 | }
364 | }
365 | }
366 | catch (Exception ex)
367 | {
368 | this.ShowDebug(ex.Message);
369 | }
370 | }
371 | }
372 | }
373 |
--------------------------------------------------------------------------------
/WPELibrary/SocketBatchSend_Form.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WPELibrary
2 | {
3 | partial class SocketBatchSend_Form
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows 窗体设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要修改
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
33 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
34 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
35 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
36 | this.cmsBatchSend = new System.Windows.Forms.ContextMenuStrip(this.components);
37 | this.tsmiDelete = new System.Windows.Forms.ToolStripMenuItem();
38 | this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
39 | this.tsmiClear = new System.Windows.Forms.ToolStripMenuItem();
40 | this.ssSocketBatchSend = new System.Windows.Forms.StatusStrip();
41 | this.tlSendBatch = new System.Windows.Forms.ToolStripStatusLabel();
42 | this.tlSendBatch_CNT = new System.Windows.Forms.ToolStripStatusLabel();
43 | this.tlSplit = new System.Windows.Forms.ToolStripStatusLabel();
44 | this.tlSend_Success = new System.Windows.Forms.ToolStripStatusLabel();
45 | this.tlSend_Success_CNT = new System.Windows.Forms.ToolStripStatusLabel();
46 | this.toolStripStatusLabel3 = new System.Windows.Forms.ToolStripStatusLabel();
47 | this.tlSend_Fail = new System.Windows.Forms.ToolStripStatusLabel();
48 | this.tlSend_Fail_CNT = new System.Windows.Forms.ToolStripStatusLabel();
49 | this.gbSend_Bottom = new System.Windows.Forms.GroupBox();
50 | this.bSendStop = new System.Windows.Forms.Button();
51 | this.txtSend_CNT = new System.Windows.Forms.TextBox();
52 | this.bSend = new System.Windows.Forms.Button();
53 | this.txtSend_Int = new System.Windows.Forms.TextBox();
54 | this.lSend_Int = new System.Windows.Forms.Label();
55 | this.lSend_CNT = new System.Windows.Forms.Label();
56 | this.txtUseSocket = new System.Windows.Forms.TextBox();
57 | this.cbUseSocket = new System.Windows.Forms.CheckBox();
58 | this.bgwSendPacket = new System.ComponentModel.BackgroundWorker();
59 | this.tSend = new System.Windows.Forms.Timer(this.components);
60 | this.sfdSaveSocket = new System.Windows.Forms.SaveFileDialog();
61 | this.dgBatchSend = new System.Windows.Forms.DataGridView();
62 | this.cIndex = new System.Windows.Forms.DataGridViewTextBoxColumn();
63 | this.cSocket = new System.Windows.Forms.DataGridViewTextBoxColumn();
64 | this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
65 | this.cLen = new System.Windows.Forms.DataGridViewTextBoxColumn();
66 | this.cData = new System.Windows.Forms.DataGridViewTextBoxColumn();
67 | this.bSaveSocket = new System.Windows.Forms.Button();
68 | this.groupBox1 = new System.Windows.Forms.GroupBox();
69 | this.bLoadSocket = new System.Windows.Forms.Button();
70 | this.ofdLoadSocket = new System.Windows.Forms.OpenFileDialog();
71 | this.cmsBatchSend.SuspendLayout();
72 | this.ssSocketBatchSend.SuspendLayout();
73 | this.gbSend_Bottom.SuspendLayout();
74 | ((System.ComponentModel.ISupportInitialize)(this.dgBatchSend)).BeginInit();
75 | this.groupBox1.SuspendLayout();
76 | this.SuspendLayout();
77 | //
78 | // cmsBatchSend
79 | //
80 | this.cmsBatchSend.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
81 | this.tsmiDelete,
82 | this.toolStripSeparator1,
83 | this.tsmiClear});
84 | this.cmsBatchSend.Name = "cmsBatchSend";
85 | this.cmsBatchSend.Size = new System.Drawing.Size(149, 54);
86 | this.cmsBatchSend.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.cmsBatchSend_ItemClicked);
87 | //
88 | // tsmiDelete
89 | //
90 | this.tsmiDelete.Name = "tsmiDelete";
91 | this.tsmiDelete.Size = new System.Drawing.Size(148, 22);
92 | this.tsmiDelete.Text = "从列表中移除";
93 | //
94 | // toolStripSeparator1
95 | //
96 | this.toolStripSeparator1.Name = "toolStripSeparator1";
97 | this.toolStripSeparator1.Size = new System.Drawing.Size(145, 6);
98 | //
99 | // tsmiClear
100 | //
101 | this.tsmiClear.Name = "tsmiClear";
102 | this.tsmiClear.Size = new System.Drawing.Size(148, 22);
103 | this.tsmiClear.Text = "清空发送列表";
104 | //
105 | // ssSocketBatchSend
106 | //
107 | this.ssSocketBatchSend.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
108 | this.tlSendBatch,
109 | this.tlSendBatch_CNT,
110 | this.tlSplit,
111 | this.tlSend_Success,
112 | this.tlSend_Success_CNT,
113 | this.toolStripStatusLabel3,
114 | this.tlSend_Fail,
115 | this.tlSend_Fail_CNT});
116 | this.ssSocketBatchSend.Location = new System.Drawing.Point(0, 326);
117 | this.ssSocketBatchSend.Name = "ssSocketBatchSend";
118 | this.ssSocketBatchSend.Size = new System.Drawing.Size(681, 22);
119 | this.ssSocketBatchSend.SizingGrip = false;
120 | this.ssSocketBatchSend.TabIndex = 3;
121 | //
122 | // tlSendBatch
123 | //
124 | this.tlSendBatch.Name = "tlSendBatch";
125 | this.tlSendBatch.Size = new System.Drawing.Size(71, 17);
126 | this.tlSendBatch.Text = "已循环次数:";
127 | //
128 | // tlSendBatch_CNT
129 | //
130 | this.tlSendBatch_CNT.Name = "tlSendBatch_CNT";
131 | this.tlSendBatch_CNT.Size = new System.Drawing.Size(15, 17);
132 | this.tlSendBatch_CNT.Text = "0";
133 | //
134 | // tlSplit
135 | //
136 | this.tlSplit.ForeColor = System.Drawing.Color.DarkGray;
137 | this.tlSplit.Name = "tlSplit";
138 | this.tlSplit.Size = new System.Drawing.Size(11, 17);
139 | this.tlSplit.Text = "|";
140 | //
141 | // tlSend_Success
142 | //
143 | this.tlSend_Success.Name = "tlSend_Success";
144 | this.tlSend_Success.Size = new System.Drawing.Size(59, 17);
145 | this.tlSend_Success.Text = "发送成功:";
146 | //
147 | // tlSend_Success_CNT
148 | //
149 | this.tlSend_Success_CNT.Name = "tlSend_Success_CNT";
150 | this.tlSend_Success_CNT.Size = new System.Drawing.Size(15, 17);
151 | this.tlSend_Success_CNT.Text = "0";
152 | //
153 | // toolStripStatusLabel3
154 | //
155 | this.toolStripStatusLabel3.ForeColor = System.Drawing.Color.DarkGray;
156 | this.toolStripStatusLabel3.Name = "toolStripStatusLabel3";
157 | this.toolStripStatusLabel3.Size = new System.Drawing.Size(11, 17);
158 | this.toolStripStatusLabel3.Text = "|";
159 | //
160 | // tlSend_Fail
161 | //
162 | this.tlSend_Fail.Name = "tlSend_Fail";
163 | this.tlSend_Fail.Size = new System.Drawing.Size(59, 17);
164 | this.tlSend_Fail.Text = "发送失败:";
165 | //
166 | // tlSend_Fail_CNT
167 | //
168 | this.tlSend_Fail_CNT.Name = "tlSend_Fail_CNT";
169 | this.tlSend_Fail_CNT.Size = new System.Drawing.Size(15, 17);
170 | this.tlSend_Fail_CNT.Text = "0";
171 | //
172 | // gbSend_Bottom
173 | //
174 | this.gbSend_Bottom.Controls.Add(this.bSendStop);
175 | this.gbSend_Bottom.Controls.Add(this.txtSend_CNT);
176 | this.gbSend_Bottom.Controls.Add(this.bSend);
177 | this.gbSend_Bottom.Controls.Add(this.txtSend_Int);
178 | this.gbSend_Bottom.Controls.Add(this.lSend_Int);
179 | this.gbSend_Bottom.Controls.Add(this.lSend_CNT);
180 | this.gbSend_Bottom.Controls.Add(this.txtUseSocket);
181 | this.gbSend_Bottom.Controls.Add(this.cbUseSocket);
182 | this.gbSend_Bottom.Dock = System.Windows.Forms.DockStyle.Bottom;
183 | this.gbSend_Bottom.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
184 | this.gbSend_Bottom.Location = new System.Drawing.Point(0, 271);
185 | this.gbSend_Bottom.Name = "gbSend_Bottom";
186 | this.gbSend_Bottom.Size = new System.Drawing.Size(681, 55);
187 | this.gbSend_Bottom.TabIndex = 2;
188 | this.gbSend_Bottom.TabStop = false;
189 | //
190 | // bSendStop
191 | //
192 | this.bSendStop.Location = new System.Drawing.Point(609, 17);
193 | this.bSendStop.Name = "bSendStop";
194 | this.bSendStop.Size = new System.Drawing.Size(60, 29);
195 | this.bSendStop.TabIndex = 7;
196 | this.bSendStop.Text = "停止 (&T)";
197 | this.bSendStop.UseVisualStyleBackColor = true;
198 | this.bSendStop.Click += new System.EventHandler(this.bSendStop_Click);
199 | //
200 | // txtSend_CNT
201 | //
202 | this.txtSend_CNT.Location = new System.Drawing.Point(298, 20);
203 | this.txtSend_CNT.Name = "txtSend_CNT";
204 | this.txtSend_CNT.Size = new System.Drawing.Size(50, 23);
205 | this.txtSend_CNT.TabIndex = 4;
206 | this.txtSend_CNT.Text = "1";
207 | this.txtSend_CNT.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
208 | //
209 | // bSend
210 | //
211 | this.bSend.Location = new System.Drawing.Point(537, 17);
212 | this.bSend.Name = "bSend";
213 | this.bSend.Size = new System.Drawing.Size(60, 29);
214 | this.bSend.TabIndex = 6;
215 | this.bSend.Text = "发送 (&F)";
216 | this.bSend.UseVisualStyleBackColor = true;
217 | this.bSend.Click += new System.EventHandler(this.bSend_Click);
218 | //
219 | // txtSend_Int
220 | //
221 | this.txtSend_Int.Location = new System.Drawing.Point(451, 20);
222 | this.txtSend_Int.Name = "txtSend_Int";
223 | this.txtSend_Int.Size = new System.Drawing.Size(50, 23);
224 | this.txtSend_Int.TabIndex = 5;
225 | this.txtSend_Int.Text = "1000";
226 | this.txtSend_Int.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
227 | //
228 | // lSend_Int
229 | //
230 | this.lSend_Int.AutoSize = true;
231 | this.lSend_Int.Location = new System.Drawing.Point(354, 23);
232 | this.lSend_Int.Name = "lSend_Int";
233 | this.lSend_Int.Size = new System.Drawing.Size(91, 17);
234 | this.lSend_Int.TabIndex = 2;
235 | this.lSend_Int.Text = "发送间隔(毫秒):";
236 | //
237 | // lSend_CNT
238 | //
239 | this.lSend_CNT.AutoSize = true;
240 | this.lSend_CNT.Location = new System.Drawing.Point(228, 23);
241 | this.lSend_CNT.Name = "lSend_CNT";
242 | this.lSend_CNT.Size = new System.Drawing.Size(68, 17);
243 | this.lSend_CNT.TabIndex = 1;
244 | this.lSend_CNT.Text = "循环次数:";
245 | //
246 | // txtUseSocket
247 | //
248 | this.txtUseSocket.Location = new System.Drawing.Point(122, 20);
249 | this.txtUseSocket.Name = "txtUseSocket";
250 | this.txtUseSocket.Size = new System.Drawing.Size(100, 23);
251 | this.txtUseSocket.TabIndex = 3;
252 | //
253 | // cbUseSocket
254 | //
255 | this.cbUseSocket.AutoSize = true;
256 | this.cbUseSocket.Location = new System.Drawing.Point(15, 22);
257 | this.cbUseSocket.Name = "cbUseSocket";
258 | this.cbUseSocket.Size = new System.Drawing.Size(111, 21);
259 | this.cbUseSocket.TabIndex = 0;
260 | this.cbUseSocket.Text = "使用此套接字:";
261 | this.cbUseSocket.UseVisualStyleBackColor = true;
262 | //
263 | // bgwSendPacket
264 | //
265 | this.bgwSendPacket.WorkerSupportsCancellation = true;
266 | this.bgwSendPacket.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bgwSendPacket_DoWork);
267 | //
268 | // tSend
269 | //
270 | this.tSend.Enabled = true;
271 | this.tSend.Interval = 1000;
272 | this.tSend.Tick += new System.EventHandler(this.tSend_Tick);
273 | //
274 | // sfdSaveSocket
275 | //
276 | this.sfdSaveSocket.Filter = "封包数据文件(*.txt)|*.txt";
277 | this.sfdSaveSocket.RestoreDirectory = true;
278 | this.sfdSaveSocket.Title = "保存封包数据";
279 | //
280 | // dgBatchSend
281 | //
282 | this.dgBatchSend.AllowUserToAddRows = false;
283 | this.dgBatchSend.AllowUserToDeleteRows = false;
284 | this.dgBatchSend.AllowUserToResizeRows = false;
285 | this.dgBatchSend.BackgroundColor = System.Drawing.SystemColors.ControlDark;
286 | this.dgBatchSend.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
287 | this.dgBatchSend.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
288 | this.cIndex,
289 | this.cSocket,
290 | this.Column5,
291 | this.cLen,
292 | this.cData});
293 | this.dgBatchSend.ContextMenuStrip = this.cmsBatchSend;
294 | this.dgBatchSend.Dock = System.Windows.Forms.DockStyle.Fill;
295 | this.dgBatchSend.Location = new System.Drawing.Point(0, 0);
296 | this.dgBatchSend.MultiSelect = false;
297 | this.dgBatchSend.Name = "dgBatchSend";
298 | this.dgBatchSend.RowHeadersVisible = false;
299 | this.dgBatchSend.RowTemplate.DefaultCellStyle.BackColor = System.Drawing.SystemColors.WindowText;
300 | this.dgBatchSend.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
301 | this.dgBatchSend.RowTemplate.DefaultCellStyle.ForeColor = System.Drawing.Color.LimeGreen;
302 | this.dgBatchSend.RowTemplate.Height = 23;
303 | this.dgBatchSend.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
304 | this.dgBatchSend.Size = new System.Drawing.Size(681, 225);
305 | this.dgBatchSend.TabIndex = 0;
306 | //
307 | // cIndex
308 | //
309 | this.cIndex.DataPropertyName = "序号";
310 | dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
311 | this.cIndex.DefaultCellStyle = dataGridViewCellStyle1;
312 | this.cIndex.HeaderText = "序号";
313 | this.cIndex.Name = "cIndex";
314 | this.cIndex.ReadOnly = true;
315 | this.cIndex.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
316 | this.cIndex.Width = 50;
317 | //
318 | // cSocket
319 | //
320 | this.cSocket.DataPropertyName = "套接字";
321 | dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
322 | this.cSocket.DefaultCellStyle = dataGridViewCellStyle2;
323 | this.cSocket.HeaderText = "套接字";
324 | this.cSocket.Name = "cSocket";
325 | this.cSocket.ReadOnly = true;
326 | this.cSocket.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
327 | this.cSocket.Width = 60;
328 | //
329 | // Column5
330 | //
331 | this.Column5.DataPropertyName = "目的地址";
332 | dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
333 | this.Column5.DefaultCellStyle = dataGridViewCellStyle3;
334 | this.Column5.HeaderText = "目的地址";
335 | this.Column5.Name = "Column5";
336 | this.Column5.ReadOnly = true;
337 | this.Column5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
338 | this.Column5.Width = 150;
339 | //
340 | // cLen
341 | //
342 | this.cLen.DataPropertyName = "长度";
343 | dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
344 | this.cLen.DefaultCellStyle = dataGridViewCellStyle4;
345 | this.cLen.HeaderText = "长度";
346 | this.cLen.Name = "cLen";
347 | this.cLen.ReadOnly = true;
348 | this.cLen.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
349 | this.cLen.Width = 50;
350 | //
351 | // cData
352 | //
353 | this.cData.DataPropertyName = "数据";
354 | this.cData.HeaderText = "数据";
355 | this.cData.Name = "cData";
356 | this.cData.ReadOnly = true;
357 | this.cData.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
358 | this.cData.Width = 340;
359 | //
360 | // bSaveSocket
361 | //
362 | this.bSaveSocket.Location = new System.Drawing.Point(6, 11);
363 | this.bSaveSocket.Name = "bSaveSocket";
364 | this.bSaveSocket.Size = new System.Drawing.Size(120, 29);
365 | this.bSaveSocket.TabIndex = 0;
366 | this.bSaveSocket.Text = "保存此列表数据";
367 | this.bSaveSocket.UseVisualStyleBackColor = true;
368 | this.bSaveSocket.Click += new System.EventHandler(this.bSaveSocket_Click);
369 | //
370 | // groupBox1
371 | //
372 | this.groupBox1.Controls.Add(this.bLoadSocket);
373 | this.groupBox1.Controls.Add(this.bSaveSocket);
374 | this.groupBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
375 | this.groupBox1.Location = new System.Drawing.Point(0, 225);
376 | this.groupBox1.Name = "groupBox1";
377 | this.groupBox1.Size = new System.Drawing.Size(681, 46);
378 | this.groupBox1.TabIndex = 1;
379 | this.groupBox1.TabStop = false;
380 | //
381 | // bLoadSocket
382 | //
383 | this.bLoadSocket.Location = new System.Drawing.Point(144, 11);
384 | this.bLoadSocket.Name = "bLoadSocket";
385 | this.bLoadSocket.Size = new System.Drawing.Size(120, 29);
386 | this.bLoadSocket.TabIndex = 1;
387 | this.bLoadSocket.Text = "加载发送列表";
388 | this.bLoadSocket.UseVisualStyleBackColor = true;
389 | this.bLoadSocket.Click += new System.EventHandler(this.bLoadSocket_Click);
390 | //
391 | // ofdLoadSocket
392 | //
393 | this.ofdLoadSocket.Filter = "封包数据文件(*.txt)|*.txt";
394 | this.ofdLoadSocket.RestoreDirectory = true;
395 | //
396 | // SocketBatchSend_Form
397 | //
398 | this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
399 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
400 | this.ClientSize = new System.Drawing.Size(681, 348);
401 | this.Controls.Add(this.dgBatchSend);
402 | this.Controls.Add(this.groupBox1);
403 | this.Controls.Add(this.gbSend_Bottom);
404 | this.Controls.Add(this.ssSocketBatchSend);
405 | this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
406 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
407 | this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
408 | this.MaximizeBox = false;
409 | this.Name = "SocketBatchSend_Form";
410 | this.Text = "发送列表 by RNShinoa";
411 | this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.SocketBatchSend_Form_FormClosed);
412 | this.Load += new System.EventHandler(this.SocketBatchSend_Form_Load);
413 | this.cmsBatchSend.ResumeLayout(false);
414 | this.ssSocketBatchSend.ResumeLayout(false);
415 | this.ssSocketBatchSend.PerformLayout();
416 | this.gbSend_Bottom.ResumeLayout(false);
417 | this.gbSend_Bottom.PerformLayout();
418 | ((System.ComponentModel.ISupportInitialize)(this.dgBatchSend)).EndInit();
419 | this.groupBox1.ResumeLayout(false);
420 | this.ResumeLayout(false);
421 | this.PerformLayout();
422 |
423 | }
424 |
425 | #endregion
426 |
427 | private System.Windows.Forms.StatusStrip ssSocketBatchSend;
428 | private System.Windows.Forms.ToolStripStatusLabel tlSendBatch;
429 | private System.Windows.Forms.ToolStripStatusLabel tlSendBatch_CNT;
430 | private System.Windows.Forms.ToolStripStatusLabel tlSplit;
431 | private System.Windows.Forms.ToolStripStatusLabel tlSend_Success;
432 | private System.Windows.Forms.ToolStripStatusLabel tlSend_Success_CNT;
433 | private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel3;
434 | private System.Windows.Forms.ToolStripStatusLabel tlSend_Fail;
435 | private System.Windows.Forms.ToolStripStatusLabel tlSend_Fail_CNT;
436 | private System.Windows.Forms.GroupBox gbSend_Bottom;
437 | private System.Windows.Forms.ContextMenuStrip cmsBatchSend;
438 | private System.Windows.Forms.ToolStripMenuItem tsmiDelete;
439 | private System.ComponentModel.BackgroundWorker bgwSendPacket;
440 | private System.Windows.Forms.Timer tSend;
441 | private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
442 | private System.Windows.Forms.ToolStripMenuItem tsmiClear;
443 | private System.Windows.Forms.TextBox txtUseSocket;
444 | private System.Windows.Forms.CheckBox cbUseSocket;
445 | private System.Windows.Forms.Button bSendStop;
446 | private System.Windows.Forms.Button bSend;
447 | private System.Windows.Forms.TextBox txtSend_CNT;
448 | private System.Windows.Forms.TextBox txtSend_Int;
449 | private System.Windows.Forms.Label lSend_Int;
450 | private System.Windows.Forms.Label lSend_CNT;
451 | private System.Windows.Forms.SaveFileDialog sfdSaveSocket;
452 | private System.Windows.Forms.DataGridView dgBatchSend;
453 | private System.Windows.Forms.DataGridViewTextBoxColumn cIndex;
454 | private System.Windows.Forms.DataGridViewTextBoxColumn cSocket;
455 | private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
456 | private System.Windows.Forms.DataGridViewTextBoxColumn cLen;
457 | private System.Windows.Forms.DataGridViewTextBoxColumn cData;
458 | private System.Windows.Forms.Button bSaveSocket;
459 | private System.Windows.Forms.GroupBox groupBox1;
460 | private System.Windows.Forms.Button bLoadSocket;
461 | private System.Windows.Forms.OpenFileDialog ofdLoadSocket;
462 | }
463 | }
--------------------------------------------------------------------------------
/WPELibrary/SocketSend_Form.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WPELibrary
2 | {
3 | partial class SocketSend_Form
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows 窗体设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要修改
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | this.ssSocketSend = new System.Windows.Forms.StatusStrip();
33 | this.tlSendPacket = new System.Windows.Forms.ToolStripStatusLabel();
34 | this.tlSendPacket_CNT = new System.Windows.Forms.ToolStripStatusLabel();
35 | this.tlSplit = new System.Windows.Forms.ToolStripStatusLabel();
36 | this.tlSend_Success = new System.Windows.Forms.ToolStripStatusLabel();
37 | this.tlSend_Success_CNT = new System.Windows.Forms.ToolStripStatusLabel();
38 | this.toolStripStatusLabel3 = new System.Windows.Forms.ToolStripStatusLabel();
39 | this.tlSend_Fail = new System.Windows.Forms.ToolStripStatusLabel();
40 | this.tlSend_Fail_CNT = new System.Windows.Forms.ToolStripStatusLabel();
41 | this.bSendStop = new System.Windows.Forms.Button();
42 | this.bSend = new System.Windows.Forms.Button();
43 | this.gbSend2 = new System.Windows.Forms.GroupBox();
44 | this.txtSend_Port = new System.Windows.Forms.TextBox();
45 | this.lSend_Port = new System.Windows.Forms.Label();
46 | this.txtSend_IP = new System.Windows.Forms.TextBox();
47 | this.lSend_IP = new System.Windows.Forms.Label();
48 | this.gbSend1 = new System.Windows.Forms.GroupBox();
49 | this.txtSend_Len = new System.Windows.Forms.TextBox();
50 | this.lSend_Len = new System.Windows.Forms.Label();
51 | this.txtSend_Socket = new System.Windows.Forms.TextBox();
52 | this.lSend_Socket = new System.Windows.Forms.Label();
53 | this.gbSend_Bottom = new System.Windows.Forms.GroupBox();
54 | this.txtSend_CNT = new System.Windows.Forms.TextBox();
55 | this.txtSend_Int = new System.Windows.Forms.TextBox();
56 | this.lSend_Int = new System.Windows.Forms.Label();
57 | this.lSend_CNT = new System.Windows.Forms.Label();
58 | this.bgwSendPacket = new System.ComponentModel.BackgroundWorker();
59 | this.cmsSocketSend = new System.Windows.Forms.ContextMenuStrip(this.components);
60 | this.tsmiBatchSend = new System.Windows.Forms.ToolStripMenuItem();
61 | this.tSend = new System.Windows.Forms.Timer(this.components);
62 | this.gbStep = new System.Windows.Forms.GroupBox();
63 | this.lStepLen = new System.Windows.Forms.Label();
64 | this.lStepIndex = new System.Windows.Forms.Label();
65 | this.nudStepIndex = new System.Windows.Forms.NumericUpDown();
66 | this.nudStepLen = new System.Windows.Forms.NumericUpDown();
67 | this.label1 = new System.Windows.Forms.Label();
68 | this.cbStep = new System.Windows.Forms.CheckBox();
69 | this.pSend_Top = new System.Windows.Forms.Panel();
70 | this.rtbSocketSend_Data = new System.Windows.Forms.RichTextBox();
71 | this.ssSocketSend.SuspendLayout();
72 | this.gbSend2.SuspendLayout();
73 | this.gbSend1.SuspendLayout();
74 | this.gbSend_Bottom.SuspendLayout();
75 | this.cmsSocketSend.SuspendLayout();
76 | this.gbStep.SuspendLayout();
77 | ((System.ComponentModel.ISupportInitialize)(this.nudStepIndex)).BeginInit();
78 | ((System.ComponentModel.ISupportInitialize)(this.nudStepLen)).BeginInit();
79 | this.pSend_Top.SuspendLayout();
80 | this.SuspendLayout();
81 | //
82 | // ssSocketSend
83 | //
84 | this.ssSocketSend.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
85 | this.tlSendPacket,
86 | this.tlSendPacket_CNT,
87 | this.tlSplit,
88 | this.tlSend_Success,
89 | this.tlSend_Success_CNT,
90 | this.toolStripStatusLabel3,
91 | this.tlSend_Fail,
92 | this.tlSend_Fail_CNT});
93 | this.ssSocketSend.Location = new System.Drawing.Point(0, 208);
94 | this.ssSocketSend.Name = "ssSocketSend";
95 | this.ssSocketSend.Size = new System.Drawing.Size(729, 22);
96 | this.ssSocketSend.SizingGrip = false;
97 | this.ssSocketSend.TabIndex = 7;
98 | //
99 | // tlSendPacket
100 | //
101 | this.tlSendPacket.Name = "tlSendPacket";
102 | this.tlSendPacket.Size = new System.Drawing.Size(47, 17);
103 | this.tlSendPacket.Text = "已发送:";
104 | //
105 | // tlSendPacket_CNT
106 | //
107 | this.tlSendPacket_CNT.Name = "tlSendPacket_CNT";
108 | this.tlSendPacket_CNT.Size = new System.Drawing.Size(15, 17);
109 | this.tlSendPacket_CNT.Text = "0";
110 | //
111 | // tlSplit
112 | //
113 | this.tlSplit.ForeColor = System.Drawing.Color.DarkGray;
114 | this.tlSplit.Name = "tlSplit";
115 | this.tlSplit.Size = new System.Drawing.Size(11, 17);
116 | this.tlSplit.Text = "|";
117 | //
118 | // tlSend_Success
119 | //
120 | this.tlSend_Success.Name = "tlSend_Success";
121 | this.tlSend_Success.Size = new System.Drawing.Size(35, 17);
122 | this.tlSend_Success.Text = "成功:";
123 | //
124 | // tlSend_Success_CNT
125 | //
126 | this.tlSend_Success_CNT.Name = "tlSend_Success_CNT";
127 | this.tlSend_Success_CNT.Size = new System.Drawing.Size(15, 17);
128 | this.tlSend_Success_CNT.Text = "0";
129 | //
130 | // toolStripStatusLabel3
131 | //
132 | this.toolStripStatusLabel3.ForeColor = System.Drawing.Color.DarkGray;
133 | this.toolStripStatusLabel3.Name = "toolStripStatusLabel3";
134 | this.toolStripStatusLabel3.Size = new System.Drawing.Size(11, 17);
135 | this.toolStripStatusLabel3.Text = "|";
136 | //
137 | // tlSend_Fail
138 | //
139 | this.tlSend_Fail.Name = "tlSend_Fail";
140 | this.tlSend_Fail.Size = new System.Drawing.Size(35, 17);
141 | this.tlSend_Fail.Text = "失败:";
142 | //
143 | // tlSend_Fail_CNT
144 | //
145 | this.tlSend_Fail_CNT.Name = "tlSend_Fail_CNT";
146 | this.tlSend_Fail_CNT.Size = new System.Drawing.Size(15, 17);
147 | this.tlSend_Fail_CNT.Text = "0";
148 | //
149 | // bSendStop
150 | //
151 | this.bSendStop.Location = new System.Drawing.Point(661, 176);
152 | this.bSendStop.Name = "bSendStop";
153 | this.bSendStop.Size = new System.Drawing.Size(60, 25);
154 | this.bSendStop.TabIndex = 6;
155 | this.bSendStop.Text = "停止 (&T)";
156 | this.bSendStop.UseVisualStyleBackColor = true;
157 | this.bSendStop.Click += new System.EventHandler(this.bSendStop_Click);
158 | //
159 | // bSend
160 | //
161 | this.bSend.Location = new System.Drawing.Point(661, 143);
162 | this.bSend.Name = "bSend";
163 | this.bSend.Size = new System.Drawing.Size(60, 25);
164 | this.bSend.TabIndex = 5;
165 | this.bSend.Text = "发送 (&F)";
166 | this.bSend.UseVisualStyleBackColor = true;
167 | this.bSend.Click += new System.EventHandler(this.bSend_Click);
168 | //
169 | // gbSend2
170 | //
171 | this.gbSend2.Controls.Add(this.txtSend_Port);
172 | this.gbSend2.Controls.Add(this.lSend_Port);
173 | this.gbSend2.Controls.Add(this.txtSend_IP);
174 | this.gbSend2.Controls.Add(this.lSend_IP);
175 | this.gbSend2.Location = new System.Drawing.Point(146, 131);
176 | this.gbSend2.Name = "gbSend2";
177 | this.gbSend2.Size = new System.Drawing.Size(182, 75);
178 | this.gbSend2.TabIndex = 2;
179 | this.gbSend2.TabStop = false;
180 | //
181 | // txtSend_Port
182 | //
183 | this.txtSend_Port.Location = new System.Drawing.Point(68, 45);
184 | this.txtSend_Port.Name = "txtSend_Port";
185 | this.txtSend_Port.ReadOnly = true;
186 | this.txtSend_Port.Size = new System.Drawing.Size(60, 23);
187 | this.txtSend_Port.TabIndex = 3;
188 | this.txtSend_Port.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
189 | //
190 | // lSend_Port
191 | //
192 | this.lSend_Port.AutoSize = true;
193 | this.lSend_Port.Location = new System.Drawing.Point(6, 48);
194 | this.lSend_Port.Name = "lSend_Port";
195 | this.lSend_Port.Size = new System.Drawing.Size(68, 17);
196 | this.lSend_Port.TabIndex = 1;
197 | this.lSend_Port.Text = "目的端口:";
198 | //
199 | // txtSend_IP
200 | //
201 | this.txtSend_IP.Location = new System.Drawing.Point(68, 16);
202 | this.txtSend_IP.Name = "txtSend_IP";
203 | this.txtSend_IP.ReadOnly = true;
204 | this.txtSend_IP.Size = new System.Drawing.Size(106, 23);
205 | this.txtSend_IP.TabIndex = 2;
206 | this.txtSend_IP.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
207 | //
208 | // lSend_IP
209 | //
210 | this.lSend_IP.AutoSize = true;
211 | this.lSend_IP.Location = new System.Drawing.Point(6, 19);
212 | this.lSend_IP.Name = "lSend_IP";
213 | this.lSend_IP.Size = new System.Drawing.Size(55, 17);
214 | this.lSend_IP.TabIndex = 0;
215 | this.lSend_IP.Text = "目的IP:";
216 | //
217 | // gbSend1
218 | //
219 | this.gbSend1.Controls.Add(this.txtSend_Len);
220 | this.gbSend1.Controls.Add(this.lSend_Len);
221 | this.gbSend1.Controls.Add(this.txtSend_Socket);
222 | this.gbSend1.Controls.Add(this.lSend_Socket);
223 | this.gbSend1.Location = new System.Drawing.Point(6, 131);
224 | this.gbSend1.Name = "gbSend1";
225 | this.gbSend1.Size = new System.Drawing.Size(134, 75);
226 | this.gbSend1.TabIndex = 1;
227 | this.gbSend1.TabStop = false;
228 | //
229 | // txtSend_Len
230 | //
231 | this.txtSend_Len.Location = new System.Drawing.Point(58, 45);
232 | this.txtSend_Len.Name = "txtSend_Len";
233 | this.txtSend_Len.Size = new System.Drawing.Size(50, 23);
234 | this.txtSend_Len.TabIndex = 3;
235 | this.txtSend_Len.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
236 | //
237 | // lSend_Len
238 | //
239 | this.lSend_Len.AutoSize = true;
240 | this.lSend_Len.Location = new System.Drawing.Point(6, 48);
241 | this.lSend_Len.Name = "lSend_Len";
242 | this.lSend_Len.Size = new System.Drawing.Size(44, 17);
243 | this.lSend_Len.TabIndex = 1;
244 | this.lSend_Len.Text = "长度:";
245 | //
246 | // txtSend_Socket
247 | //
248 | this.txtSend_Socket.Location = new System.Drawing.Point(58, 16);
249 | this.txtSend_Socket.Name = "txtSend_Socket";
250 | this.txtSend_Socket.Size = new System.Drawing.Size(68, 23);
251 | this.txtSend_Socket.TabIndex = 2;
252 | this.txtSend_Socket.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
253 | //
254 | // lSend_Socket
255 | //
256 | this.lSend_Socket.AutoSize = true;
257 | this.lSend_Socket.Location = new System.Drawing.Point(6, 19);
258 | this.lSend_Socket.Name = "lSend_Socket";
259 | this.lSend_Socket.Size = new System.Drawing.Size(56, 17);
260 | this.lSend_Socket.TabIndex = 0;
261 | this.lSend_Socket.Text = "套接字:";
262 | //
263 | // gbSend_Bottom
264 | //
265 | this.gbSend_Bottom.Controls.Add(this.txtSend_CNT);
266 | this.gbSend_Bottom.Controls.Add(this.txtSend_Int);
267 | this.gbSend_Bottom.Controls.Add(this.lSend_Int);
268 | this.gbSend_Bottom.Controls.Add(this.lSend_CNT);
269 | this.gbSend_Bottom.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
270 | this.gbSend_Bottom.Location = new System.Drawing.Point(513, 131);
271 | this.gbSend_Bottom.Name = "gbSend_Bottom";
272 | this.gbSend_Bottom.Size = new System.Drawing.Size(137, 75);
273 | this.gbSend_Bottom.TabIndex = 4;
274 | this.gbSend_Bottom.TabStop = false;
275 | //
276 | // txtSend_CNT
277 | //
278 | this.txtSend_CNT.Location = new System.Drawing.Point(77, 16);
279 | this.txtSend_CNT.Name = "txtSend_CNT";
280 | this.txtSend_CNT.Size = new System.Drawing.Size(50, 23);
281 | this.txtSend_CNT.TabIndex = 2;
282 | this.txtSend_CNT.Text = "1";
283 | this.txtSend_CNT.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
284 | //
285 | // txtSend_Int
286 | //
287 | this.txtSend_Int.Location = new System.Drawing.Point(77, 45);
288 | this.txtSend_Int.Name = "txtSend_Int";
289 | this.txtSend_Int.Size = new System.Drawing.Size(50, 23);
290 | this.txtSend_Int.TabIndex = 3;
291 | this.txtSend_Int.Text = "1000";
292 | this.txtSend_Int.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
293 | //
294 | // lSend_Int
295 | //
296 | this.lSend_Int.AutoSize = true;
297 | this.lSend_Int.Location = new System.Drawing.Point(7, 48);
298 | this.lSend_Int.Name = "lSend_Int";
299 | this.lSend_Int.Size = new System.Drawing.Size(67, 17);
300 | this.lSend_Int.TabIndex = 1;
301 | this.lSend_Int.Text = "间隔(毫秒):";
302 | //
303 | // lSend_CNT
304 | //
305 | this.lSend_CNT.AutoSize = true;
306 | this.lSend_CNT.Location = new System.Drawing.Point(7, 18);
307 | this.lSend_CNT.Name = "lSend_CNT";
308 | this.lSend_CNT.Size = new System.Drawing.Size(68, 17);
309 | this.lSend_CNT.TabIndex = 0;
310 | this.lSend_CNT.Text = "发送次数:";
311 | //
312 | // bgwSendPacket
313 | //
314 | this.bgwSendPacket.WorkerSupportsCancellation = true;
315 | this.bgwSendPacket.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bgwSendPacket_DoWork);
316 | //
317 | // cmsSocketSend
318 | //
319 | this.cmsSocketSend.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
320 | this.tsmiBatchSend});
321 | this.cmsSocketSend.Name = "cmsSocketSend";
322 | this.cmsSocketSend.Size = new System.Drawing.Size(161, 26);
323 | this.cmsSocketSend.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.cmsSocketSend_ItemClicked);
324 | //
325 | // tsmiBatchSend
326 | //
327 | this.tsmiBatchSend.Name = "tsmiBatchSend";
328 | this.tsmiBatchSend.Size = new System.Drawing.Size(160, 22);
329 | this.tsmiBatchSend.Text = "添加到发送列表";
330 | //
331 | // tSend
332 | //
333 | this.tSend.Enabled = true;
334 | this.tSend.Interval = 1000;
335 | this.tSend.Tick += new System.EventHandler(this.tSend_Tick);
336 | //
337 | // gbStep
338 | //
339 | this.gbStep.Controls.Add(this.lStepLen);
340 | this.gbStep.Controls.Add(this.lStepIndex);
341 | this.gbStep.Controls.Add(this.nudStepIndex);
342 | this.gbStep.Controls.Add(this.nudStepLen);
343 | this.gbStep.Controls.Add(this.label1);
344 | this.gbStep.Controls.Add(this.cbStep);
345 | this.gbStep.Location = new System.Drawing.Point(335, 131);
346 | this.gbStep.Name = "gbStep";
347 | this.gbStep.Size = new System.Drawing.Size(171, 75);
348 | this.gbStep.TabIndex = 3;
349 | this.gbStep.TabStop = false;
350 | //
351 | // lStepLen
352 | //
353 | this.lStepLen.AutoSize = true;
354 | this.lStepLen.Location = new System.Drawing.Point(145, 48);
355 | this.lStepLen.Name = "lStepLen";
356 | this.lStepLen.Size = new System.Drawing.Size(14, 17);
357 | this.lStepLen.TabIndex = 5;
358 | this.lStepLen.Text = "?";
359 | //
360 | // lStepIndex
361 | //
362 | this.lStepIndex.AutoSize = true;
363 | this.lStepIndex.Location = new System.Drawing.Point(145, 17);
364 | this.lStepIndex.Name = "lStepIndex";
365 | this.lStepIndex.Size = new System.Drawing.Size(14, 17);
366 | this.lStepIndex.TabIndex = 4;
367 | this.lStepIndex.Text = "?";
368 | //
369 | // nudStepIndex
370 | //
371 | this.nudStepIndex.Location = new System.Drawing.Point(87, 15);
372 | this.nudStepIndex.Minimum = new decimal(new int[] {
373 | 1,
374 | 0,
375 | 0,
376 | 0});
377 | this.nudStepIndex.Name = "nudStepIndex";
378 | this.nudStepIndex.Size = new System.Drawing.Size(52, 23);
379 | this.nudStepIndex.TabIndex = 2;
380 | this.nudStepIndex.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
381 | this.nudStepIndex.Value = new decimal(new int[] {
382 | 1,
383 | 0,
384 | 0,
385 | 0});
386 | this.nudStepIndex.ValueChanged += new System.EventHandler(this.nudStepIndex_ValueChanged);
387 | //
388 | // nudStepLen
389 | //
390 | this.nudStepLen.Location = new System.Drawing.Point(87, 46);
391 | this.nudStepLen.Minimum = new decimal(new int[] {
392 | 1,
393 | 0,
394 | 0,
395 | 0});
396 | this.nudStepLen.Name = "nudStepLen";
397 | this.nudStepLen.Size = new System.Drawing.Size(52, 23);
398 | this.nudStepLen.TabIndex = 3;
399 | this.nudStepLen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
400 | this.nudStepLen.Value = new decimal(new int[] {
401 | 1,
402 | 0,
403 | 0,
404 | 0});
405 | this.nudStepLen.ValueChanged += new System.EventHandler(this.nudStepLen_ValueChanged);
406 | //
407 | // label1
408 | //
409 | this.label1.AutoSize = true;
410 | this.label1.Location = new System.Drawing.Point(23, 48);
411 | this.label1.Name = "label1";
412 | this.label1.Size = new System.Drawing.Size(68, 17);
413 | this.label1.TabIndex = 1;
414 | this.label1.Text = "每次步长:";
415 | //
416 | // cbStep
417 | //
418 | this.cbStep.AutoSize = true;
419 | this.cbStep.Location = new System.Drawing.Point(7, 16);
420 | this.cbStep.Name = "cbStep";
421 | this.cbStep.Size = new System.Drawing.Size(87, 21);
422 | this.cbStep.TabIndex = 0;
423 | this.cbStep.Text = "递进位置:";
424 | this.cbStep.UseVisualStyleBackColor = true;
425 | //
426 | // pSend_Top
427 | //
428 | this.pSend_Top.Controls.Add(this.rtbSocketSend_Data);
429 | this.pSend_Top.Dock = System.Windows.Forms.DockStyle.Top;
430 | this.pSend_Top.Location = new System.Drawing.Point(0, 0);
431 | this.pSend_Top.Name = "pSend_Top";
432 | this.pSend_Top.Padding = new System.Windows.Forms.Padding(3);
433 | this.pSend_Top.Size = new System.Drawing.Size(729, 136);
434 | this.pSend_Top.TabIndex = 0;
435 | //
436 | // rtbSocketSend_Data
437 | //
438 | this.rtbSocketSend_Data.ContextMenuStrip = this.cmsSocketSend;
439 | this.rtbSocketSend_Data.Dock = System.Windows.Forms.DockStyle.Fill;
440 | this.rtbSocketSend_Data.Location = new System.Drawing.Point(3, 3);
441 | this.rtbSocketSend_Data.Name = "rtbSocketSend_Data";
442 | this.rtbSocketSend_Data.Size = new System.Drawing.Size(723, 130);
443 | this.rtbSocketSend_Data.TabIndex = 0;
444 | this.rtbSocketSend_Data.Text = "";
445 | //
446 | // SocketSend_Form
447 | //
448 | this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
449 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
450 | this.ClientSize = new System.Drawing.Size(729, 230);
451 | this.Controls.Add(this.pSend_Top);
452 | this.Controls.Add(this.gbStep);
453 | this.Controls.Add(this.bSendStop);
454 | this.Controls.Add(this.bSend);
455 | this.Controls.Add(this.gbSend2);
456 | this.Controls.Add(this.gbSend1);
457 | this.Controls.Add(this.gbSend_Bottom);
458 | this.Controls.Add(this.ssSocketSend);
459 | this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
460 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
461 | this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
462 | this.MaximizeBox = false;
463 | this.Name = "SocketSend_Form";
464 | this.Text = "发送封包 by RNShinoa";
465 | this.Load += new System.EventHandler(this.SocketSend_Form_Load);
466 | this.ssSocketSend.ResumeLayout(false);
467 | this.ssSocketSend.PerformLayout();
468 | this.gbSend2.ResumeLayout(false);
469 | this.gbSend2.PerformLayout();
470 | this.gbSend1.ResumeLayout(false);
471 | this.gbSend1.PerformLayout();
472 | this.gbSend_Bottom.ResumeLayout(false);
473 | this.gbSend_Bottom.PerformLayout();
474 | this.cmsSocketSend.ResumeLayout(false);
475 | this.gbStep.ResumeLayout(false);
476 | this.gbStep.PerformLayout();
477 | ((System.ComponentModel.ISupportInitialize)(this.nudStepIndex)).EndInit();
478 | ((System.ComponentModel.ISupportInitialize)(this.nudStepLen)).EndInit();
479 | this.pSend_Top.ResumeLayout(false);
480 | this.ResumeLayout(false);
481 | this.PerformLayout();
482 |
483 | }
484 |
485 | #endregion
486 |
487 | private System.Windows.Forms.StatusStrip ssSocketSend;
488 | private System.Windows.Forms.Button bSendStop;
489 | private System.Windows.Forms.Button bSend;
490 | private System.Windows.Forms.GroupBox gbSend2;
491 | private System.Windows.Forms.TextBox txtSend_Port;
492 | private System.Windows.Forms.Label lSend_Port;
493 | private System.Windows.Forms.TextBox txtSend_IP;
494 | private System.Windows.Forms.Label lSend_IP;
495 | private System.Windows.Forms.GroupBox gbSend1;
496 | private System.Windows.Forms.TextBox txtSend_Len;
497 | private System.Windows.Forms.Label lSend_Len;
498 | private System.Windows.Forms.TextBox txtSend_Socket;
499 | private System.Windows.Forms.Label lSend_Socket;
500 | private System.Windows.Forms.GroupBox gbSend_Bottom;
501 | private System.Windows.Forms.TextBox txtSend_Int;
502 | private System.Windows.Forms.Label lSend_Int;
503 | private System.Windows.Forms.Label lSend_CNT;
504 | private System.Windows.Forms.ToolStripStatusLabel tlSendPacket;
505 | private System.Windows.Forms.ToolStripStatusLabel tlSendPacket_CNT;
506 | private System.ComponentModel.BackgroundWorker bgwSendPacket;
507 | private System.Windows.Forms.Timer tSend;
508 | private System.Windows.Forms.ToolStripStatusLabel tlSplit;
509 | private System.Windows.Forms.ToolStripStatusLabel tlSend_Success;
510 | private System.Windows.Forms.ToolStripStatusLabel tlSend_Success_CNT;
511 | private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel3;
512 | private System.Windows.Forms.ToolStripStatusLabel tlSend_Fail;
513 | private System.Windows.Forms.ToolStripStatusLabel tlSend_Fail_CNT;
514 | private System.Windows.Forms.TextBox txtSend_CNT;
515 | private System.Windows.Forms.ContextMenuStrip cmsSocketSend;
516 | private System.Windows.Forms.ToolStripMenuItem tsmiBatchSend;
517 | private System.Windows.Forms.GroupBox gbStep;
518 | private System.Windows.Forms.NumericUpDown nudStepLen;
519 | private System.Windows.Forms.Label label1;
520 | private System.Windows.Forms.CheckBox cbStep;
521 | private System.Windows.Forms.Panel pSend_Top;
522 | private System.Windows.Forms.RichTextBox rtbSocketSend_Data;
523 | private System.Windows.Forms.Label lStepIndex;
524 | private System.Windows.Forms.NumericUpDown nudStepIndex;
525 | private System.Windows.Forms.Label lStepLen;
526 | }
527 | }
--------------------------------------------------------------------------------