Advertisement
TheIncgi

ReAuth Script

Aug 7th, 2019
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.01 KB | None | 0 0
  1. getSettings().luajava = getSettings().luajava or {}
  2. getSettings().luajava.allowPrivateAccess = true
  3. getSettings().save()
  4.  
  5. local function getHiddenMethod( class, name )
  6.   log("&dArg:")
  7.   log(class)
  8.   local methods = class:getClass():getMethods()
  9.   for i,m in pairs(methods) do
  10.     if m:getName() == name then
  11.       m:setAccessible(true)
  12.       return m
  13.     end
  14.   end
  15.   return nil
  16. end
  17.  
  18.  
  19. local Secure = luajava.bindClass("technicianlp.reauth.Secure")
  20. if not Secure then log("Unable to bind &b&BReAuth&f class for login. &7Is it installed?") return end
  21. --log("Reauth: "..tostring(Secure))
  22. --log("SessionValid: "..tostring(Secure:SessionValid()))
  23. --log("Login: "..tostring(Secure.login))
  24.  
  25. local function login(user, pass)
  26.   Secure:login(user, {string.byte(pass, 1, #pass)})
  27.   return Secure:SessionValid()
  28. end
  29.  
  30. if login(
  31.     "", --username/email
  32.     "", --password, consider using prompt in game, or some other method, plaintext is the least secure
  33.   ) then
  34.   log("Login Good")
  35. else
  36.   log"Login fail'd"
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement