Advertisement
SneakySquid

Function Pointer Shit

Apr 4th, 2019
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.26 KB | None | 0 0
  1. -- just this https://github.com/ExtReMLapin/lua_soft_cpp_detour_finders
  2. -- but not shitcode
  3.  
  4. local function GetPointer(obj)
  5.     return string.format("%p", obj)
  6. end
  7.  
  8.  
  9. local BaseAddr = GetPointer(_G)
  10.  
  11.  
  12. print(string.format("Using _G (%d) as the base.", BaseAddr))
  13.  
  14.  
  15. print("HTTP:", BaseAddr - GetPointer(HTTP))
  16. print("RunString:", BaseAddr - GetPointer(RunString))
  17.  
  18.  
  19. print("print:", BaseAddr - GetPointer(print))
  20. print("tostring:", BaseAddr - GetPointer(tostring))
  21. print("debug.getinfo:", BaseAddr - GetPointer(debug.getinfo))
  22.  
  23.  
  24. --[[
  25.     -- Original:
  26.     Using _G (568660800) as the base.
  27.     HTTP:   -264193624
  28.     RunString:  -264191768
  29.     print:  -22344
  30.     tostring:   -21856
  31.     debug.getinfo:  -30376
  32.  
  33.  
  34.     -- Retry:
  35.     Using _G (268374848) as the base.
  36.     HTTP:   -127312
  37.     RunString:  -125456
  38.     print:  -22344
  39.     tostring:   -21856
  40.     debug.getinfo:  -30376
  41.  
  42.  
  43.     -- Server Restart:
  44.     Using _G (502862656) as the base.
  45.     HTTP:   -235357784
  46.     RunString:  -235355928
  47.     print:  -22344
  48.     tostring:   -21856
  49.     debug.getinfo:  -30376
  50.  
  51.  
  52.     -- Game Restart:
  53.     Using _G (822809408) as the base.
  54.     HTTP:   -869976
  55.     RunString:  -868120
  56.     print:  -22344
  57.     tostring:   -21856
  58.     debug.getinfo:  -30376
  59. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement