mirror of
https://github.com/raphaeIl/Novaria.git
synced 2026-02-04 08:45:07 +01:00
fix dh (by plagiarism), refactor pcapparser
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
87884
Novaria.PcapParser/all_parsed_packets.json
Normal file
87884
Novaria.PcapParser/all_parsed_packets.json
Normal file
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
Reference in New Issue
Block a user