Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Początek kodu:
- local hostPassword = " "
- local enterPassword = false
- local hostIP = "000.000.000.000"
- local logged = false
- local host = nil
- hosty = {
- { host = "69.69.69.69", password = "12345", stop = false },
- }
- function pobierzHosty()
- return hosty end
- -- Gdzieś tam dalej:
- addEventHandler("onClientGUIClick", GUIEditor.button[1], function()
- if source == GUIEditor.button[1] then
- local command = guiGetText(GUIEditor.edit[1])
- if enterPassword == true and command ~= hostPassword and command ~= "//bruteforce" then
- guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]) .. "[" .. hostIP .. "] Access denied.")
- elseif enterPassword == true and command == hostPassword and command ~= "//bruteforce" then
- guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]) .. "[" .. hostIP .. " ] Properly logged as 'root' account. ")
- logged = true
- enterPassword = false
- elseif enterPassword == true and command == "//bruteforce" then
- guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]) .. "[Console] The attack may take up to a minute ")
- guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]) .. "[Console] Brute force attack step 0/6 ")
- local step = 0
- setTimer(function()
- step = step + 1
- guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]) .. "[Console] Brute force attack step "..step.."/6 ")
- if step == 6 then
- guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]) .. "[" .. hostIP .. " ] Properly logged as 'root' account. ")
- logged = true
- enterPassword = false
- end
- end, 10000, 6)
- end
- if command == "exit" then
- guiSetVisible(GUIEditor.window[1], false)
- elseif string.sub(command, 1, 7) == "connect" then
- local ip = string.gsub(string.sub(command, 8, string.len(command)), " ", "")
- hostIP = ip -- ???
- guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]) .. "[CONSOLE] Trying connect to " .. ip .. "")
- for k,v in ipairs(hosty) do -- jak to zrobic? ;__; -- normalnie
- if v.host == ip then
- if v.stop == true then guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]) .. "[" .. hostIP .. "] The device is disabled. Restart occurs within two minutes.") return end
- guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]) .. "[CONSOLE] Connected to " .. ip .. "!")
- guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]) .. "[" .. ip .. "] Enter password to 'root' account:")
- enterPassword = true
- hostPassword = v.password
- host = v
- guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]) .. "[CONSOLE] Tip: Use the //bruteforce command to try a bruteforce attack.")
- else
- guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]) .. "[CONSOLE] You can not connect to the " .. ip .. "")
- end
- end
- elseif command == "help" then
- guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]) .. "[Console] exit")
- guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]) .. "[Console] connect <host> - connect to the selected host")
- elseif command == "off" and logged then
- guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]) .. "[" .. hostIP .. "] Disabled device. Restart occurs within two minutes.")
- host.stop = true
- setTimer(function() host.stop = false end, 120000, 1)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement