Skip to content

Commit ffe29e8

Browse files
committed
v1.0.0.9
0 parents  commit ffe29e8

44 files changed

Lines changed: 16422 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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

ProcessInjector/App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
5+
</startup>
6+
</configuration>

ProcessInjector/ComputerInfo.cs

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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+
/// <summary>
13+
/// 获取 cpu 序列号
14+
/// </summary>
15+
/// <returns></returns>
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+
}

ProcessInjector/EasyHook32.dll

263 KB
Binary file not shown.

ProcessInjector/EasyHook32Svc.exe

8 KB
Binary file not shown.

ProcessInjector/EasyHook64.dll

303 KB
Binary file not shown.

ProcessInjector/EasyHook64Svc.exe

8 KB
Binary file not shown.

ProcessInjector/EasyLoad32.dll

7.5 KB
Binary file not shown.

ProcessInjector/EasyLoad64.dll

7.5 KB
Binary file not shown.

ProcessInjector/Injector_Form.Designer.cs

Lines changed: 152 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)