svennp

CC webcontrolled computer

Apr 10th, 2013
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. sleepytime = 2
  2.  
  3. print("connect to webpage on http://sp.svennp.com/ccontrol.php?id="..os.getComputerID())
  4. while true do
  5.     kitten = http.get("http://sp.svennp.com/ccontrol.php?mode=rd&id="..os.getComputerID()).readAll()
  6.     if kitten ~= nil then
  7.         f = fs.open(".cmdfile","w")
  8.         f.write(kitten)
  9.         f.close()
  10.         shell.run(".cmdfile")
  11.         fs.delete(".cmdfile")
  12.     end
  13.     sleep(sleepytime)
  14. end
Advertisement
Add Comment
Please, Sign In to add comment