Advertisement
xXm0dzXx

RedBruter

Oct 20th, 2012
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.28 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3.  
  4. --- Thank Kaos for the code below ---
  5. local id=1
  6. chars={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' ','1','2','3','4','5','6','7','8','9','0'}
  7. --chars={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',',','.','/',';','\'','[',']','-','=','\\','<','>','?',':','"','{','}','_','+','`','~','1','2','3','4','5','6','7','8','9','0','!','@','#','$','%','^','&','*','(',')',' '}
  8. function cyclechar(current)
  9.     local tChars={}
  10.     for i=1,#current do
  11.         tChars[#tChars+1]=string.sub(current,i,i)
  12.     end
  13.     --for k,v in pairs(tChars) do print(v) end
  14.     local at=#tChars+1
  15.     local returned=nil
  16.     local looping=1
  17.     while looping==1 do
  18.         at=at-1
  19.         if at==0 then
  20.             returned='a'
  21.             break
  22.         end
  23.         for k,v in pairs(chars) do
  24.             if tChars[at]==v and k~=#chars then
  25.                 tChars[at]=chars[k+1]
  26.                 looping=0
  27.                 break
  28.             elseif tChars[at]==v and k==#chars then
  29.                 tChars[at]=chars[1]
  30.             end
  31.         end
  32.     end
  33.     local returned=returned or ''
  34.     for k,v in pairs(tChars) do
  35.         returned=returned..v
  36.     end
  37.     return returned
  38. end
  39. --- Thank Kaos for the code above ---
  40.  
  41. local keycode='a'
  42. print("Rednet Brute forcer v1.0")
  43. for k,v in pairs( rs.getSides() ) do rednet.open(v) end
  44. write("Enter ID: ")
  45. id = tonumber(read())
  46. print("\nEnter Message")
  47. print("#pass will be replaced with the bruted text.")
  48. print("--------------------------------------------\n")
  49. print("repeat")
  50. write("  rednet.send(" ..id.. ", \"")
  51. local _,y = term.getCursorPos()
  52. message = read()
  53. term.setCursorPos(1,y)
  54. term.clearLine()
  55. print("  rednet.send(" ..id.. ", \"" ..message.. "\")")
  56.  
  57. write("  sleep(tonumber(")
  58. sleeper = read()
  59. term.setCursorPos(1,y+1)
  60. term.clearLine()
  61. print("  sleep(tonumber(" ..sleeper.. "))")
  62.  
  63. write("until message == ")
  64. endMessage = read()
  65. print("\n--------------------------------------------\nSending...")
  66. local messages = 1
  67.  
  68. local x,y = term.getCursorPos()
  69. write("Sent: " ..messages)
  70.  
  71. if string.lower(sleeper) == "insane" then
  72.     vxTimer = os.startTimer(tonumber(0))
  73.     while true do
  74.         for i=1, 300 do
  75.             local moderatedMessage = string.gsub(message, "#pass", keycode)
  76.             rednet.send(id, moderatedMessage)
  77.             local event, tID, tMessage = os.pullEvent()
  78.             if event == "timer" and tID == vxTimer then
  79.                 keycode=cyclechar(keycode)
  80.                 vxTimer = os.startTimer(tonumber(0))
  81.             elseif tMessage == endMessage then
  82.                 print("Complete! ")
  83.                 print("Password: " ..keycode)
  84.                 break
  85.             end
  86.             term.setCursorPos(x,y)
  87.             term.clearLine()
  88.             messages = messages+1
  89.             print("Sent: " ..messages.. " - Insane mode ON")
  90.             write("Currently: " ..keycode)
  91.         end
  92.        
  93.         sleep(0)
  94.     end
  95. else
  96.     vxTimer = os.startTimer(tonumber(sleeper))
  97.     while true do
  98.         local moderatedMessage = string.gsub(message, "#pass", keycode)
  99.         rednet.send(id, moderatedMessage)
  100.         local event, tID, tMessage = os.pullEvent()
  101.         if event == "timer" and tID == vxTimer then
  102.             keycode=cyclechar(keycode)
  103.             vxTimer = os.startTimer(tonumber(sleeper))
  104.         elseif tMessage == endMessage then
  105.             print("Complete! ")
  106.             print("Password: " ..keycode)
  107.             break
  108.         end
  109.         term.setCursorPos(x,y)
  110.         term.clearLine()
  111.         messages = messages+1
  112.         print("Sent: " ..messages)
  113.         write("Currently: " ..keycode)
  114.     end
  115. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement