Advertisement
cobra_tomtrein

crypto

Jul 24th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. key2 = {}
  2.  
  3. change = function(letter)
  4. char = 0
  5. for i=1, #key2 do
  6. if letter == key2[i] then
  7. char = i + 34
  8. if char < #key2 then
  9. char = char - #key2
  10. end
  11. return key2[char]
  12. end
  13. end
  14. end
  15.  
  16.  
  17. print("file:")
  18. file = fs.open(read(), "r")
  19. reading = true
  20. linenum = 0
  21. filestring
  22. while reading == true do
  23. curline = file.readLine()
  24. if linenum == 0 then
  25. filestring = curline
  26. elseif file.readLine() == nil then
  27. reading = false
  28. else
  29. filestring = filestring.."&"..curline
  30. end
  31. end
  32. file.close()
  33.  
  34.  
  35. shell.run("delete", "key")
  36. shell.run("pastebin", "get", "0ZGDdCwk", "key")
  37. key = fs.open("key", "r")
  38. reading = true
  39. while reading == true do
  40. curline = key.readLine()
  41. if curline == nil then
  42. reading = false
  43. else
  44. table.insert(key2, curline)
  45. end
  46. end
  47.  
  48. for a = 1, #filestring do
  49. print(change(string.sub(filestring, a,a)))
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement