Проверка скриптов и плагинов на вредоносное ПО

lemonager

;)
Автор темы
Всефорумный модератор
809
1,717
Версия SA-MP
  1. Любая
nX15Ep5.png

eNo5cSj.png

Общая тема для просьб о помощи проверки скриптов, плагинов и приложений.
Теперь не нужно создавать много отдельных тем о помощи с проверкой.

Рекомендации:
  1. Ставить к себе в игру что-либо с темы крайне не рекомендуется, если файл не был проверен опытным пользователем или Вы в нём сомневаетесь.
  2. Сообщения по типу "спасибо, помог" по правилам форума считаются флудом и будут удалены. Если вам помогли, вы можете нажать кнопку Мне нравится под ответом - это даст понять, что ответ верный.
eNo5cSj.png

qJTRxhB.png
 

Maxim25012

Известный
512
237
Это – загрузчик скрипта. Он по определению не может быть полностью чист, так как загружает другой, основной скрипт с Интернета. Источник самого скрипта автора могут взломать, либо ему самому моча в голову стукнет – и всё – вирусы, так что никто никакой гарантии чистоты подобного скрипта тебе дать не сможет, только полностью вырезать все элементы взаимодействия с Интернетом по типу авто-обновления и авто-загрузки библиотек, но с такой просьбой тебе не сюда обращаться нужно, а сюда:
 
  • Клоун
Реакции: Samirca

rafo420

Участник
87
47
Проверьте скрипт пажэ (прикреплю и код скрипта и сам скрипт)
mashinist:
local ev = require('lib.samp.events')
local state = false
local canMove = false
local dissync = false
local bot = {
    state = false;
    station = "";
    distance = 99999;
    speed = {
        min = 0,
        max = 0
    }
}
local speed = {
    min = 0,
    max = 0
}
local checkpoint = {
    position = {
        x = 0,
        y = 0,
        z = 0
    },
    isFinish = false
}
local key = 0
local function press_gas()
    writeMemory(0xB73458 + 0x20, 1, 255, false)
end
local function press_brake()
    writeMemory(0xB73458 + 0x1C, 1, 255, false)
end
function onReceivePacket(id, bs)
    if id == 215 then
        raknetBitStreamIgnoreBits(bs, 8)
        if raknetBitStreamReadInt16(bs) == 2 then
            local a = raknetBitStreamReadInt32(bs)
            local e = {}
            for i = 1, raknetBitStreamReadInt8(bs) do
                local l = raknetBitStreamReadInt32(bs)
                table.insert(e, raknetBitStreamReadString(bs, l))
            end
            if table.getn(e) > 0 then
                local text = e[1]
                print(text);
                if (string.find(text, "Machinist") and string.find(text, "setStation")) then
                    local data = decodeJson(string.match(text, 'setStation%(\'(.*)\'%)'));
                    if (data ~= nil) then
                        print("Station:", data[1], "Distance:", data[2]);
                        bot.station, bot.distance = data[1], data[2]
                    end
                end
                local minSpeed, maxSpeed = text:match('interface%(\'Machinist\'%)%.setSpeed%(\'%["(%d+)%-(%d+)", %d+%]\'%)')
                if minSpeed ~= nil and maxSpeed ~= nil then
                    bot.speed.min = tonumber(minSpeed)
                    bot.speed.max = tonumber(maxSpeed)
                end
            end
        end
    end
end
function main()
    repeat wait(0) until isSampAvailable()
    sampRegisterChatCommand('mashinist', function() 
        bot.state = not bot.state
        sampAddChatMessage(bot.state and '��� �� ��������� ��� �������' or '�������� ��� �� ���������', -1)
    end)
    sampRegisterChatCommand('slp', function() 
        local x, y, z = getCharCoordinates(PLAYER_PED)
        setCharCoordinates(PLAYER_PED,x,y,z+1.5)
    end)
    local timer = os.clock();
    local position = {x = 0, y = 0, z = 0};
    local last_distance = 0;
    while true do
        wait(0)
        if bot.state and isCharInAnyTrain(PLAYER_PED) then
            local car = storeCarCharIsInNoSave(PLAYER_PED);
            local speed = getCarSpeed(storeCarCharIsInNoSave(PLAYER_PED)) * 3.67
            local x, y, z = getCharCoordinates(PLAYER_PED);
            local distance = math.max(0, getDistanceBetweenCoords3d(x, y, z, checkpoint.position.x, checkpoint.position.y, checkpoint.position.z) - 1);
            
            if checkpoint.isFinish or (bot.distance - distance >= 0 and bot.distance - distance <= 35) then
                if (timer < os.clock()) then
                    last_distance = distance;
                    timer = os.clock() + 1;
                    position["x"], position["y"], position["z"] = x, y, z;
                end
                local stop_distance = distance - ((speed / 35) * last_distance) / 1.2
                printStringNow(math.floor(speed) .. "/" .. bot.speed.max .. " ; " .. math.floor(bot.distance) .. "/" .. math.floor(distance) .. "/" .. math.floor(last_distance) .. " ; " .. math.floor(stop_distance), 200);
                print(math.floor(speed) .. "/" .. bot.speed.max .. " ; " .. math.floor(bot.distance) .. "/" .. math.floor(distance) .. "/" .. math.floor(last_distance) .. " ; " .. math.floor(stop_distance), 200)
                if (stop_distance <= 1 and distance < 300) then
                    if (distance < 2 and speed < 8) then
                        setTrainSpeed(car, math.max(0, getCarSpeed(getCarCharIsUsing(PLAYER_PED)) / 1.1 - 1));
                        print("������ ���������", math.max(0, getCarSpeed(getCarCharIsUsing(PLAYER_PED)) / 1.1 - 1))
                    else
                        print("���������������!", bot.distance, stop_distance, speed)
                        setGameKeyState(14, 255);
                        press_brake();
                    end
                else
                    if (speed < bot.speed.min + ((bot.speed.max - bot.speed.min) / 2)) then
                        printStringNow(speed .. "/" .. bot.speed.min + ((bot.speed.max - bot.speed.min) / 2), 100)
                        setGameKeyState(16, 255);
                    end
                end
            elseif (speed < bot.speed.min + ((bot.speed.max - bot.speed.min) / 2)) then
                printStringNow(speed .. "/" .. bot.speed.min + ((bot.speed.max - bot.speed.min) / 2))
                setGameKeyState(16, 255);
            end
            local moveDirection = getCarSpeed(getCarCharIsUsing(PLAYER_PED)) > 0 and 1 or (getCarSpeed(getCarCharIsUsing(PLAYER_PED)) < 0 and -1 or 0)
            key = moveDirection == 1 and 8 or (moveDirection == -1 and 32 or 0)
        end
    end
end
function coordPos(x, y, z)
    lua_thread.create(function() 
        local mx, my, mz = getCharCoordinates(PLAYER_PED)
        dissync = true
        local k = 0
        while getDistanceBetweenCoords3d(x, y, z, mx, my, mz) > 1 and isCharOnFoot(PLAYER_PED) do
            if mx > x then mx = mx - 1 else mx = mx + 1 end
            if my > y then my = my - 1 else my = my + 1 end
            if mz > z then mz = mz - 1 else mz = mz + 1 end
            sendPacket(mx, my, mz)
            k = k + 1
            if k > 3 then
                k = 0
            end
            local s = 'teleporting by AkeGGa'
            for i = 1, k do
                s = s .. '.'
            end
            printStringNow(s, 110)
            wait(100)
        end
        setCharCoordinates(PLAYER_PED, x, y, z)
        dissync = false
    end)
end
function sendPacket(x, y, z)
    local bs = raknetNewBitStream()
    raknetBitStreamWriteInt8(bs, 207)
    raknetBitStreamWriteInt16(bs, 0)
    raknetBitStreamWriteInt16(bs, 0)
    raknetBitStreamWriteInt16(bs, 0)
    raknetBitStreamWriteFloat(bs, x)
    raknetBitStreamWriteFloat(bs, y)
    raknetBitStreamWriteFloat(bs, z)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteInt8(bs, getCharHealth(PLAYER_PED))
    raknetBitStreamWriteInt8(bs, getCharArmour(PLAYER_PED))
    raknetBitStreamWriteInt8(bs, getCurrentCharWeapon(PLAYER_PED))
    raknetBitStreamWriteInt8(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteInt16(bs, 0)
    raknetBitStreamWriteInt16(bs, 0)
    raknetBitStreamWriteInt16(bs, 0)
    raknetSendBitStreamEx(bs, 2, 8, 0)
    raknetDeleteBitStream(bs)
end
function getCarSpeedKmh( vehicleTarget )
    if not vehicleTarget or type( vehicleTarget ) ~= 'number' then return false end
    if not doesVehicleExist( vehicleTarget ) then return false end
    local x, y, z = getCarSpeedVector( vehicleTarget )
    if not x or not y or not z then x, y, z = 0, 0, 0 end
    local kmh = math.floor( (math.sqrt( (x*x) + (y*y) + (z*z) ) * 180) / 100 ) -- KM/H
    local mph = math.floor( (math.sqrt( (x*x) + (y*y) + (z*z) ) * 180) / 1.609344 / 100 ) -- MPH
    return kmh * 2
end
function ev.onSetRaceCheckpoint(type, pos, nextPos, size)
    canMove = true
    checkpoint.position = pos
    checkpoint.isFinish = type == 1
end
function ev.onSetCheckpoint(pos, radius)
    if bot.state and isCharOnFoot(PLAYER_PED) then
        coordPos(pos.x, pos.y, pos.z)
    end
end
function ev.onDisableRaceCheckpoint()
    canMove = false
end
function ev.onSendVehicleSync(data)
    data.keysData = key
end
function ev.onSendPlayerSync(data)
    if dissync then return false end
end
function Sync(data)
    data.keysData = key
end
function ev.onSendPlayerSync(data)
    if dissync then return false end
end
 

Вложения

  • mashinist.lua
    8 KB · Просмотры: 1

chromiusj

R&B-baby-queen
Модератор
5,587
3,888
Проверьте скрипт пажэ (прикреплю и код скрипта и сам скрипт)
mashinist:
local ev = require('lib.samp.events')
local state = false
local canMove = false
local dissync = false
local bot = {
    state = false;
    station = "";
    distance = 99999;
    speed = {
        min = 0,
        max = 0
    }
}
local speed = {
    min = 0,
    max = 0
}
local checkpoint = {
    position = {
        x = 0,
        y = 0,
        z = 0
    },
    isFinish = false
}
local key = 0
local function press_gas()
    writeMemory(0xB73458 + 0x20, 1, 255, false)
end
local function press_brake()
    writeMemory(0xB73458 + 0x1C, 1, 255, false)
end
function onReceivePacket(id, bs)
    if id == 215 then
        raknetBitStreamIgnoreBits(bs, 8)
        if raknetBitStreamReadInt16(bs) == 2 then
            local a = raknetBitStreamReadInt32(bs)
            local e = {}
            for i = 1, raknetBitStreamReadInt8(bs) do
                local l = raknetBitStreamReadInt32(bs)
                table.insert(e, raknetBitStreamReadString(bs, l))
            end
            if table.getn(e) > 0 then
                local text = e[1]
                print(text);
                if (string.find(text, "Machinist") and string.find(text, "setStation")) then
                    local data = decodeJson(string.match(text, 'setStation%(\'(.*)\'%)'));
                    if (data ~= nil) then
                        print("Station:", data[1], "Distance:", data[2]);
                        bot.station, bot.distance = data[1], data[2]
                    end
                end
                local minSpeed, maxSpeed = text:match('interface%(\'Machinist\'%)%.setSpeed%(\'%["(%d+)%-(%d+)", %d+%]\'%)')
                if minSpeed ~= nil and maxSpeed ~= nil then
                    bot.speed.min = tonumber(minSpeed)
                    bot.speed.max = tonumber(maxSpeed)
                end
            end
        end
    end
end
function main()
    repeat wait(0) until isSampAvailable()
    sampRegisterChatCommand('mashinist', function()
        bot.state = not bot.state
        sampAddChatMessage(bot.state and '��� �� ��������� ��� �������' or '�������� ��� �� ���������', -1)
    end)
    sampRegisterChatCommand('slp', function()
        local x, y, z = getCharCoordinates(PLAYER_PED)
        setCharCoordinates(PLAYER_PED,x,y,z+1.5)
    end)
    local timer = os.clock();
    local position = {x = 0, y = 0, z = 0};
    local last_distance = 0;
    while true do
        wait(0)
        if bot.state and isCharInAnyTrain(PLAYER_PED) then
            local car = storeCarCharIsInNoSave(PLAYER_PED);
            local speed = getCarSpeed(storeCarCharIsInNoSave(PLAYER_PED)) * 3.67
            local x, y, z = getCharCoordinates(PLAYER_PED);
            local distance = math.max(0, getDistanceBetweenCoords3d(x, y, z, checkpoint.position.x, checkpoint.position.y, checkpoint.position.z) - 1);
           
            if checkpoint.isFinish or (bot.distance - distance >= 0 and bot.distance - distance <= 35) then
                if (timer < os.clock()) then
                    last_distance = distance;
                    timer = os.clock() + 1;
                    position["x"], position["y"], position["z"] = x, y, z;
                end
                local stop_distance = distance - ((speed / 35) * last_distance) / 1.2
                printStringNow(math.floor(speed) .. "/" .. bot.speed.max .. " ; " .. math.floor(bot.distance) .. "/" .. math.floor(distance) .. "/" .. math.floor(last_distance) .. " ; " .. math.floor(stop_distance), 200);
                print(math.floor(speed) .. "/" .. bot.speed.max .. " ; " .. math.floor(bot.distance) .. "/" .. math.floor(distance) .. "/" .. math.floor(last_distance) .. " ; " .. math.floor(stop_distance), 200)
                if (stop_distance <= 1 and distance < 300) then
                    if (distance < 2 and speed < 8) then
                        setTrainSpeed(car, math.max(0, getCarSpeed(getCarCharIsUsing(PLAYER_PED)) / 1.1 - 1));
                        print("������ ���������", math.max(0, getCarSpeed(getCarCharIsUsing(PLAYER_PED)) / 1.1 - 1))
                    else
                        print("���������������!", bot.distance, stop_distance, speed)
                        setGameKeyState(14, 255);
                        press_brake();
                    end
                else
                    if (speed < bot.speed.min + ((bot.speed.max - bot.speed.min) / 2)) then
                        printStringNow(speed .. "/" .. bot.speed.min + ((bot.speed.max - bot.speed.min) / 2), 100)
                        setGameKeyState(16, 255);
                    end
                end
            elseif (speed < bot.speed.min + ((bot.speed.max - bot.speed.min) / 2)) then
                printStringNow(speed .. "/" .. bot.speed.min + ((bot.speed.max - bot.speed.min) / 2))
                setGameKeyState(16, 255);
            end
            local moveDirection = getCarSpeed(getCarCharIsUsing(PLAYER_PED)) > 0 and 1 or (getCarSpeed(getCarCharIsUsing(PLAYER_PED)) < 0 and -1 or 0)
            key = moveDirection == 1 and 8 or (moveDirection == -1 and 32 or 0)
        end
    end
end
function coordPos(x, y, z)
    lua_thread.create(function()
        local mx, my, mz = getCharCoordinates(PLAYER_PED)
        dissync = true
        local k = 0
        while getDistanceBetweenCoords3d(x, y, z, mx, my, mz) > 1 and isCharOnFoot(PLAYER_PED) do
            if mx > x then mx = mx - 1 else mx = mx + 1 end
            if my > y then my = my - 1 else my = my + 1 end
            if mz > z then mz = mz - 1 else mz = mz + 1 end
            sendPacket(mx, my, mz)
            k = k + 1
            if k > 3 then
                k = 0
            end
            local s = 'teleporting by AkeGGa'
            for i = 1, k do
                s = s .. '.'
            end
            printStringNow(s, 110)
            wait(100)
        end
        setCharCoordinates(PLAYER_PED, x, y, z)
        dissync = false
    end)
end
function sendPacket(x, y, z)
    local bs = raknetNewBitStream()
    raknetBitStreamWriteInt8(bs, 207)
    raknetBitStreamWriteInt16(bs, 0)
    raknetBitStreamWriteInt16(bs, 0)
    raknetBitStreamWriteInt16(bs, 0)
    raknetBitStreamWriteFloat(bs, x)
    raknetBitStreamWriteFloat(bs, y)
    raknetBitStreamWriteFloat(bs, z)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteInt8(bs, getCharHealth(PLAYER_PED))
    raknetBitStreamWriteInt8(bs, getCharArmour(PLAYER_PED))
    raknetBitStreamWriteInt8(bs, getCurrentCharWeapon(PLAYER_PED))
    raknetBitStreamWriteInt8(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteFloat(bs, 0)
    raknetBitStreamWriteInt16(bs, 0)
    raknetBitStreamWriteInt16(bs, 0)
    raknetBitStreamWriteInt16(bs, 0)
    raknetSendBitStreamEx(bs, 2, 8, 0)
    raknetDeleteBitStream(bs)
end
function getCarSpeedKmh( vehicleTarget )
    if not vehicleTarget or type( vehicleTarget ) ~= 'number' then return false end
    if not doesVehicleExist( vehicleTarget ) then return false end
    local x, y, z = getCarSpeedVector( vehicleTarget )
    if not x or not y or not z then x, y, z = 0, 0, 0 end
    local kmh = math.floor( (math.sqrt( (x*x) + (y*y) + (z*z) ) * 180) / 100 ) -- KM/H
    local mph = math.floor( (math.sqrt( (x*x) + (y*y) + (z*z) ) * 180) / 1.609344 / 100 ) -- MPH
    return kmh * 2
end
function ev.onSetRaceCheckpoint(type, pos, nextPos, size)
    canMove = true
    checkpoint.position = pos
    checkpoint.isFinish = type == 1
end
function ev.onSetCheckpoint(pos, radius)
    if bot.state and isCharOnFoot(PLAYER_PED) then
        coordPos(pos.x, pos.y, pos.z)
    end
end
function ev.onDisableRaceCheckpoint()
    canMove = false
end
function ev.onSendVehicleSync(data)
    data.keysData = key
end
function ev.onSendPlayerSync(data)
    if dissync then return false end
end
function Sync(data)
    data.keysData = key
end
function ev.onSendPlayerSync(data)
    if dissync then return false end
end
ну... раз код дал, то чисто
 
  • Нравится
Реакции: rafo420

rafo420

Участник
87
47
чистый ? просто я не оч шарю в скриптинге , и мне показалось что скрипт какую-то херь подгружает
 

Вложения

  • moonfix .lua
    1.6 KB · Просмотры: 10