Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. Początek kodu:
  2.  
  3. local hostPassword = " "
  4. local enterPassword = false
  5. local hostIP = "000.000.000.000"
  6. local logged = false
  7. local host = nil
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19. hosty = {
  20. { host = "69.69.69.69", password = "12345", stop = false },
  21.  
  22.  
  23.  
  24.  
  25.  
  26. }
  27.  
  28.  
  29. function pobierzHosty ( )
  30. return hosty
  31. end
  32.  
  33.  
  34.  
  35.  
  36. Gdzieś tam dalej:
  37.  
  38.  
  39.  
  40.  
  41. addEventHandler("onClientGUIClick", GUIEditor.button[1],
  42. function ( )
  43. if source == GUIEditor.button[1] then
  44. local command = guiGetText(GUIEditor.edit[1])
  45. if enterPassword == true and command ~= hostPassword and command ~= "//bruteforce" then
  46. guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]).."["..hostIP.."] Access denied.")
  47. elseif enterPassword == true and command == hostPassword and command ~= "//bruteforce" then
  48. guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]).."["..hostIP.." ] Properly logged as 'root' account. ")
  49. logged = true
  50. enterPassword = false
  51. elseif enterPassword == true and command == "//bruteforce" then
  52. guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]).."[Console] The attack may take up to a minute ")
  53. guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]).."[Console] Brute force attack step 0/6 ")
  54. local step = 0
  55. setTimer(
  56. function ( )
  57. step = step + 1
  58. guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]).."[Console] Brute force attack step "..step.."/6 ")
  59. if step == 6 then
  60. guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]).."["..hostIP.." ] Properly logged as 'root' account. ")
  61. logged = true
  62. enterPassword = false
  63. end
  64. end, 10000, 6)
  65. end
  66. if command == "exit" then
  67. guiSetVisible(GUIEditor.window[1], false)
  68. elseif string.sub(command, 1, 7) == "connect" then
  69. local ip = string.gsub(string.sub(command, 8, string.len(command)), " ", "")
  70. hostIP = ip
  71. guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]).."[CONSOLE] Trying connect to "..ip.."")
  72. for k,v in ipairs(hosty) do -- jak to zrobic? ;__;
  73. if v.host == ip then
  74. 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
  75. guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]).."[CONSOLE] Connected to "..ip.."!")
  76. guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]).."["..ip.."] Enter password to 'root' account:")
  77. enterPassword = true
  78. hostPassword = v.password
  79. host = v
  80. guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]).."[CONSOLE] Pro tip: Use the //bruteforce command to try a bruteforce attack.")
  81. else
  82. guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]).."[CONSOLE] You can not connect to the "..ip.."")
  83. end
  84. end
  85. elseif command == "help" then
  86. guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]).."[Console] exit")
  87. guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]).."[Console] connect <host> - connect to the selected host")
  88. elseif command == "off" and logged then
  89. guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1]).."["..hostIP.."] Disabled device. Restart occurs within two minutes.")
  90. host.stop = true
  91. setTimer(
  92. function ( )
  93. host.stop = false
  94. end, 120000, 1)
  95. end
  96. end
  97. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement