devbluen / RakNET-Fix

Fix for raknet attack issues.
Apache License 2.0
12 stars 0 forks source link

2 questions about how to use it #1

Open hiwyn opened 3 months ago

hiwyn commented 3 months ago

I have 2 questions:

1- https://github.com/katursis/Pawn.RakNet/releases/tag/1.6.0 does not come with pawnraknet.cfg its just create this file on sampserver/plugins together to pawnraknet.so?

2- where should i put:

IRawPacket:20(playerid, BitStream:bs) {
    new packetid, rpcid, NumberOfBitsOfData;
    BS_ReadValue(bs, PR_UINT8, packetid, PR_UINT8, rpcid, PR_CUINT32, NumberOfBitsOfData);
    if (packetid == 40 || (NumberOfBitsOfData >= 0x1FFFFF || NumberOfBitsOfData <= 0x80000000 || NumberOfBitsOfData < 0)) {
        printf("Crasher Detected - RPCID: %d, NumberOfBitsOfData: %d", rpcid, NumberOfBitsOfData);
        BanEx(playerid, "Raknet Bot");
        return false;
    }
    return true;
}

??? on the start of GM and call it on OnPlayerConnect? how?

alansyahdwi commented 3 months ago

simply put that code into your gamemodes and compile it