Skip to content

Commit

Permalink
1.0.0.30
Browse files Browse the repository at this point in the history
  • Loading branch information
x-nas committed May 14, 2024
1 parent 47689f3 commit 956e82e
Show file tree
Hide file tree
Showing 24 changed files with 2,339 additions and 2,158 deletions.
2 changes: 1 addition & 1 deletion ProcessInjector/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
[assembly: AssemblyVersion("1.0.0.29")]
[assembly: AssemblyVersion("1.0.0.30")]
//[assembly: AssemblyVersion("1.0.0.21")]
//[assembly: AssemblyFileVersion("1.0.0.21")]
2 changes: 1 addition & 1 deletion ProcessInjector/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 5 additions & 8 deletions WPELibrary/Lib/MultiLanguage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public static class MultiLanguage
public static string[] MutiLan_14 = { "请选择要注入的应用程序", "Please select the program to inject" };
public static string[] MutiLan_15 = { "应用程序|*.exe|所有文件|*.*", "Program|*.exe|All Files|*.*" };
public static string[] MutiLan_16 = { "滤镜 -【 序号", "Filter -【 ID" };
public static string[] MutiLan_17 = { "搜索封包", "SEARCH" };
public static string[] MutiLan_18 = { "修改封包", "MODIFY" };
public static string[] MutiLan_17 = { "第1行:搜索内容", "First Row: Search" };
public static string[] MutiLan_18 = { "第2行:修改内容", "Second Row: Modify" };
public static string[] MutiLan_19 = { "滤镜名称不能为空", "Filter name cannot be empty" };
public static string[] MutiLan_20 = { "目标进程:", "Process: " };
public static string[] MutiLan_21 = { "初始化数据表完成", "Initializing data table completed" };
Expand All @@ -52,7 +52,7 @@ public static class MultiLanguage
public static string[] MutiLan_40 = { "请输入搜索内容", "Please enter search content" };
public static string[] MutiLan_41 = { "搜索完成!", "Search completed!" };
public static string[] MutiLan_42 = { "发送封包 -【 序号", "Send -【 ID" };
public static string[] MutiLan_43 = { "封包数据", "Data" };
public static string[] MutiLan_43 = { "", "" };
public static string[] MutiLan_44 = { "请正确设置递进位置", "Please set the progressive position correctly" };
public static string[] MutiLan_45 = { "套接字设置错误", "Socket setting error" };
public static string[] MutiLan_46 = { "封包数据错误", "Packet data error" };
Expand Down Expand Up @@ -103,14 +103,11 @@ public static void SetDefaultLanguage(string lang)
try
{
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(lang);
MultiLanguage.DefaultLanguage = lang;

Properties.Settings.Default.DefaultLanguage = lang;
Properties.Settings.Default.Save();
MultiLanguage.DefaultLanguage = lang;
}
catch (Exception ex)
{
Socket_Operation.DoLog(MethodBase.GetCurrentMethod().Name, ex.Message);
Socket_Operation.DoLog(MethodBase.GetCurrentMethod().Name, ex.Message);
}
}
#endregion
Expand Down
109 changes: 51 additions & 58 deletions WPELibrary/Lib/Socket_Cache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public static class Socket_Cache
public static class SocketQueue
{
public static int Interecept_CNT = 0;
public static int Filter_CNT = 0;
public static int Recv_CNT = 0;
public static int Send_CNT = 0;

Expand Down Expand Up @@ -66,6 +67,7 @@ public static void ResetSocketQueue()
try
{
Interecept_CNT = 0;
Filter_CNT = 0;
Recv_CNT = 0;
Send_CNT = 0;

Expand Down Expand Up @@ -97,85 +99,76 @@ public static void SocketToList(int iMax_DataLen)
{
Socket_Packet sa = SocketQueue.qSocket_Packet.Dequeue();

bool bCheck = Socket_Operation.ISShow_SocketInfo(sa);
int iIndex = lstRecPacket.Count + 1;
Socket_Packet.SocketType sType = sa.Type;
int iSocket = sa.Socket;
int iResLen = sa.ResLen;
byte[] bBuffer = sa.Buffer;

if (bCheck)
{
int iIndex = lstRecPacket.Count + 1;
Socket_Packet.SocketType sType = sa.Type;
int iSocket = sa.Socket;
int iResLen = sa.ResLen;
byte[] bBuffer = sa.Buffer;

string sData = "";

if (iResLen > iMax_DataLen)
{
byte[] bTemp = new byte[iMax_DataLen];
string sData = "";

for (int j = 0; j < iMax_DataLen; j++)
{
bTemp[j] = bBuffer[j];
}
if (iResLen > iMax_DataLen)
{
byte[] bTemp = new byte[iMax_DataLen];

sData = Socket_Operation.Byte_To_Hex(bTemp) + " ...";
}
else
for (int j = 0; j < iMax_DataLen; j++)
{
sData = Socket_Operation.Byte_To_Hex(bBuffer);
bTemp[j] = bBuffer[j];
}

Socket_Packet.sockaddr sAddr = sa.Addr;
sData = Socket_Operation.ByteToString("HEX", bTemp) + " ...";
}
else
{
sData = Socket_Operation.ByteToString("HEX", bBuffer);
}

string sIP_From = "", sIP_To = "";
Socket_Packet.sockaddr sAddr = sa.Addr;

switch (sType)
{
case Socket_Packet.SocketType.Recv:
string sIP_From = "", sIP_To = "";

sIP_From = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.To);
sIP_To = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.From);
switch (sType)
{
case Socket_Packet.SocketType.Recv:

break;
case Socket_Packet.SocketType.WSARecv:
sIP_From = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.To);
sIP_To = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.From);

sIP_From = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.To);
sIP_To = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.From);
break;
case Socket_Packet.SocketType.WSARecv:

break;
case Socket_Packet.SocketType.Send:
sIP_From = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.To);
sIP_To = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.From);

sIP_From = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.From);
sIP_To = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.To);
break;
case Socket_Packet.SocketType.Send:

break;
case Socket_Packet.SocketType.WSASend:
sIP_From = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.From);
sIP_To = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.To);

sIP_From = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.From);
sIP_To = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.To);
break;
case Socket_Packet.SocketType.WSASend:

break;
case Socket_Packet.SocketType.SendTo:
sIP_From = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.From);
sIP_To = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.To);

sIP_From = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.From);
sIP_To = Socket_Operation.GetSocketIP(sAddr.sin_addr, sAddr.sin_port);
break;
case Socket_Packet.SocketType.SendTo:

break;
case Socket_Packet.SocketType.RecvFrom:
sIP_From = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.From);
sIP_To = Socket_Operation.GetSocketIP(sAddr.sin_addr, sAddr.sin_port);

sIP_From = Socket_Operation.GetSocketIP(sAddr.sin_addr, sAddr.sin_port);
sIP_To = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.From);
break;
case Socket_Packet.SocketType.RecvFrom:

break;
}
sIP_From = Socket_Operation.GetSocketIP(sAddr.sin_addr, sAddr.sin_port);
sIP_To = Socket_Operation.GetSocketIP(iSocket, Socket_Packet.IPType.From);

Socket_Packet_Info spi = new Socket_Packet_Info(iIndex, sType, iSocket, sIP_From, sIP_To, iResLen, sData, bBuffer);
RecSocketPacket?.Invoke(spi);
}
else
{
Socket_Operation.CheckCNT++;
break;
}

Socket_Packet_Info spi = new Socket_Packet_Info(iIndex, sType, iSocket, sIP_From, sIP_To, iResLen, sData, bBuffer);
RecSocketPacket?.Invoke(spi);
}
}
catch (Exception ex)
Expand Down Expand Up @@ -276,7 +269,7 @@ public static class SocketFilterList
{
public static int SearchRowIndex = 0;
public static int ModifyRowIndex = 1;
public static int FilterLen_MAX = 500;
public static int FilterLen_MAX = 100;
public static BindingList<Socket_Filter_Info> lstFilter = new BindingList<Socket_Filter_Info>();

#region//初始化滤镜列表
Expand Down
Loading

0 comments on commit 956e82e

Please sign in to comment.