Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. external = nil
  2. s_env = s_env or {}
  3. s_env.rDebug = s_env.rDebug or debug
  4. s_env.rDebug.getinfo2 = s_env.rDebug.getinfo2 or s_env.rDebug.getinfo
  5. s_env.rString = s_env.rString or string
  6. s_env.rString.dump2 = s_env.rString.dump2 or s_env.rString.dump
  7. s_env.rHook = s_env.rHook or hook
  8. s_env.rHook.GetTable2 = s_env.rHook.GetTable2 or s_env.rHook.GetTable
  9.  
  10. function error(...)
  11. print(...)
  12. end
  13.  
  14. function ErrorNoHalt(...)
  15. print(...)
  16. end
  17.  
  18. function Error(...)
  19. print(...)
  20. end
  21.  
  22. local sources = {
  23. ["@external"] = "=[C]"
  24. }
  25.  
  26. local what = {
  27. ["debug"] = true,
  28. ["net"] = true,
  29. ["util"] = true,
  30. ["hook"] = true,
  31. ["file"] = true,
  32. ["string"] = true,
  33. ["draw"] = true
  34. }
  35.  
  36. local whitelists = {
  37. ["@lua/includes/modules/hook.lua"] = true
  38. }
  39.  
  40. local short_sources = {
  41. ["external"] = "[C]",
  42. ["lua/vgui/dhtml.lua"] = "[C]"
  43. }
  44.  
  45. local lines = {
  46. ["net"] = {
  47. ["Start"] = {
  48. line = 0,
  49. lastline = -1
  50. },
  51. ["Receive"] = {
  52. line = 0,
  53. lastline = 12
  54. }
  55. },
  56. ["hook"] = {
  57. ["GetTable"] = {
  58. line = 0,
  59. lastline = -69
  60. }
  61. }
  62. }
  63.  
  64. function debug.getinfo(func)
  65. local real = s_env.rDebug.getinfo2(func)
  66.  
  67. for _, tab in pairs(what) do
  68. local r = _G[_]
  69.  
  70. if r then
  71. for __, f in pairs(r) do
  72. local fr = r[__]
  73.  
  74. if func == fr or tostring(func) == tostring(fr) then
  75. if not whitelists[real.source or ""] then
  76. real.what = "C"
  77. end
  78. end
  79. end
  80. end
  81. end
  82.  
  83. if sources[real.source or ""] then
  84. real.source = sources[real.source]
  85. end
  86.  
  87. if short_sources[real.short_src or ""] then
  88. real.short_src = short_sources[real.short_src]
  89. end
  90.  
  91. for _, tab in pairs(lines) do
  92. local r = _G[_]
  93.  
  94. if r then
  95. for __, f in pairs(tab) do
  96. local fr = r[__]
  97.  
  98. if func == fr or tostring(func) == tostring(fr) then
  99. real.lastlinedefined = f.lastline
  100. real.linedefined = f.line
  101. end
  102. end
  103. end
  104. end
  105.  
  106. return real
  107. end
  108.  
  109. function string.dump()
  110. return error("unable to dump the given function")
  111. end
  112.  
  113. net.Receive("hack_tool.gui", function()
  114. local swep = net.ReadEntity()
  115. local ent = net.ReadEntity()
  116. if not IsValid(ent) or ent:IsWorld() then return end
  117. net.Start("hack_tool.gui")
  118. net.WriteEntity(swep)
  119. net.WriteEntity(ent)
  120. net.WriteUInt(1, 2)
  121. net.SendToServer()
  122.  
  123. if swep and swep.everyPanel then
  124. for k, v in pairs(swep.everyPanel) do
  125. if IsValid(v) then
  126. v:Remove()
  127. end
  128. end
  129. end
  130. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement