fix dh (by plagiarism), refactor pcapparser

This commit is contained in:
raphaeIl
2025-01-16 14:13:15 -05:00
parent fe508d14d1
commit f269800704
26 changed files with 92455 additions and 42630 deletions

View File

@@ -19,6 +19,29 @@ namespace Novaria.PcapParser
public int totalPacketsCount = 0;
public List<NovaPacket> packets = new List<NovaPacket>();
public void LoadAllPackets()
{
byte[] real_key = AeadTool.key3;
ClientType real_client_type = AeadTool.clientType;
// load from pcap
AeadTool.clientType = ClientType.Mobile; // my pcap were from mobile so gotta switch it over
AeadTool.InitAeadTool();
// these are all the packets i have, should've done more but ran out of time :/
PcapParser.Instance.Parse("all_mainmenu_packets.json");
PcapParser.Instance.Parse("accidently_too_many.json");
PcapParser.Instance.Parse("create_acc_packets.json");
PcapParser.Instance.Parse("first_instant_join.json");
PcapParser.Instance.Parse("full_everything.json");
PcapParser.Instance.Parse("lvl30_tutorials.json");
// after pcap parse switch it back
AeadTool.clientType = real_client_type;
AeadTool.InitAeadTool();
AeadTool.key3 = real_key;
}
public void Parse(string pcapFileName, bool auto_key = true)
{
string pcapJsonFile = File.ReadAllText($"../../../../Novaria.PcapParser/{pcapFileName}"); // disgusting pathing, but "not hardcoded" now ig

View File

@@ -4,9 +4,9 @@
{
public static void Main(string[] args)
{
PcapParser.Instance.Parse("all_mainmenu_packets.json");
PcapParser.Instance.LoadAllPackets();
PcapParser.Instance.SavePackets("parsed_packets.json");
PcapParser.Instance.SavePackets("all_parsed_packets.json");
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff