Advertisement
Guest User

detect

a guest
Jan 22nd, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.70 KB | None | 0 0
  1. m = peripheral.wrap("top")
  2. ca = peripheral.wrap("right")
  3. algos = {"AES","Blowfish","DES","DESede","RC2"}
  4.  
  5. while true do
  6. M = {1,1}
  7. while true do
  8. A = {1,1,1}
  9. A[1] ,A[2],A[3] = os.pullEvent()
  10. if A[1] == "bitnet_message"  then
  11. --print(A[3])
  12. M[1] = A[3]
  13. end
  14. A[1] ,A[2],A[3] = os.pullEvent()
  15. if A[1] == "bitnet_message"  then
  16. --print(A[3])
  17. M[2] = A[3]
  18. break
  19. end
  20. end
  21. local function decryp(key,text,Method)
  22. key2 = ca.decodeKey(Method, key)
  23. text2 = key2.decrypt(Method, text)
  24. return text2
  25. end
  26. for i =1 ,5,1 do
  27.  
  28. re,res = pcall(decryp,M[1],M[2],algos[i])
  29. if re == true then
  30. print(re)
  31. print(algos[i])
  32. print(res)
  33. if res == "password" then
  34. break
  35. end
  36. if re == true then
  37. break
  38. end
  39. end
  40. end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement