raksamp функция

Статус
В этой теме нельзя размещать новые ответы.

hinazuki

Потрачен
Автор темы
346
95
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Версия MoonLoader
Другое
Есть такой скрипт для ракбота(обход для сервера):
Lua:
local dat = {
    222,
    194,
    23,
    5,
    23,
    23,
    5,
    54,
    52,
    177,
    35,
    170,
    32,
    169,
    160,
    151,
    57,
    183,
    133,
    54,
    52,
    177,
    41,
    160,
    166,
    168,
    23,
    57,
    183,
    128,
    52,
    183,
    50,
    151,
    57,
    183,
    133,
    54,
    52,
    177,
    35,
    170,
    32,
    169,
    160,
    167,
    167,
    34,
    151,
    57,
    183,
    133,
    54,
    52,
    177,
    41,
    161,
    167,
    167,
    34,
    151,
    57,
    183,
    133,
    54,
    52,
    177,
    35,
    170,
    32,
    169,
    160,
    151,
    57,
    183,
    133,
    54,
    52,
    177,
    49,
    48,
    185,
    185,
    151,
    57,
    183,
    133,
    54,
    52,
    177,
    36,
    182,
    182,
    162,
    182,
    186,
    182,
    48,
    186,
    55,
    185,
    37,
    39,
    167,
    34,
    151,
    57,
    183,
    133,
    54,
    52,
    177,
    57,
    176,
    182,
    184,
    23,
    57,
    183,
    133,
    54,
    52,
    177,
    36,
    182,
    182,
    162,
    182,
    186,
    182,
    48,
    186,
    55,
    185,
    0
}

function onSendRpc(id, data, size)
    if id == 25 then
        local bs = bitStreamInit(data, size)
        local sendBS = bitStreamNew()

        local NickName = ""
        local uiClientChallengeResponse = 0
        local iVersion = 0
        local byteMod = 0
        local byteNickNameLen = 0

        local NewAuthKey = "10EF75E3F7A702B75F29D501677C33B6B4EFA8CA999"
        local NewClientVersion = "0.3.7"
        local byteNewMod = 1
        local byteNewAuthKeyLen = NewAuthKey:len()
        local byteNewClientVersionLen = NewClientVersion:len()

        iVersion = bitStreamReadDWord(bs)
        byteMod = bitStreamReadByte(bs)
        byteNickNameLen = bitStreamReadByte(bs)
        NickName = bitStreamReadString(bs, byteNickNameLen)
        uiClientChallengeResponse = bitStreamReadDWord(bs)

        bitStreamWriteDWord(sendBS, iVersion)
        bitStreamWriteByte(sendBS, byteNewMod)
        bitStreamWriteByte(sendBS, byteNickNameLen)
        bitStreamWriteString(sendBS, NickName, byteNickNameLen)
        bitStreamWriteDWord(sendBS, uiClientChallengeResponse)
        bitStreamWriteByte(sendBS, byteNewAuthKeyLen)
        bitStreamWriteString(sendBS, NewAuthKey, byteNewAuthKeyLen)
        bitStreamWriteByte(sendBS, byteNewClientVersionLen)
        bitStreamWriteString(sendBS, NewClientVersion, byteNewClientVersionLen)

        bitStreamWriteByte(sendBS, 12)
        bitStreamWriteByte(sendBS, 115)
        bitStreamWriteByte(sendBS, 121)
        bitStreamWriteByte(sendBS, 115)
        bitStreamWriteByte(sendBS, 49)
        bitStreamWriteByte(sendBS, 48)
        bitStreamWriteByte(sendBS, 56)
        bitStreamWriteByte(sendBS, 114)
        bitStreamWriteByte(sendBS, 101)
        bitStreamWriteByte(sendBS, 118)
        bitStreamWriteByte(sendBS, 49)
        bitStreamWriteByte(sendBS, 48)
        bitStreamWriteByte(sendBS, 48)

        sendRpc(25, sendBS)

        bitStreamDelete(sendBS)
        bitStreamDelete(bs)
        return true
    end
end

function onRecvRpc(id, data, size)
    if id == 103 then
        local bs = bitStreamNew()
        bitStreamWriteByte(bs, 72)
        bitStreamWriteDWord(bs, 388)
        bitStreamWriteByte(bs, 0)
        sendRpc(103, bs)
        bitStreamDelete(bs)
    end

    if id == 222 then
        local bs = bitStreamNew()
        for i = 1, 135 do
            bitStreamWriteByte(bs, dat[i])
        end

        sendPacket(bs)
        bitStreamDelete(bs)
    end
end

Переписал ее под раксамп lite:
Lua:
local dat = {
    222,
    194,
    23,
    5,
    23,
    23,
    5,
    54,
    52,
    177,
    35,
    170,
    32,
    169,
    160,
    151,
    57,
    183,
    133,
    54,
    52,
    177,
    41,
    160,
    166,
    168,
    23,
    57,
    183,
    128,
    52,
    183,
    50,
    151,
    57,
    183,
    133,
    54,
    52,
    177,
    35,
    170,
    32,
    169,
    160,
    167,
    167,
    34,
    151,
    57,
    183,
    133,
    54,
    52,
    177,
    41,
    161,
    167,
    167,
    34,
    151,
    57,
    183,
    133,
    54,
    52,
    177,
    35,
    170,
    32,
    169,
    160,
    151,
    57,
    183,
    133,
    54,
    52,
    177,
    49,
    48,
    185,
    185,
    151,
    57,
    183,
    133,
    54,
    52,
    177,
    36,
    182,
    182,
    162,
    182,
    186,
    182,
    48,
    186,
    55,
    185,
    37,
    39,
    167,
    34,
    151,
    57,
    183,
    133,
    54,
    52,
    177,
    57,
    176,
    182,
    184,
    23,
    57,
    183,
    133,
    54,
    52,
    177,
    36,
    182,
    182,
    162,
    182,
    186,
    182,
    48,
    186,
    55,
    185,
    0
}

function onSendRPC(id, bs)
    if id == 25 then
        local SendBs = bitStream.new()

        local NickName = ""
        local uiClientChallengeResponse = 0
        local iVersion = 0
        local byteMod = 0
        local byteNickNameLen = 0

        iVersion = bs:readInt32()
        byteMod = bs:readInt8()
        byteNickNameLen = bs:readInt8()
        NickName = bs:readString(byteNickNameLen)
        uiClientChallengeResponse = bs:readInt32()

        local NewAuthKey = "10EF75E3F7A702B75F29D501677C33B6B4EFA8CA999"
        local NewClientVersion = "0.3.7"
        local byteNewMod = 1
        local byteNewAuthKeyLen = NewAuthKey:len()
        local byteNewClientVersionLen = NewClientVersion:len()

        SendBs:writeInt32(iVersion)
        SendBs:writeInt8(byteNewMod)
        SendBs:writeInt8(byteNickNameLen)
        SendBs:writeString(NickName)
        SendBs:writeInt32(uiClientChallengeResponse)
        SendBs:writeInt8(byteNewAuthKeyLen)
        SendBs:writeString(NewAuthKey)
        SendBs:writeInt8(byteNewClientVersionLen)
        SendBs:writeString(NewClientVersion)

         SendBs:writeInt8(12)
         SendBs:writeInt8(115)
         SendBs:writeInt8(121)
         SendBs:writeInt8(115)
         SendBs:writeInt8(49)
         SendBs:writeInt8(48)
         SendBs:writeInt8(56)
         SendBs:writeInt8(114)
         SendBs:writeInt8(101)
         SendBs:writeInt8(118)
         SendBs:writeInt8(49)
         SendBs:writeInt8(48)
         SendBs:writeInt8(48)

         onSendRPC(25, SendBs)
         SendBs:reset()
         bs:reset()
         return true
    end
end

function onReceiveRPC(id, bs)
    if id == 103 then
        local SendBss = bitStream.new()
        SendBss:writeInt8(72)
        SendBss:writeInt32(388)
        SendBss:writeInt8(0)
        onSendRPC(103, SendBss)
        SendBss:reset(SendBss)
    end

    if id == 222 then
        local sSendBss = bitStream.new()
        for i = 1, 135 do
            sSendBss:writeInt8(dat[i])
        end
        sSendBss:sendPacket()
        sSendBss:reset(sSendBss)
    end
end
Код:

На ракботе обход работает, а вот на раксампе нет
 
  • Нравится
Реакции: qdIbp

Ulong

Диванный критик
Проверенный
58
315
ты там очень забавные ошибки допустил)

Lua:
local dat = { 222, 194, 23, 5, 23, 23, 5, 54, 52, 177, 35, 170, 32, 169, 160, 151, 57, 183, 133, 54, 52, 177, 41, 160, 166, 168, 23, 57, 183, 128, 52, 183, 50, 151, 57, 183, 133, 54, 52, 177, 35, 170, 32, 169, 160, 167, 167, 34, 151, 57, 183, 133, 54, 52, 177, 41, 161, 167, 167, 34, 151, 57, 183, 133, 54, 52, 177, 35, 170, 32, 169, 160, 151, 57, 183, 133, 54, 52, 177, 49, 48, 185, 185, 151, 57, 183, 133, 54, 52, 177, 36, 182, 182, 162, 182, 186, 182, 48, 186, 55, 185, 37, 39, 167, 34, 151, 57, 183, 133, 54, 52, 177, 57, 176, 182, 184, 23, 57, 183, 133, 54, 52, 177, 36, 182, 182, 162, 182, 186, 182, 48, 186, 55, 185, 0 }

function onSendRPC(id, bs)
    if id == 25 then
        local SendBs = bitStream.new()

        local NickName = ""
        local uiClientChallengeResponse = 0
        local iVersion = 0
        local byteMod = 0
        local byteNickNameLen = 0

        iVersion = bs:readInt32()
        byteMod = bs:readInt8()
        byteNickNameLen = bs:readInt8()
        NickName = bs:readString(byteNickNameLen)
        uiClientChallengeResponse = bs:readInt32()

        local NewAuthKey = "10EF75E3F7A702B75F29D501677C33B6B4EFA8CA999"
        local NewClientVersion = "0.3.7"
        local byteNewMod = 1
        local byteNewAuthKeyLen = NewAuthKey:len()
        local byteNewClientVersionLen = NewClientVersion:len()

        SendBs:writeInt32(iVersion)
        SendBs:writeInt8(byteNewMod)
        SendBs:writeInt8(byteNickNameLen)
        SendBs:writeString(NickName)
        SendBs:writeInt32(uiClientChallengeResponse)
        SendBs:writeInt8(byteNewAuthKeyLen)
        SendBs:writeString(NewAuthKey)
        SendBs:writeInt8(byteNewClientVersionLen)
        SendBs:writeString(NewClientVersion)

        SendBs:writeInt8(12)
        SendBs:writeInt8(115)
        SendBs:writeInt8(121)
        SendBs:writeInt8(115)
        SendBs:writeInt8(49)
        SendBs:writeInt8(48)
        SendBs:writeInt8(56)
        SendBs:writeInt8(114)
        SendBs:writeInt8(101)
        SendBs:writeInt8(118)
        SendBs:writeInt8(49)
        SendBs:writeInt8(48)
        SendBs:writeInt8(48)
            
        SendBs:sendRPC(25)
        SendBs:reset()

        return false
    end
end

function onReceiveRPC(id, bs)
    if id == 103 then
        local SendBss = bitStream.new()
        SendBss:writeInt8(72)
        SendBss:writeInt32(388)
        SendBss:writeInt8(0)
        SendBss:sendRPC(103)
        SendBss:reset()
    end

    if id == 222 then
        local sSendBss = bitStream.new()
        for i = 1, 135 do
            sSendBss:writeInt8(dat[i])
        end
        sSendBss:sendPacket()
        sSendBss:reset()
    end
end
 
  • Нравится
Реакции: Nestle
Статус
В этой теме нельзя размещать новые ответы.