Advertisement
Guest User

AIVD password check script - ropchain.com

a guest
Jul 10th, 2015
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.27 KB | None | 0 0
  1. #!/usr/bin/lua
  2.  
  3. --
  4. -- password checker
  5. --
  6.  
  7. function fa( x )
  8.     return ((x + 3141592653))
  9. end
  10.  
  11. function fb( x )
  12.     return ((3*x + 1732050808))
  13. end
  14.  
  15. function fc( x )
  16.     return ((5*x + 2236067977))
  17. end
  18.  
  19. function fd( x )
  20.     return ((7*x + 2645751311))
  21. end
  22.  
  23.  
  24. function check( input )
  25.     local t = {}
  26.     local fl = {}
  27.     local len = string.len(input)
  28.     local res = true
  29.  
  30.     print("Let me check your password...")
  31.  
  32.     if len ~= 16 then
  33.         print("Nope...")
  34.         return
  35.     end
  36.  
  37.  
  38.     fl[1] = fa
  39.     fl[2] = fb
  40.     fl[3] = fc
  41.     fl[4] = fd
  42.  
  43.     for i = 0,3 do
  44.         t[i+1] = 16777216*string.byte(input, 4*i+1)
  45.         t[i+1] = t[i+1] + 65536*string.byte(input, 4*i+2)
  46.         t[i+1] = t[i+1] + 256*string.byte(input, 4*i+3)
  47.         t[i+1] = t[i+1] + string.byte(input, 4*i+4)
  48.     end
  49.  
  50.     for j = 1,10000000 do
  51.         for i = 1, #t do
  52.             local fi = fl[(t[i] % 4)+1]
  53.             t[i] = fi(t[i]) % 4294967296
  54.         end
  55.     end
  56.  
  57.  
  58.     if t[1] ~= 2066590424 then
  59.         res = false
  60.     end
  61.  
  62.     if t[2] ~= 4241186467 then
  63.         res = false
  64.     end
  65.  
  66.     if t[3] ~= 2486763883 then
  67.         res = false
  68.     end
  69.  
  70.     if t[4] ~= 2743090029 then
  71.         res = false
  72.     end
  73.  
  74.     if res == true then
  75.         print("Congratulations!")
  76.     else       
  77.         print("Nope...")
  78.     end
  79.  
  80. end
  81.  
  82. --
  83. -- Main program
  84. --
  85.  
  86. io.write("Please enter the password: ")
  87. io.flush()
  88. pwd = io.read()
  89. check( pwd )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement