[Proto] Update source file (#535)
This commit is contained in:
parent
0dbb2c8706
commit
29e6d2afff
@ -88,7 +88,7 @@ namespace Components
|
|||||||
const auto signedMsg = Utils::Cryptography::ECC::SignMessage(key, data);
|
const auto signedMsg = Utils::Cryptography::ECC::SignMessage(key, data);
|
||||||
|
|
||||||
Proto::RCon::Command rconExec;
|
Proto::RCon::Command rconExec;
|
||||||
rconExec.set_commands(RconContainer.command);
|
rconExec.set_command(RconContainer.command);
|
||||||
rconExec.set_signature(signedMsg);
|
rconExec.set_signature(signedMsg);
|
||||||
|
|
||||||
Network::SendCommand(address, "rconExecute", rconExec.SerializeAsString());
|
Network::SendCommand(address, "rconExecute", rconExec.SerializeAsString());
|
||||||
@ -199,10 +199,10 @@ namespace Components
|
|||||||
|
|
||||||
RconContainer.timestamp = 0;
|
RconContainer.timestamp = 0;
|
||||||
|
|
||||||
Proto::RCon::Command command;
|
Proto::RCon::Command rconExec;
|
||||||
command.ParseFromString(data);
|
rconExec.ParseFromString(data);
|
||||||
|
|
||||||
if (!Utils::Cryptography::ECC::VerifyMessage(RconKey, RconContainer.challenge, command.signature()))
|
if (!Utils::Cryptography::ECC::VerifyMessage(RconKey, RconContainer.challenge, rconExec.signature()))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -213,7 +213,7 @@ namespace Components
|
|||||||
RconContainer.output.append(output);
|
RconContainer.output.append(output);
|
||||||
});
|
});
|
||||||
|
|
||||||
Command::Execute(command.commands(), true);
|
Command::Execute(rconExec.command(), true);
|
||||||
|
|
||||||
Logger::PipeOutput(nullptr);
|
Logger::PipeOutput(nullptr);
|
||||||
|
|
||||||
|
@ -4,6 +4,6 @@ package Proto.RCon;
|
|||||||
|
|
||||||
message Command
|
message Command
|
||||||
{
|
{
|
||||||
bytes commands = 1;
|
bytes command = 1;
|
||||||
bytes signature = 2;
|
bytes signature = 2;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user