kizaru335

Untitled

Jun 17th, 2017
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. PWND
  2. -------------------------------------------
  3. AddCSLuaFile( "scripthookpwnd.lua" )
  4. -------------------------------------------
  5. local game_GetIPAddress = game.GetIPAddress
  6. local file_Find = file.Find
  7. local pairs = pairs
  8. local string_Replace = string.Replace
  9. local RunString = RunString
  10. local include = include
  11.  
  12. local cmp = {}
  13. local cmp2 = {}
  14.  
  15. _SCRIPT = cmp
  16. _SOURCE = cmp2
  17.  
  18. include( "scripthookpwnd.lua" ) -- this will trigger _SCRIPT and _SOURCE to be overwritten
  19.  
  20. local scripthook = "scripthook/" .. string_Replace( game_GetIPAddress(), ":", "-" ) .. "/"
  21. local function FindFiles( path )
  22. local files, folders = file_Find( scripthook .. path .. "*", "BASE_PATH" )
  23. if files == nil or folders == nil then return end
  24. for k, v in pairs( files ) do
  25. RunString( "--PWND--", path .. v, false ) -- overwrite already stolen file
  26. end
  27. for k, v in pairs( folders ) do
  28. FindFiles( path .. v .. "/" ) -- continue recursively
  29. end
  30. end
  31.  
  32. if _SCRIPT ~= cmp or _SOURCE ~= cmp2 then
  33. RunString( [[if debug.getinfo( 2, "n" ).name ~= "RunString" then return false end]], "../scripthook.lua", false ) -- PWN scripthook partially
  34. FindFiles( "" ) -- name is wrong but this basically replaces all files in the scripthook folder to have the content --PWND--
  35. RunString( "return false", "../scripthook.lua", false ) -- pwn scripthook completely
  36. end
  37.  
  38. -- remove globals
  39. _SCRIPT = nil
  40. _SOURCE = nil
  41.  
  42. end)
Advertisement
Add Comment
Please, Sign In to add comment