FakeVer Fix (server-side)

Micr

Member
Joined
Jun 29, 2014
Messages
12
Reaction score
0
SERVER OWNERS ONLY

Well,99% of the servers didn't use GetPlayerVersion on their GM's,this filterscript will fix the problem with players version.

Code:
#include a_samp

new pVersion[16];

public OnPlayerConnect(playerid)
{
    GetPlayerVersion(playerid, pVersion, 16);
    if(!strcmp("0.3z R2") && !strcmp("0.3z R3") && !strcmp("0.3z R4"))
   {
        new pName[MAX_PLAYER_NAME], info[128];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(info, 128, "[SEC]: %s was kicked.[Reason: Fake Version]", pName);
        SendClientMessageToAll(0xFF0000FF,info);
        Kick(playerid);
   }
   return 1;
}

Guys,first,this is a simple fix,don't get mad because of it,anyway or anytime this would going to be patched anyway..

Mod Link: FakeVer (urShadow)
Author: urShadow
Version: 0.3z (or any)
 

Kyance

Member
Joined
May 26, 2013
Messages
10
Reaction score
0
Now why would you want the string size to be 128, when it can be 68?
 

0x_

Wtf I'm not new....
Staff member
Administrator
Joined
Feb 18, 2013
Messages
1,123
Reaction score
174
It only limits the selection of versions, it doesn't actually fix it.
and why the hell announce it?
and also like kyance said, why use 128(most common number) instead of 68 (length of "[SEC]: %s was kicked.[Reason: Fake Version]" + MAX_PLAYER_NAME + null terminator).
 

0B36

Expert
Joined
Jan 6, 2014
Messages
1,324
Reaction score
8
:face_palm: :face_palm: :face_palm:

Actually, this is the script for which FakeVersion was made.

All FakeVersion does is FOOL the server into believing that client is on R2, by manipulating and sending the R2 as the version in plain text, while player is PHYSICALLY playing on R1.

FakeVersion bypasses that script and there is no fix for that  :yuno:
 

Crayder

Active member
Joined
Mar 6, 2014
Messages
148
Reaction score
0
Also, why is the version string a global string, when instead it can be inside the callback.
 

Micr

Member
Joined
Jun 29, 2014
Messages
12
Reaction score
0
Kyance link said:
Now why would you want the string size to be 128, when it can be 68?

At this point,that was my bad,but,anyway,it's just a thing that i do,if they feel that it's too much,they can change the lenght,no problem.

0x688 link said:
It only limits the selection of versions, it doesn't actually fix it.
and why the hell announce it?
and also like kyance said, why use 128(most common number) instead of 68 (length of "[SEC]: %s was kicked.[Reason: Fake Version]" + MAX_PLAYER_NAME + null terminator).

:imoverit:
Same.

Crayder link said:
Also, why is the version string a global string, when instead it can be inside the callback.

And if someone whants to get the version of the player on any other part of the script ?

0B36 link said:
:face_palm: :face_palm: :face_palm:

Actually, this is the script for which FakeVersion was made.

All FakeVersion does is FOOL the server into believing that client is on R2, by manipulating and sending the R2 as the version in plain text, while player is PHYSICALLY playing on R1.

FakeVersion bypasses that script and there is no fix for that  :yuno:

:imoverit:
Holy shit,man...


Well,anyway,at least i tryied,feel free to lock or delete this topic if you want,im done.
 

Crayder

Active member
Joined
Mar 6, 2014
Messages
148
Reaction score
0
Micr link said:
And if someone whants to get the version of the player on any other part of the script ?
Then it would not return the one you want because it is not a per player array. Think about what your saying there Mr. Smart Guy.
 

.silent

Well-known member
Joined
Apr 14, 2013
Messages
339
Reaction score
13
Is this some pseudo-code or the real one?
Because it wont work, the IF condition is incorrect and will never get called, let me point out everything that's bad:
1. missing arguments in strcmp(), you aren't basically comparing anything and it wouldn't even compile, proper way to do this:
Code:
strcmp(pVersion, "0.3z R2")
2. Incorrect condition, strcmp returns 0 when both strings are equal (or one/both are NULL), you would kick the player if he has the correct version and not when he had fake version.
And also your use of and (&&) is incorrect, to make it work now the player would need to have it's version text "0.3z R2" AND "0.3z R3" AND "0.3z R4" which is pretty damn impossible :p
 

Crayder

Active member
Joined
Mar 6, 2014
Messages
148
Reaction score
0
Code:
#include <a_samp>

public OnPlayerConnect(playerid)
{
	new pVersion[16];
    GetPlayerVersion(playerid, pVersion, 16);
    if(!strcmp(pVersion, "0.3z R2") || !strcmp(pVersion, "0.3z R3") || !strcmp(pVersion, "0.3z R4"))
	{
        new pName[MAX_PLAYER_NAME], info[128];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(info, 128, "** %s was kicked. [Reason: Fake Version] **", pName);
        SendClientMessageToAll(0xFF0000FF, info);
        SetTimerEx("KickTimer", 1500, false, "i", playerid);
	}
	return 1;
}

forward KickTimer(playerid); public KickTimer(playerid)
{
	return Kick(playerid);
}
 

.silent

Well-known member
Joined
Apr 14, 2013
Messages
339
Reaction score
13
You still forgot that strcmp returns 0 if both strings are equal on given length, thus any player who has version 0.3z R2, 0.3z R3 or 0.3z R4 will get kicked (but those that have different versions will be let in :p)
BTW you are using a timer to delay the kick (to show the message) but the delay is pretty fucking huge, if you use the same delay for bans then I suggest that you lower it to about 30-50ms because players can easily evade bans like that (I've even done it in RakSAMP some time when I was trolling, the admin's couldn't ban me because my bot was reconnecting everytime it found any "You have been banned by admin: [x] for: [x]" on the chat)
 
Top