pcap path "not hardcoded" anymore

This commit is contained in:
raphaeIl
2025-01-14 08:00:26 -05:00
parent 2ac86f80b6
commit 7bd937dac5
7 changed files with 19119 additions and 18 deletions

View File

@@ -21,7 +21,7 @@ namespace Novaria.Common.Core
}
packetWriter.Write(msgIdBytes.AsSpan<byte>());
packetWriter.Write(packet.msgBody.AsSpan<byte>());
packetWriter.Write(packet.msgBody.AsSpan<byte>());
byte[] packetData = ((MemoryStream)packetWriter.BaseStream).ToArray();
@@ -262,6 +262,8 @@ namespace Novaria.Common.Core
msgBody = decrypted_bytes[2..],
};
Utils.PrintByteArray(decrypted_bytes);
IKEReq ike_request = IKEReq.Parser.ParseFrom(packet.msgBody);
return ike_request;

View File

@@ -8,6 +8,7 @@ using Novaria.Common.Util;
//using Mono.Security.Cryptography;
using NSec.Cryptography;
using Serilog;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace Novaria.Common.Crypto
@@ -46,15 +47,20 @@ namespace Novaria.Common.Crypto
FIRST_IKE_KEY = new byte[] { 51, 76, 83, 57, 38, 111, 89, 100, 115, 112, 94, 53, 119, 105, 56, 38, 90, 120, 67, 35, 99, 55, 77, 90, 103, 55, 51, 104, 98, 69, 68, 119 };
if (clientType == ClientType.Mobile)
{
FIRST_IKE_KEY = Encoding.ASCII.GetBytes("3LS9&oYdsp^5wi8&ZxC#c7MZg73hbEDw");
}
//if (clientType == ClientType.Mobile)
//{
// FIRST_IKE_KEY = Encoding.ASCII.GetBytes("3LS9&oYdsp^5wi8&ZxC#c7MZg73hbEDw");
// Log.Information("Mobile Client Type with key:");
// Utils.PrintByteArray(FIRST_IKE_KEY);
//}
else
{
FIRST_IKE_KEY = Encoding.ASCII.GetBytes("#$*;1H&x*)0!@,/OcIe4VbiL[~fLyE7t");
}
//else
//{
// FIRST_IKE_KEY = Encoding.ASCII.GetBytes("#$*;1H&x*)0!@,/OcIe4VbiL[~fLyE7t");
// Log.Information("PC Client Type with key:");
// Utils.PrintByteArray(FIRST_IKE_KEY);
//}
FIRST_IKE_KEY = Encoding.ASCII.GetBytes("3LS9&oYdsp^5wi8&ZxC#c7MZg73hbEDw");
associatedData = new byte[13];