Hello guys, I would like to get your opinion. Can you give me a hint on how I can prevent a player from entering a bot?
PS: Can you give an example with C#?
PS: Can you give an example with C#?
this method is better then anti bot, it also works as anti VPN / proxy method to prevent IP / PC limit spoofing. I was using this method (but calling ioctl not winapi) on f8filter.Quote:
You'll have to analyze the client itself, from server side only wouldn't be an option actually secure.
You can start by taking the ip and port the client is connected. Then check if there is something unusual (like values are not the same public ip/port your server use) then it is actually using an altered connection aka proxy/vpn/bot.
You can take a quick look at what I've done in the past: [Only registered and activated users can see links. Click Here To Register...]
Such check can be done client or server side, however, at both options you'll have to consider to protect the client/dll code doing such process to avoid any bypass same like the HWID stuff where you'll have to make sure nobody is gonna be able to alter the code.
if (connections.size() > 0)
{
// Read the first one only
MIB_TCPROW_OWNER_PID* info = connections[0];
// Address buffer
in_addr IpAddr;
char remoteAddr[128];
// Convert long to address
IpAddr.S_un.S_addr = (u_long)info->dwRemoteAddr;
strcpy_s(remoteAddr, sizeof(remoteAddr), inet_ntoa(IpAddr));
result << remoteAddr << ":" << ntohs(info->dwRemotePort);
std::string b = result.str();
std::string token;
std::getline(result, token, ':'); // extract the ip before :
if (acp_decode(token).compare(L"111.111.111.111") == 0)
{
g_pCGInterface->ShowMessage_Global(L"Normal Client");
}
else {
g_pCGInterface->ShowMessage_Global(L"Logged in with bot");
}
}