Breaking rcon
#1

Hello dear users of sa-mp.com!
Today the unknown became authorized in RCON though it in general is disconnected. (rcon 0 in server.cfg)
Further it replaced the name, a pier we moved, new IP.
I ban users at authorization in RCON, here part of a code from pawn.
PHP Code:
public OnRconLoginAttempt(ip[], password[], success)
{
    new 
stringer[32];
    
format(stringer,sizeof(stringer),"banip %d",ip);
    
SendRconCommand(stringer);
    
SendRconCommand("reloadbans");
    
printf("Entrance attempt in Rcon IP: %d.",ip);
    return 
true;

Here lines from the ravine. (server_log.txt)
PHP Code:
[21:20:14Entrance attempt in Rcon IP52.
[21:20:14RCON (In-Game): Player #25 (Name_Bbbb) failed login.
[21:20:23Entrance attempt in Rcon IP52.
[21:20:23RCON (In-Game): Player #25 (Name_Bbbb) failed login.
[18:20:03Entrance attempt in Rcon IP49.
[18:20:03RCON (In-Game): Player #32 (Name_Aasaaa) has logged in.
[18:23:31Entrance attempt in Rcon IP49.
[18:23:31RCON (In-Game): Player #0 (Name_Aasaaa) has logged in.
[18:31:54RCON (In-Game): Player [Name_Aasaaa sent commandhostname new IP  123.345.678.901:2345 
I lost considerable online! I ask for help in a solution!
Reply
#2

format(stringer,sizeof(stringer),"banip %d",ip);

change to

format(stringer,sizeof(stringer),"banip %s",ip);
Reply
#3

Strange error.. I had the same. Thanks for the solution ikey07! I give you +rep!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)