[FilterScript] Anti-(Player)Crasher
#1

pawn Код:
#define FILTERSCRIPT

#include <a_samp>
 
//Anti-(Player)Crasher  0.3x
//by bartekdvd
public OnPlayerUpdate(playerid)
{
    if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        new Float:vec[3];
        GetPlayerCameraFrontVector(playerid, vec[0], vec[1], vec[2]);
        new bool:possible_crasher = false;
        for (new i = 0; !possible_crasher && i < sizeof(vec); i++)
            if (floatabs(vec[i]) > 10.0)
                possible_crasher = true;
       
        if (possible_crasher)
            return 0; //do not send fake data, prevents crash
    }

    return 1;
}
Q: What is the issue?
A: The attacker sends modified aiming information like bad camera front vector or/and bad camera position. If attacker wants to crash his victim he needs to switch to some melee weapon and press secondary attack key.

Q: What is the range of attack?
A: If attacker is only streamed for some player he can crash him.

Q: Can you send me this crasher program?
A: Nope.

Probably most of you didn't know about this issue.

DOWNLOAD: http://pastebin.com/egd2RdYt
Reply
#2

EDIT: Tried, yes truely random kick. gonna remove it.
Reply
#3

If someone could test it now whether it randomly kicks normal players or not I would be really grateful.
Reply
#4

Try use a larger value
Reply
#5

So you made a mod that starts with S***** which is not allowed to say on this forum and you are patching some of its features?
Reply
#6

Quote:
Originally Posted by Dopefull
Посмотреть сообщение
So you made a mod that starts with S***** which is not allowed to say on this forum and you are patching some of its features?
Did you read the word "Anti" before the rest of the title? I don't think so.
Reply
#7

Quote:
Originally Posted by _Zeus
Посмотреть сообщение
Did you read the word "Anti" before the rest of the title? I don't think so.
Did you read the last part of my message?

Код:
and you are patching some of its features?
I was referring to that he has made a crasher once ( go find that one for yourself ) and now he's patching it, just seems funny

On topic: seems as a good filterscript good job
Reply
#8

God bless.
Reply
#9

I didn't knew about this problem...

Isn't this better:
pawn Код:
public OnPlayerUpdate(playerid)
{
    if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        new Float:vec[3];
        GetPlayerCameraFrontVector(playerid, vec[0], vec[1], vec[2]);
        for (new i = 0; i < sizeof(vec); i++)
            if (floatabs(vec[i]) > 10.0)
                return 0;
    }

    return 1;
}
(one less variable xD) ?
Reply
#10

Quote:
Originally Posted by IstuntmanI
Посмотреть сообщение
I didn't knew about this problem...

Isn't this better:
pawn Код:
public OnPlayerUpdate(playerid)
{
    if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        new Float:vec[3];
        GetPlayerCameraFrontVector(playerid, vec[0], vec[1], vec[2]);
        for (new i = 0; i < sizeof(vec); i++)
            if (floatabs(vec[i]) > 10.0)
                return 0;
    }

    return 1;
}
(one less variable xD) ?
Yes it is less code, but I've made this one more variable named "possible_crasher" in order to point out that it MAY be crasher not MUST be.

This code is now more like anti-corrupted-aim-sync-data-something.
With this you can't be 100% sure that it is crasher, because sa-mp client sends sometimes, with no reason, corrupted front camera vector, so the best thing you can do is stop sending that data to the other players.

Your players are 100% safe now. No more crash and no more kick.
Reply
#11

hmm should i believe you ? lets use it
Reply
#12

Nice but new crasher is coming out soon.Hope there will be some fix for it.
Reply
#13

I <3 balcan AC
Reply
#14

Wow, idk if FS is correct, but wow on 53 reputation points, just wow!
Reply
#15

It detects the crasher afaik, but its retuning too many false-positives, anyway you can tune it so it only detects the crasher?
Reply
#16

Quote:
Originally Posted by [Hunter]
Посмотреть сообщение
It detects the crasher afaik, but its retuning too many false-positives, anyway you can tune it so it only detects the crasher?
I think we need to wait for the official client fix. I can tune it a little bit, but I can't really get 100% accuracy. The best way is returning 0 in OnPlayerUpdate instead of kicking or banning player.
With the current version of my script crashers can't crash players, so they are not threat anymore.
Reply
#17

Mind helping me? this doesn't work for me for some reason, with the crasher in wich they have to click RMB, didn't try with the "/crasher" one... idk what's wrong bartekdvd?
Reply
#18

BTW
pawn Код:
public OnVehicleMod(playerid,vehicleid,componentid) {
    if(GetPlayerInterior(playerid) == 0) return 0;
    return 1;
}
This prevents crashers via carmods-
Reply
#19

Quote:
Originally Posted by Mean
Посмотреть сообщение
Isn't this all that is needed?
pawn Код:
public OnVehicleMod(playerid,vehicleid,componentid) {
    if(GetPlayerInterior(playerid) == 0) return 0;
    return 1;
}
This code prevents crashers 100%, unless you have vehicles in interiors.
Can you explain to me how this should prevent crashers?
Reply
#20

Users try to mod vehicles with non-accepted mods on that vehicle and teleport to other players. crash xD

In this way you do not allow vehicle mod in interior 0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)