2023-09-18 17:15:30 +01:00
|
|
|
|
using Common.Models.Input;
|
2024-11-03 23:29:50 -08:00
|
|
|
|
using Common.Models.Output;
|
2023-09-18 17:15:30 +01:00
|
|
|
|
using Generator.Helpers;
|
2024-11-03 23:29:50 -08:00
|
|
|
|
using System.Diagnostics;
|
2023-08-21 16:32:20 +01:00
|
|
|
|
|
|
|
|
|
namespace Generator;
|
2021-08-12 16:52:06 +01:00
|
|
|
|
|
2021-11-26 14:50:07 +00:00
|
|
|
|
internal static class Program
|
2021-08-12 16:52:06 +01:00
|
|
|
|
{
|
2021-11-26 14:50:07 +00:00
|
|
|
|
internal static async Task Main(string[] args)
|
2021-08-12 16:52:06 +01:00
|
|
|
|
{
|
2024-11-03 23:29:50 -08:00
|
|
|
|
var stopwatch = Stopwatch.StartNew();
|
|
|
|
|
LoggingHelpers.LogToConsole("Started processing bots");
|
|
|
|
|
|
2021-11-26 14:50:07 +00:00
|
|
|
|
// Create list of bots we want to process
|
|
|
|
|
string[] botTypes = {
|
2023-08-15 09:29:16 +00:00
|
|
|
|
"assault",
|
2024-05-15 11:39:36 +01:00
|
|
|
|
"assaultgroup",
|
2024-02-21 17:06:08 +00:00
|
|
|
|
"marksman",
|
|
|
|
|
"pmcbot",
|
|
|
|
|
"exusec",
|
2023-12-28 09:12:54 +00:00
|
|
|
|
|
2024-02-21 17:06:08 +00:00
|
|
|
|
"bossbully",
|
|
|
|
|
"bossgluhar",
|
|
|
|
|
"bosskilla",
|
|
|
|
|
"bosskojaniy",
|
|
|
|
|
"bosssanitar",
|
|
|
|
|
"bosstagilla",
|
|
|
|
|
"bossknight",
|
|
|
|
|
"bosszryachiy",
|
|
|
|
|
"bossboar",
|
|
|
|
|
"bossboarsniper",
|
|
|
|
|
"bosskolontay",
|
2024-08-21 11:51:27 +01:00
|
|
|
|
"bosspartisan",
|
2023-10-31 19:35:32 +00:00
|
|
|
|
|
2024-02-21 17:06:08 +00:00
|
|
|
|
"followerbully",
|
|
|
|
|
"followergluharassault",
|
|
|
|
|
"followergluharscout",
|
|
|
|
|
"followergluharsecurity",
|
|
|
|
|
"followergluharsnipe",
|
|
|
|
|
"followerkojaniy",
|
|
|
|
|
"followersanitar",
|
|
|
|
|
"followerstormtrooper",
|
|
|
|
|
"followerbirdeye",
|
|
|
|
|
"followerbigpipe",
|
2023-08-15 09:29:16 +00:00
|
|
|
|
"followerzryachiy",
|
|
|
|
|
"followerboar",
|
2023-12-28 09:12:54 +00:00
|
|
|
|
"followerboarclose1",
|
|
|
|
|
"followerboarclose2",
|
|
|
|
|
"followerkolontayassault",
|
|
|
|
|
"followerkolontaysecurity",
|
2023-10-31 19:35:32 +00:00
|
|
|
|
|
2024-02-21 17:06:08 +00:00
|
|
|
|
"ravangezryachiyevent",
|
|
|
|
|
"peacefullzryachiyevent",
|
|
|
|
|
"cursedassault",
|
|
|
|
|
"sectantpriest",
|
|
|
|
|
"sectantwarrior",
|
|
|
|
|
"gifter",
|
|
|
|
|
"arenafighterevent",
|
|
|
|
|
"crazyassaultevent",
|
2024-01-01 20:29:58 +00:00
|
|
|
|
|
2024-04-04 11:06:52 +01:00
|
|
|
|
"shooterbtr",
|
|
|
|
|
|
|
|
|
|
"spiritspring",
|
2024-05-15 11:39:36 +01:00
|
|
|
|
"spiritwinter",
|
|
|
|
|
|
|
|
|
|
"skier",
|
2024-11-03 17:57:31 -08:00
|
|
|
|
"peacemaker",
|
|
|
|
|
|
|
|
|
|
"infectedassault",
|
|
|
|
|
"infectedpmc",
|
|
|
|
|
"infectedcivil",
|
|
|
|
|
"infectedlaborant",
|
|
|
|
|
"infectedtagilla",
|
2023-10-31 19:35:32 +00:00
|
|
|
|
};
|
2021-08-12 16:52:06 +01:00
|
|
|
|
|
2021-11-26 14:50:07 +00:00
|
|
|
|
// Read raw bot dumps and turn into c# objects
|
|
|
|
|
var workingPath = Directory.GetCurrentDirectory();
|
|
|
|
|
var dumpPath = $"{workingPath}//dumps";
|
2024-11-03 23:29:50 -08:00
|
|
|
|
List<Bot> bots = BotParser.Parse(dumpPath, botTypes.ToHashSet());
|
2023-10-31 19:35:32 +00:00
|
|
|
|
|
2024-11-03 23:29:50 -08:00
|
|
|
|
if (bots.Count == 0)
|
2021-11-26 14:50:07 +00:00
|
|
|
|
{
|
2023-10-31 19:35:32 +00:00
|
|
|
|
LoggingHelpers.LogToConsole("No bots found, unable to continue");
|
2023-08-15 09:29:16 +00:00
|
|
|
|
LoggingHelpers.LogToConsole("Check your dumps are in 'Generator\\bin\\Debug\\net6.0\\dumps' and start with 'resp.' NOT 'req.'");
|
2021-11-26 14:50:07 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
2021-08-12 22:26:25 +01:00
|
|
|
|
|
2021-11-26 14:50:07 +00:00
|
|
|
|
var jsonWriter = new JsonWriter(workingPath, "output");
|
2024-11-03 23:29:50 -08:00
|
|
|
|
jsonWriter.WriteJson(bots);
|
|
|
|
|
|
|
|
|
|
stopwatch.Stop();
|
|
|
|
|
LoggingHelpers.LogToConsole($"Finished processing bots. Took {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds");
|
2021-08-12 16:52:06 +01:00
|
|
|
|
}
|
|
|
|
|
}
|