///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
| 364 | |
| 365 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 366 | json FSecure::C3::Core::Profiler::HandleNewBuildMessage(json const& message) |
| 367 | { |
| 368 | auto newBuildId = message.at("BuildId").get<BuildId::UnderlyingIntegerType>(); |
| 369 | auto const& command = message.at("Command"); |
| 370 | auto commandBinary = TranslateStartupCommand(command); |
| 371 | auto response = json |
| 372 | { |
| 373 | {"BinaryCommand", base64::encode(commandBinary)}, |
| 374 | }; |
| 375 | { |
| 376 | // Add build to profiler |
| 377 | auto arch = message.at("Arch").get<std::string>(); |
| 378 | std::transform(arch.begin(), arch.end(), arch.begin(), [](char c) { return std::tolower(c); }); |
| 379 | auto isX64 = arch == "x64"; |
| 380 | Get().m_Gateway.AddAgentBuild(newBuildId, { isX64, false, command }); |
| 381 | } |
| 382 | |
| 383 | return response; |
| 384 | } |
| 385 | |
| 386 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 387 | json FSecure::C3::Core::Profiler::Gateway::CreateProfileSnapshot() const |
no test coverage detected