Hello! I'm developing a website with a web panel to control matches. We are planning replicating eBot panel in our site with the same functionalities but restricted only to user owned servers.
The thing is, we have exhaustively read the "Full documentation on eBot" Found here: https://github.com/deStrO/eBot-CSGO/wiki/Full-documentation. In the bottom part it explains how to send commands through UDP directly to eBot.
We are having issues sending the commands, and we don't know if the encryption part is wrong, or the sending, etc.
If anyone of you knows about this or has already set a connection with UDP with eBot, we would really appreciate your help!
What we have:
-AuthKey for each match
-Id of each match on ebot side
-$event, which I think is the commands (stopNoRs, stop, passknife, etc)
-Server IP, which i believe is the one the ebot has already.
We use the function
function encryptCommand($matchId, $eventData, $serverIp, $authkey)
$data = $matchId . " " . $eventData . " " . $serverIp;
$data = Encryption::encrypt($data, $authkey, 256);
$content = json_encode(array($data, $serverIp));
and retrieve something like: ["XwFXtgWIzlieVncO8q1ROey1e9bZbw+SLd9p4cM+Bb4+3fMNug==","192.168.1.80:27015"]
then we equal this to a variable, and do this function:
$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_sendto($socket, $message, strlen($message), 0, "127.0.0.1", 12360);
$message is what we get from the encryptCommand
We dont know what are we doing wrong.
Sorry for my english, and thanks