Advertisement
Guest User

idlist

a guest
Jan 10th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.49 KB | None | 0 0
  1. local bool rep = false
  2. local label = os.getComputerLabel()
  3. local id = os.getComputerID()
  4. local h = fs.open("/disk/data", "a")
  5. local b = fs.open("/disk/data", "r")
  6. local r = b.readAll()
  7. local r2 = b.readLine()
  8. local bool existing = false
  9. local elabel = encrypt(label,"rofl")
  10. local eid = encrypt(id,"rofl")
  11. local encrypted = eid..elabel
  12. local idlabel = id.." "..label
  13.  
  14. print("[1] Normal Usage")
  15. print("[2] Decryption")
  16. input2 = read()
  17. if input2 == "1" then
  18.  
  19. print("Warning! Do not use numbers in labels!")
  20. print("Continue?  Y/N")
  21. input = read()
  22.  
  23. if input == "Y" or input == "y" then
  24.  
  25. if string.find (r, encrypt(label,"rofl")) or string.find (r, encrypt(id,"rofl")) then
  26. existing = true
  27. end
  28.  
  29.  
  30. if label ~= nil and existing ~= true then
  31. local text = encrypted
  32. h.writeLine(text)
  33. h.close()
  34.  
  35. elseif label == nil then
  36.  
  37. print("Please add a label.")
  38.  
  39. elseif existing == true then
  40.  
  41. print("Computer already on file.")
  42. else
  43. print ("Unknown Error")
  44.  
  45. end
  46. end
  47. if input2 ~= "1" then
  48. print("Unknown Error")
  49. -- This error code never triggers, so the if statement always fails. Why?
  50. printdec()
  51.  
  52. end
  53.  
  54. if decrypt(r,"rofl") == encrypted then
  55. print("Error Decrypting")
  56. -- This dosen't trigger either.
  57. end
  58. end
  59.  
  60. function printdec()
  61. -- This message dosen't print.
  62. print("Decrypting..")
  63. while rep == true do
  64. local t = r2
  65.  
  66. if t == nil then
  67. rep = false
  68. else
  69. print(decrypt(t,"rofl"))
  70. end
  71. end
  72. end
  73.  
  74. -- Had to do all this because print(decrypt(r,"rofl")) wouldn't decrypt properly.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement