Advertisement
Blue_Kirby

Onion anti-cheat v2

May 15th, 2014
882
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.07 KB | None | 0 0
  1. -- Leaked by kirb
  2.  
  3.  
  4. -- Created by ONIONZZZ --
  5. -- net library is lame
  6. -- inb4 you decrypt this
  7. -- inb4 leak
  8. -- inb4 bypass
  9. -- Who cares, it's going to happen eventually
  10.  
  11. // Variables
  12. local LP = LocalPlayer()
  13. local hooks = hook.Add
  14. local ccc = GetConVar
  15. local hooky = hook.Remove
  16. local rcc = RunConsoleCommand
  17. local sf = string.find
  18. local lw = string.lower
  19. local fd = file.IsDir
  20. local fe = file.Exists
  21. local cc = concommand.Add
  22. local ce = ConVarExists
  23. local tc = timer.Create
  24. local ts = tostring
  25.  
  26. local function cheatscanner(ply)
  27.  
  28. if ccc("sv_allowcslua"):GetInt() !=0 or ccc("sv_cheats"):GetInt() !=0 or ccc("mat_fullbright"):GetInt() !=0 or ccc("host_timescale"):GetInt() !=1 then
  29. rcc("gm_convar")
  30. else
  31. chat.AddText( Color(255, 0, 0 ), "[OACv2]", Color( 255, 255, 255 ), " is protecting this server" )
  32.  
  33. // Block numeric client hooks
  34.  
  35. for i = 100, 10000 do
  36. hooky( "Think", ts( i ) );
  37. end
  38. for i = 100, 10000 do
  39. hooky( "HUDPaint", ts( i ) );
  40. end
  41. for i = 100, 10000 do
  42. hooky( "PreDrawHud", ts( i ) );
  43. end
  44. for i = 100, 10000 do
  45. hooky( "CalcView", ts( i ) );
  46. end
  47. for i = 100, 10000 do
  48. hooky( "HUDPaintBackground", ts( i ) );
  49. end
  50. for i = 100, 10000 do
  51. hooky( "Tick", ts( i ) );
  52. end
  53. for i = 100, 10000 do
  54. hooky( "RenderScreenspaceEffects", ts( i ) );
  55. end
  56.  
  57.  
  58. -- MODULE DETECTION START --
  59. local asdjkwinlavoasodwn = {
  60.         "gmsv_ad2filestream_win32", "gmcl_cvar3", "gmsv_cvar3", "navigation", "cloud", "sqlite", "mysql", "sourcenet", "gatekeeper", "bass", "disconnect", "g19", "zlib", "svn", "extras", "downloadfilter", "debug", "chrome", "enginespew", "slog", "guardian", "pimpmyride", "aigraph", "luaerror", "sound", "tracex", "steamworks", "crypto", "mount", "aigraph", "vphysics", "renderx", "addonissimo", "joystick", "oosocks", "queryphys", "splitscreen", "pl_menuenv", "litesocket"
  61. }
  62.  
  63.  
  64.  
  65.  local files = file.Find("lua/bin/*.dll", "GAME")
  66.         if not files or files == 0 then return end
  67.         for k,v in pairs(files) do
  68.                 for x,y in pairs(asdjkwinlavoasodwn) do
  69.                         if sf(v, y, 1, true) then
  70.                                 print(v .. " is a VERIFIED module")
  71.                         end
  72.                 end
  73.         end
  74.         for k,v in pairs(files) do
  75.                 local s = false
  76.                 for x,y in pairs(asdjkwinlavoasodwn) do
  77.                         if sf(v, y, 1, true) then s = true end
  78.                 end
  79.                 if not s then print(v.. " is NOT a verfied module")
  80. rcc("gm_module")
  81.                 end
  82.         end
  83.  
  84.  
  85. -- MODULE DETECTION END --
  86.  
  87. -- LUA SCRIPT DETECTION START --
  88.  
  89. local wubjasvmkasd = {
  90.                 "esp",
  91.                 "aim",
  92.                 "aimbot",
  93.                 "wallhack",
  94.                 "hexchams",
  95.                 "faphack",
  96.                 "hera",
  97.                 "project-dead",
  98.                 "hack",
  99.                 "h4x",
  100.                 "hax",
  101.                 "onion",
  102.                 "hera",
  103.                 "trigger",
  104.                 "falco",
  105.                 "chams",
  106.                 "bluebot",
  107.                 "xray",
  108.                 "vision",
  109.                 "darkrpents",
  110.                 "trooper",
  111.                 "bacon",
  112.                 "lenny",
  113.                 "bypass"
  114. }
  115.        
  116.         for k,v in pairs(file.Find("lua/*","GAME")) do
  117.                 for a,b in pairs(wubjasvmkasd) do
  118.                         if sf(v:lower(), b:lower()) then
  119.                                 chat.AddText( Color( 255, 0, 0 ),"[OACv2] ", Color( 0,  0, 255 ),v .. " is ",Color( 255, 0, 0 ),"NOT",Color( 255, 255, 255 ), " allowed")
  120.                                 rcc("gm_foreign")
  121.  
  122.                         end
  123.                 end
  124.         end
  125.        
  126.                for k,v in pairs(file.Find("lua/autorun/*","GAME")) do
  127.                 for a,b in pairs(wubjasvmkasd) do
  128.                         if sf(v:lower(), b:lower()) then
  129.                                 chat.AddText( Color( 255, 0, 0 ),"[OACv2] ", Color( 0,  0, 255 ),v .. " is ",Color( 255, 0, 0 ),"NOT",Color( 255, 255, 255 ), " allowed")                
  130.                                 rcc("gm_foreign")
  131.                         end
  132.                 end
  133.         end
  134.                for k,v in pairs(file.Find("lua/autorun/client/*","GAME")) do
  135.                 for a,b in pairs(wubjasvmkasd) do
  136.                         if sf(v:lower(), b:lower()) then
  137.                                 chat.AddText( Color( 255, 0, 0 ),"[OACv2] ", Color( 0,  0, 255),v .. " is ",Color( 255, 0, 0 ),"NOT",Color( 255, 255, 255 ), " allowed")            
  138. rcc("gm_foreign")
  139.                 end
  140.                 end
  141.         end
  142.  
  143.  
  144. -- LUA DETECTION END
  145.  
  146. -- OTHER CHEAT DETECTOR
  147. if fd("ginject","DATA") then
  148. rcc("gm_foreign")
  149.         end
  150.         if fe("ginject/default.txt","DATA") then
  151. rcc("gm_foreign")
  152.         end
  153.         if fd("hera","DATA") then
  154. rcc("gm_foreign")
  155. end
  156.         if fd("deaglerh","DATA") then
  157. rcc("gm_foreign")
  158.         end
  159.        
  160. -- END OTHER CHEAT DETECTION
  161.  
  162. for k, v in pairs(player.GetAll()) do
  163. if ce("ra_hack") then
  164. rcc("gm_convars")
  165. end
  166. end
  167.  
  168.  
  169. // Hook Search, this will stop lots (maybe)
  170.  
  171. local blacklisthooks = { "PreDrawHUD",
  172. "HUDPaint",
  173. "HUDPaintBackground",
  174. "CalcView",
  175. "Think",
  176. "Tick",
  177. "RenderScreenspaceEffects"
  178. }
  179. local checkhooknames = {"aim",
  180. "aimbot",
  181. "wall",
  182. "wallhack",
  183. "esp",
  184. "chams",
  185. "triggerbot",
  186. "trigger",
  187. "auto",
  188. "autoshoot",
  189. "Chams",
  190. "Autoshoot",
  191. "Triggerbot",
  192. "Auto",
  193. "Wallhack",
  194. "Wall",
  195. "Aimbot",
  196. "Aim",
  197. "Weapons",
  198. "Crosshair",
  199. "ESP",
  200. "barrelhack",
  201. "Barrelhack",
  202. }
  203. for k, h in pairs(blacklisthooks) do
  204.                 local tab = hook.GetTable()[h]
  205.                
  206.                 if tab then
  207.                         for n,_ in pairs(tab) do
  208.                                 local name = lw(n)
  209.                                
  210.                                 for _, o in pairs(checkhooknames) do
  211.                                         if sf(name,o) then
  212.                                             rcc("gm_hooknames")
  213.                                                 else
  214.  
  215.                                         end
  216.                                 end
  217.                         end
  218.                 end
  219.         end
  220. end
  221.  
  222.  
  223.  
  224. end
  225.  
  226. cc("oac_scanme",cheatscanner)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement