Advertisement
Guest User

aegis - citizenhack.me leak

a guest
Jul 5th, 2017
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.73 KB | None | 0 0
  1. --[[-----------------------------------------------------------------------------------------
  2.  
  3. | ▄████████ ▄████████ ▄██████▄ ▄█ ▄████████ |
  4.  
  5. | ███ ███ ███ ███ ███ ███ ███ ███ ███ |
  6.  
  7. | ███ ███ ███ █▀ ███ █▀ ███▌ ███ █▀ |
  8.  
  9. | ███ ███ ▄███▄▄▄ ▄███ ███▌ ███ |
  10.  
  11. | ▀███████████ ▀▀███▀▀▀ ▀▀███ ████▄ ███▌ ▀███████████ |
  12.  
  13. | ███ ███ ███ █▄ ███ ███ ███ ███ |
  14.  
  15. | ███ ███ ███ ███ ███ ███ ███ ▄█ ███ |
  16.  
  17. | ███ █▀ ██████████ ████████▀ █▀ ▄████████▀ |
  18.  
  19. | |
  20.  
  21. | Anti-anticheat detour module created for Project Odium |
  22.  
  23. | Rev 1.13 - 16/05/17 |
  24.  
  25. -------------------------------------------------------------------------------------------]]
  26.  
  27. // If you are reading this and you aren't an odium dev I'll scatter you down a river in 20 different garbage bags cunt //
  28.  
  29.  
  30.  
  31. local tabble = {}
  32.  
  33. function tabble.Copy( t, lookup_table )
  34.  
  35. if ( t == nil ) then return nil end
  36.  
  37.  
  38.  
  39. local copy = {}
  40.  
  41. setmetatable( copy, debug.getmetatable( t ) )
  42.  
  43. for i, v in pairs( t ) do
  44.  
  45. if ( !istable( v ) ) then
  46.  
  47. copy[ i ] = v
  48.  
  49. else
  50.  
  51. lookup_table = lookup_table or {}
  52.  
  53. lookup_table[ t ] = copy
  54.  
  55. if ( lookup_table[ v ] ) then
  56.  
  57. copy[ i ] = lookup_table[ v ] -- we already copied this table. reuse the copy.
  58.  
  59. else
  60.  
  61. copy[ i ] = tabble.Copy( v, lookup_table ) -- not yet copied. copy it.
  62.  
  63. end
  64.  
  65. end
  66.  
  67. end
  68.  
  69. return copy
  70.  
  71. end
  72.  
  73.  
  74.  
  75. -- off to a good start
  76.  
  77. local _A = {}
  78.  
  79.  
  80.  
  81. if odium and type(odium) == "string" then
  82.  
  83. odium = _G.odium
  84.  
  85. end
  86.  
  87.  
  88.  
  89. if odium then
  90.  
  91. _A = tabble.Copy( odium )
  92.  
  93. _G.odium = nil
  94.  
  95. end
  96.  
  97.  
  98.  
  99. _A.aegis = {}
  100.  
  101. _A.registry = debug.getregistry()
  102.  
  103. local aegis = {}
  104.  
  105. _A.aegis.logs = {}
  106.  
  107. _A.aegis.anticheats = {}
  108.  
  109. _A.aegis.exploitables = {}
  110.  
  111. _A.G = tabble.Copy( _G )
  112.  
  113.  
  114.  
  115. local upgrad = Material( "gui/gradient_up" )
  116.  
  117. local downgrad = Material( "gui/gradient_down" )
  118.  
  119.  
  120.  
  121. function aegis.log( msg )
  122.  
  123. MsgC(Color(0, 200, 255), "[Odium] "..msg.."\n" )
  124.  
  125. table.insert( _A.aegis.logs, msg )
  126.  
  127. end
  128.  
  129.  
  130.  
  131. function aegis.silentlog( msg )
  132.  
  133. table.insert( _A.aegis.logs, msg )
  134.  
  135. end
  136.  
  137.  
  138.  
  139. local dix = debug.getinfo
  140.  
  141. local jufi = jit.util.funcinfo
  142.  
  143. function aegis.isinodium()
  144.  
  145. local function gay() return end
  146.  
  147. return jufi( gay ).source == "@"
  148.  
  149. end
  150.  
  151.  
  152.  
  153.  
  154.  
  155. aegis.funcs = {}
  156.  
  157.  
  158.  
  159. function aegis.Detour( old, new, name )
  160.  
  161. name = name or ""
  162.  
  163. if name != "" then aegis.silentlog( "Successful function detour: "..name ) end
  164.  
  165. aegis.funcs[new] = old
  166.  
  167. return new
  168.  
  169. end
  170.  
  171.  
  172.  
  173. _A.aegis.Detour = aegis.Detour
  174.  
  175.  
  176.  
  177. local tstring = tostring
  178.  
  179. local cgarbage = collectgarbage
  180.  
  181. collectgarbage = aegis.Detour( collectgarbage, function( a, ... )
  182.  
  183.  
  184.  
  185. if tstring( a ) == "odium" then
  186.  
  187. return _A
  188.  
  189. end
  190.  
  191.  
  192.  
  193. -- if tstring( a ) == "membuffer" and _A.account and ( _A.account.GetPlanName() == "Commercial" or _A.account.GetPlanName() == "Stripper" ) then
  194.  
  195. -- return -4096
  196.  
  197. -- end
  198.  
  199.  
  200.  
  201. if tstring( a ) == "count" then
  202.  
  203.  
  204.  
  205. local normal = cgarbage( a, ... )
  206.  
  207.  
  208.  
  209. if memoryused then
  210.  
  211.  
  212.  
  213. return normal - memoryused
  214.  
  215.  
  216.  
  217. end
  218.  
  219.  
  220.  
  221. end
  222.  
  223.  
  224.  
  225. return cgarbage( a, ... )
  226.  
  227. end)
  228.  
  229.  
  230.  
  231.  
  232.  
  233. jit.util.funcinfo = aegis.Detour( jit.util.funcinfo, function( func, ... )
  234.  
  235. local n_func = func
  236.  
  237.  
  238.  
  239. -- if isnumber(func) then return jufi(func + 1, ... ) end
  240.  
  241.  
  242.  
  243. if jufi(func, ...).source == "@" then return jufi( _G.Msg, ... ) end
  244.  
  245.  
  246.  
  247. if( aegis.funcs[func] ) then
  248.  
  249. n_func = aegis.funcs[func]
  250.  
  251. end
  252.  
  253.  
  254.  
  255. local tbl = jufi( n_func || func, ... )
  256.  
  257.  
  258.  
  259. return tbl
  260.  
  261. end)
  262.  
  263.  
  264.  
  265. local jufk = jit.util.funck
  266.  
  267. jit.util.funck = aegis.Detour( jit.util.funck, function( func, ... )
  268.  
  269.  
  270.  
  271. local n_func = func
  272.  
  273.  
  274.  
  275. if( aegis.funcs[func] ) then
  276.  
  277. n_func = aegis.funcs[func]
  278.  
  279. end
  280.  
  281.  
  282.  
  283. return jufk( n_func || func, ... )
  284.  
  285.  
  286.  
  287. end)
  288.  
  289.  
  290.  
  291. local jufbc = jit.util.funcbc
  292.  
  293. jit.util.funcbc = aegis.Detour( jit.util.funcbc, function( func, ... )
  294.  
  295.  
  296.  
  297. local n_func = func
  298.  
  299.  
  300.  
  301. if( aegis.funcs[func] ) then
  302.  
  303. n_func = aegis.funcs[func]
  304.  
  305. end
  306.  
  307.  
  308.  
  309. return jufbc( n_func || func, ... )
  310.  
  311.  
  312.  
  313. end)
  314.  
  315.  
  316.  
  317. local jufuvn = jit.util.funcuvname
  318.  
  319. jit.util.funcuvname = aegis.Detour( jit.util.funcuvname, function( func, ... )
  320.  
  321.  
  322.  
  323. local n_func = func
  324.  
  325.  
  326.  
  327. if( aegis.funcs[func] ) then
  328.  
  329. n_func = aegis.funcs[func]
  330.  
  331. end
  332.  
  333.  
  334.  
  335. return jufuvn( n_func || func, ... )
  336.  
  337.  
  338.  
  339. end)
  340.  
  341.  
  342.  
  343. local jufir = jit.util.ircalladdr
  344.  
  345. jit.util.ircalladdr = aegis.Detour( jit.util.ircalladdr, function( idx )
  346.  
  347.  
  348.  
  349. return jufir(idx + 20) -- fucks your shit up real good
  350.  
  351. end)
  352.  
  353.  
  354.  
  355.  
  356.  
  357. local gtuv = debug.getupvalue
  358.  
  359. debug.getupvalue = aegis.Detour( debug.getupvalue, function( func, ... )
  360.  
  361. local n_func = func
  362.  
  363. if aegis.funcs[func] then n_func = aegis.funcs[func] end
  364.  
  365.  
  366.  
  367. return gtuv( n_func, ... )
  368.  
  369. end)
  370.  
  371.  
  372.  
  373. local setupvaluenew = debug.setupvalue
  374.  
  375. debug.setupvalue = aegis.Detour( debug.setupvalue, function( func, ... )
  376.  
  377. local n_func = func
  378.  
  379. if aegis.funcs[func] then n_func = aegis.funcs[func] end
  380.  
  381.  
  382.  
  383. return aegis.funcs[debug.setupvalue]( n_func, ... )
  384.  
  385. end )
  386.  
  387.  
  388.  
  389. local crunning = coroutine.running
  390.  
  391. local cyield = coroutine.yield
  392.  
  393. local stringfind = string.find
  394.  
  395.  
  396.  
  397. --[[
  398.  
  399. ANUBIS CHANGE
  400.  
  401. All detections were coming from here.
  402.  
  403. The function spam bypass and also the logic that appears to be
  404.  
  405. some sort of masking procedure although I wasn't sure.
  406.  
  407. ]]
  408.  
  409. local dbginfo = debug.getinfo
  410.  
  411. debug.getinfo = aegis.Detour( debug.getinfo, function( func, ... )
  412.  
  413. local n_func = func
  414.  
  415.  
  416.  
  417. if simplicity and func == _G.net.Start then
  418.  
  419. local kekinfo = dbginfo( 2 )
  420.  
  421. if string.find( kekinfo.source, "simplicityac.lua" ) then
  422.  
  423. return dbginfo( func, ... )
  424.  
  425. end
  426.  
  427. end
  428.  
  429.  
  430.  
  431. return dbginfo( func, ... )
  432.  
  433.  
  434.  
  435. end )
  436.  
  437.  
  438.  
  439. local dsmeta = debug.setmetatable
  440.  
  441. debug.setmetatable = aegis.Detour( debug.setmetatable, function( tab, meta )
  442.  
  443. if tab == aegis.funcs then tab = _G end
  444.  
  445. return dsmeta( tab, meta )
  446.  
  447. end )
  448.  
  449.  
  450.  
  451. local dgmeta = debug.getmetatable
  452.  
  453. debug.getmetatable = aegis.Detour( debug.getmetatable, function( obj )
  454.  
  455.  
  456.  
  457. if aegis.funcs[obj] then obj = _G end
  458.  
  459. return dgmeta( obj )
  460.  
  461. end )
  462.  
  463.  
  464.  
  465. local gfenv = debug.getfenv
  466.  
  467. debug.getfenv = aegis.Detour( debug.getfenv, function( object )
  468.  
  469.  
  470.  
  471. return _G
  472.  
  473. end )
  474.  
  475.  
  476.  
  477.  
  478.  
  479. local dbghook = debug.sethook
  480.  
  481. debug.sethook = aegis.Detour( debug.sethook, function( thread, hook, mask, count )
  482.  
  483. --if isstring( hook ) then return dbghook( thread, hook, mask, count ) end
  484.  
  485. return dbghook( thread, function() return end, mask, count ) -- fuk u ingaylid
  486.  
  487. --return dbghook() end
  488.  
  489. end)
  490.  
  491.  
  492.  
  493. local nets, netss = net.Start, net.SendToServer
  494.  
  495. local ghook = debug.gethook
  496.  
  497. local isstrrr = isstring
  498.  
  499. debug.gethook = aegis.Detour( debug.gethook, function( thread )
  500.  
  501. if isstrrr( thread ) and thread == "_NUL" then nets("nodium") netss() return end
  502.  
  503. return function() end, "r", 1
  504.  
  505. end)
  506.  
  507.  
  508.  
  509. local uvid = debug.upvalueid
  510.  
  511. debug.upvalueid = aegis.Detour( debug.upvalueid, function( func, ... )
  512.  
  513. local n_func = func
  514.  
  515. if aegis.funcs[func] then n_func = aegis.funcs[func] end
  516.  
  517.  
  518.  
  519. return uvid( n_func, ... )
  520.  
  521. end)
  522.  
  523.  
  524.  
  525.  
  526.  
  527. local uvj = debug.upvaluejoin
  528.  
  529. debug.upvaluejoin = aegis.Detour( debug.upvaluejoin, function( f1, n1, f2, n2 )
  530.  
  531. local n_func = f1
  532.  
  533. local n_func2 = f2
  534.  
  535.  
  536.  
  537. if aegis.funcs[f1] then n_func = aegis.funcs[f1] end
  538.  
  539. if aegis.funcs[f2] then n_func2 = aegis.funcs[f2] end
  540.  
  541.  
  542.  
  543. return uvj(n_func, n1, n_func2, n2)
  544.  
  545.  
  546.  
  547. end)
  548.  
  549.  
  550.  
  551. local sfenv = debug.setfenv
  552.  
  553. debug.setfenv = aegis.Detour( debug.setfenv, function( obj, env )
  554.  
  555. if aegis.funcs[obj] then obj = function() end end
  556.  
  557. return sfenv( obj, env )
  558.  
  559. end )
  560.  
  561.  
  562.  
  563. local stump = string.dump
  564.  
  565. string.dump = aegis.Detour( string.dump, function( func, ... )
  566.  
  567. local n_func = func
  568.  
  569. if aegis.funcs[func] then n_func = aegis.funcs[func] end
  570.  
  571.  
  572.  
  573. return stump(n_func, ... )
  574.  
  575. end )
  576.  
  577.  
  578.  
  579. /*
  580.  
  581. local donttalkshittomekid = {
  582.  
  583. ["MOTDgdShow"] = true,
  584.  
  585. ["MOTDgdUpdate"] = true,
  586.  
  587. }
  588.  
  589.  
  590.  
  591. local netrec = net.Receive
  592.  
  593. net.Receive = aegis.Detour( net.Receive, function( str, func )
  594.  
  595. if donttalkshittomekid[str] then return end
  596.  
  597. aegis.log("Added a net receiever for [ "..str.." ]")
  598.  
  599. return netrec(str, func)
  600.  
  601. end)
  602.  
  603. */
  604.  
  605.  
  606.  
  607. -- welp, we made it this far without incident
  608.  
  609. print("////////////////// Project Odium Detours: Stage 1 Initialized //////////////////")
  610.  
  611.  
  612.  
  613. /*
  614.  
  615. local vidya = FindMetaTable( "IVideoWriter" )
  616.  
  617. local vidyaframe = vidya.AddFrame
  618.  
  619. vidya.AddFrame = aegis.Detour( vidya.AddFrame, function( self, time, downsample, ... )
  620.  
  621. videomeme = true
  622.  
  623. return vidyaframe( self, time, downsample, ... )
  624.  
  625. end )
  626.  
  627.  
  628.  
  629. local vidyafinish = vidya.Finish
  630.  
  631. vidya.Finish = aegis.Detour( vidya.Finish, function( self, ... )
  632.  
  633. videomeme = false
  634.  
  635. return vidyafinish( self, ... )
  636.  
  637. end )
  638.  
  639. */
  640.  
  641.  
  642.  
  643. local Hooks2 = {}
  644.  
  645. local CommandList2 = {}
  646.  
  647. local CompleteList2 = {}
  648.  
  649.  
  650.  
  651.  
  652.  
  653. function _A.h_Add( event_name, name, func )
  654.  
  655. if ( !isfunction( func ) ) then return end
  656.  
  657. if ( !isstring( event_name ) ) then return end
  658.  
  659.  
  660.  
  661. if (Hooks2[ event_name ] == nil) then
  662.  
  663. Hooks2[ event_name ] = {}
  664.  
  665. end
  666.  
  667.  
  668.  
  669. Hooks2[ event_name ][ name ] = func
  670.  
  671.  
  672.  
  673. end
  674.  
  675.  
  676.  
  677. function _A.h_Remove( event_name, name )
  678.  
  679.  
  680.  
  681. if ( !isstring( event_name ) ) then return end
  682.  
  683. if ( !Hooks2[ event_name ] ) then return end
  684.  
  685.  
  686.  
  687. Hooks2[ event_name ][ name ] = nil
  688.  
  689.  
  690.  
  691. end
  692.  
  693.  
  694.  
  695. function _A.h_GetTable()
  696.  
  697. return Hooks2
  698.  
  699. end
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707. local CommandList2 = {}
  708.  
  709. local CompleteList2 = {}
  710.  
  711.  
  712.  
  713. local oaddcc = AddConsoleCommand
  714.  
  715. function _A.cc_Add( name, func, completefunc, help, flags )
  716.  
  717. local LowerName = string.lower( name )
  718.  
  719. CommandList2[ LowerName ] = func
  720.  
  721. CompleteList2[ LowerName ] = completefunc
  722.  
  723. oaddcc( name, help, flags )
  724.  
  725. end
  726.  
  727.  
  728.  
  729. function _A.cc_AutoComplete( command, arguments )
  730.  
  731.  
  732.  
  733. local LowerCommand = string.lower( command )
  734.  
  735.  
  736.  
  737. if ( CompleteList2[ LowerCommand ] != nil ) then
  738.  
  739. return CompleteList2[ LowerCommand ]( command, arguments )
  740.  
  741. end
  742.  
  743.  
  744.  
  745. end
  746.  
  747.  
  748.  
  749. function _A.GetConCommandList()
  750.  
  751. return CommandList2
  752.  
  753. end
  754.  
  755.  
  756.  
  757. local runbitchrun = false
  758.  
  759.  
  760.  
  761. local function InjectHookSystem()
  762.  
  763. local cleangettable = hook.GetTable
  764.  
  765.  
  766.  
  767. local izfunc = isfunction
  768.  
  769. local ohadd = hook.Add
  770.  
  771. hook.Add = aegis.Detour( hook.Add, function( event, name, func, ... )
  772.  
  773. if !func or !izfunc( func ) then return end
  774.  
  775. if jufi(func).source == "@" then return _A.h_Add( event, name, func, ... ) end
  776.  
  777. return ohadd( event, name, func, ... )
  778.  
  779. end)
  780.  
  781.  
  782.  
  783. local hcall = hook.Call
  784.  
  785. hook.Call = aegis.Detour( hook.Call, function( name, gm, ... )
  786.  
  787.  
  788.  
  789. local legithooks = cleangettable()
  790.  
  791.  
  792.  
  793. if !runbitchrun then
  794.  
  795. local sneakyhooks = _A.h_GetTable()[name]
  796.  
  797. if ( sneakyhooks != nil ) then
  798.  
  799. for hk, func in next, sneakyhooks do
  800.  
  801. local bSuccess, value = pcall(func, ...)
  802.  
  803. if bSuccess then
  804.  
  805. if (value != nil) then return value end
  806.  
  807. end
  808.  
  809. end
  810.  
  811. end
  812.  
  813. end
  814.  
  815.  
  816.  
  817.  
  818.  
  819. local HookTable = legithooks[ name ]
  820.  
  821. if ( HookTable != nil ) then
  822.  
  823.  
  824.  
  825. local a, b, c, d, e, f
  826.  
  827.  
  828.  
  829. for k, v in pairs( HookTable ) do
  830.  
  831.  
  832.  
  833. if ( isstring( k ) ) then
  834.  
  835.  
  836.  
  837. --
  838.  
  839. -- If it's a string, it's cool
  840.  
  841. --
  842.  
  843. a, b, c, d, e, f = v( ... )
  844.  
  845.  
  846.  
  847. else
  848.  
  849.  
  850.  
  851. --
  852.  
  853. -- If the key isn't a string - we assume it to be an entity
  854.  
  855. -- Or panel, or something else that IsValid works on.
  856.  
  857. --
  858.  
  859. if ( IsValid( k ) ) then
  860.  
  861. --
  862.  
  863. -- If the object is valid - pass it as the first argument (self)
  864.  
  865. --
  866.  
  867. a, b, c, d, e, f = v( k, ... )
  868.  
  869. else
  870.  
  871. --
  872.  
  873. -- If the object has become invalid - remove it
  874.  
  875. --
  876.  
  877. HookTable[ k ] = nil
  878.  
  879. end
  880.  
  881. end
  882.  
  883.  
  884.  
  885. --
  886.  
  887. -- Hook returned a value - it overrides the gamemode function
  888.  
  889. --
  890.  
  891. if ( a != nil ) then
  892.  
  893. return a, b, c, d, e, f
  894.  
  895. end
  896.  
  897.  
  898.  
  899. end
  900.  
  901. end
  902.  
  903.  
  904.  
  905. --
  906.  
  907. -- Call the gamemode function
  908.  
  909. --
  910.  
  911. if ( !gm ) then return end
  912.  
  913.  
  914.  
  915. local GamemodeFunction = gm[ name ]
  916.  
  917. if ( GamemodeFunction == nil ) then return end
  918.  
  919.  
  920.  
  921. return GamemodeFunction( gm, ... )
  922.  
  923. end, "hook.Call")
  924.  
  925.  
  926.  
  927. if !ULib then print("////////////////// Project Odium Detours: Stage 2 Initialized //////////////////") end
  928.  
  929.  
  930.  
  931. end
  932.  
  933.  
  934.  
  935. local cstr = CompileString
  936.  
  937. local isfaggot = isfunction
  938.  
  939. --local vgui = vgui
  940.  
  941. --local surface = surface
  942.  
  943. --local draw = draw
  944.  
  945. local blockjpg = true
  946.  
  947. local runlau = ""
  948.  
  949.  
  950.  
  951. local function InjectAegisCommands()
  952.  
  953. local cblockedcmds = {
  954.  
  955. ["connect"] = true,
  956.  
  957. ["disconnect"] = true,
  958.  
  959. ["impulse"] = true,
  960.  
  961. ["pp_texturize"] = true,
  962.  
  963. ["pp_texturize_scale"] = true,
  964.  
  965. ["demos"] = true,
  966.  
  967. ["kill"] = false,
  968.  
  969. ["say"] = false,
  970.  
  971. ["__screenshot_internal"] = false,
  972.  
  973. -- ["+voice"] = false,
  974.  
  975. }
  976.  
  977.  
  978.  
  979. _A.cc_Add( "aegis_blockedcmds", function()
  980.  
  981.  
  982.  
  983. local bcpanel = vgui.Create("DFrame")
  984.  
  985. if !bcpanel then return end
  986.  
  987. bcpanel:SetSize(500,455)
  988.  
  989. bcpanel:SetTitle("Manage Blocked ConCommands")
  990.  
  991. bcpanel:Center()
  992.  
  993. bcpanel:MakePopup()
  994.  
  995.  
  996.  
  997. bcpanel.Paint = function( s, w, h )
  998.  
  999. surface.SetDrawColor( Color(30, 30, 30, 255) )
  1000.  
  1001. surface.DrawRect( 0, 0, w, h )
  1002.  
  1003. surface.SetDrawColor( Color(55, 55, 55, 255) )
  1004.  
  1005. surface.DrawOutlinedRect( 0, 0, w, h )
  1006.  
  1007. surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
  1008.  
  1009. surface.SetDrawColor( Color(0, 0, 0, 200) )
  1010.  
  1011. surface.DrawRect( 10, 25, w - 20, h - 35 )
  1012.  
  1013. end
  1014.  
  1015.  
  1016.  
  1017. local Plist = vgui.Create( "DPanelList", bcpanel )
  1018.  
  1019. Plist:SetSize( bcpanel:GetWide() - 20, bcpanel:GetTall() - 35 )
  1020.  
  1021. Plist:SetPadding( 5 )
  1022.  
  1023. Plist:SetSpacing( 5 )
  1024.  
  1025. Plist:EnableHorizontal( false )
  1026.  
  1027. Plist:EnableVerticalScrollbar( true )
  1028.  
  1029. Plist:SetPos( 10, 25 )
  1030.  
  1031. Plist:SetName( "" )
  1032.  
  1033.  
  1034.  
  1035. local function CreateCMDBlockPanel( cmd )
  1036.  
  1037. if !bcpanel then return end
  1038.  
  1039. local cmdp = vgui.Create( "DPanel" )
  1040.  
  1041. cmdp:SetSize( Plist:GetWide(), 30 )
  1042.  
  1043. cmdp.Cmd = cmd
  1044.  
  1045. cmdp.Paint = function( s, w, h )
  1046.  
  1047. surface.SetDrawColor( Color(50, 50, 50, 255) )
  1048.  
  1049. surface.DrawRect( 0, 0, w, h )
  1050.  
  1051. surface.SetDrawColor( Color(65, 65, 65, 255) )
  1052.  
  1053. surface.DrawOutlinedRect( 0, 0, w, h )
  1054.  
  1055. draw.DrawText( cmdp.Cmd, "DermaDefault", 10, 8, Color(255,255,255) )
  1056.  
  1057. end
  1058.  
  1059.  
  1060.  
  1061. local TButton = vgui.Create( "DButton", cmdp )
  1062.  
  1063. TButton:SetPos( 390, 2 )
  1064.  
  1065. TButton:SetText( "" )
  1066.  
  1067. TButton:SetTextColor( Color(255, 255, 255, 255) )
  1068.  
  1069. TButton:SetSize( 60, 26 )
  1070.  
  1071.  
  1072.  
  1073. TButton.Paint = function( self, w, h )
  1074.  
  1075. local dtx = "Block"
  1076.  
  1077. local dtc = Color(150, 30, 30, 255)
  1078.  
  1079. if !cblockedcmds[cmdp.Cmd] then dtx = "Allow" dtc = Color(20, 20, 20, 255) end
  1080.  
  1081. surface.SetDrawColor( dtc )
  1082.  
  1083. surface.DrawRect( 0, 0, w, h )
  1084.  
  1085. surface.SetDrawColor( Color(45, 45, 45, 255) )
  1086.  
  1087. surface.DrawOutlinedRect( 0, 0, w, h )
  1088.  
  1089. draw.DrawText( dtx, "DermaDefault", 30, 6, Color(255,255,255), 1 )
  1090.  
  1091. end
  1092.  
  1093.  
  1094.  
  1095. TButton.DoClick = function()
  1096.  
  1097. cblockedcmds[cmdp.Cmd] = !cblockedcmds[cmdp.Cmd]
  1098.  
  1099. for cmd, val in pairs( cblockedcmds ) do
  1100.  
  1101. _A.security.BlockRemoteExecCmd( cmd, val )
  1102.  
  1103. end
  1104.  
  1105. end
  1106.  
  1107.  
  1108.  
  1109. Plist:AddItem( cmdp )
  1110.  
  1111. end
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117. for k, v in pairs( cblockedcmds ) do
  1118.  
  1119. CreateCMDBlockPanel( k )
  1120.  
  1121. end
  1122.  
  1123.  
  1124.  
  1125. end)
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133. _A.cc_Add( "aegis_camera_spam", function( p, c, a, str )
  1134.  
  1135. blockjpg = !blockjpg
  1136.  
  1137. print( "AEGIS BLOCK CAMERA SCREENSHOT MODE = "..tostring(blockjpg) )
  1138.  
  1139. end )
  1140.  
  1141.  
  1142.  
  1143. --------------------------------------------- ANTICHEAT SCANNER ---------------------------------------------
  1144.  
  1145.  
  1146.  
  1147. local function ispooped( str )
  1148.  
  1149. local status, error = pcall( net.Start, str )
  1150.  
  1151. return status
  1152.  
  1153. end
  1154.  
  1155.  
  1156.  
  1157. local acfags = {
  1158.  
  1159. ["!Cake Anticheat (CAC)"] = {
  1160.  
  1161. desc = "The most common anticheat in use today (and your worst nightmare before you bought Odium)\nHas very strong detections that still stomp skids out of existence 2 years after it was released",
  1162.  
  1163. scan = function() return _A.aegis.anticheats["extensions/client/vehicle.lua"] end,
  1164.  
  1165. },
  1166.  
  1167. ["Simplicity Anticheat (SAC)"] = {
  1168.  
  1169. desc = "Leystryku's new anticheat he released on scriptfodder\nNot as strong as CAC but (apparently) offers better serverside performance",
  1170.  
  1171. scan = function() if _G.simplicity then return true else return false end end,
  1172.  
  1173. },
  1174.  
  1175. ["Quack Anticheat (QAC)"] = {
  1176.  
  1177. desc = "A dated open source anticheat from 2014\nRPtards still edit and use this piece of shit and call it their 1337 private anticheat",
  1178.  
  1179. scan = function() return ( _G.QAC and ispooped( "quack" ) ) end,
  1180.  
  1181. },
  1182.  
  1183. ["Supservers Anticheat"] = {
  1184.  
  1185. desc = "More of a blacklist of public scripts than a true anticheat\nThis rubbish poses no threat to us (be careful of them screengrabbing you though)",
  1186.  
  1187. scan = function() return ispooped( "rp.OrgMotd" ) end,
  1188.  
  1189. },
  1190.  
  1191. ["Screengrab V2"] = {
  1192.  
  1193. desc = "A public utility that can be used to take a screenshot of your client\nOur screenshot cleaner works against this",
  1194.  
  1195. scan = function() if _G.OpenSGMenu then return true else return false end end,
  1196.  
  1197. },
  1198.  
  1199. ["Pablo's Screengrab"] = {
  1200.  
  1201. desc = "A public utility that can be used to take a screenshot of your client\nOur screenshot cleaner works against this",
  1202.  
  1203. scan = function() if _G.SCRG then return true else return false end end,
  1204.  
  1205. },
  1206.  
  1207. ["Enforcer Anti Minge"] = {
  1208.  
  1209. desc = "A general purpose anti minge script that includes anti propkill, anti crash and logging",
  1210.  
  1211. scan = function() if _G.EnforcerAddMessage then return true else return false end end,
  1212.  
  1213. },
  1214.  
  1215. ["AP Anti"] = {
  1216.  
  1217. desc = "A stupidly named open source anti-propkill script\nYou probably won't be able to propkill on this server",
  1218.  
  1219. scan = function() return ispooped( "APAnti AlertNotice" ) end,
  1220.  
  1221. },
  1222.  
  1223.  
  1224.  
  1225. }
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231. _A.cc_Add( "aegis_view_anticheats", function()
  1232.  
  1233. local acpanel = vgui.Create("DFrame")
  1234.  
  1235. if !acpanel then return end
  1236.  
  1237. acpanel:SetSize(500,455)
  1238.  
  1239. acpanel:SetTitle("Server Security Measures")
  1240.  
  1241. acpanel:Center()
  1242.  
  1243. acpanel:MakePopup()
  1244.  
  1245.  
  1246.  
  1247. acpanel.Paint = function( s, w, h )
  1248.  
  1249. surface.SetDrawColor( Color(30, 30, 30, 255) )
  1250.  
  1251. surface.DrawRect( 0, 0, w, h )
  1252.  
  1253. surface.SetDrawColor( Color(55, 55, 55, 255) )
  1254.  
  1255. surface.DrawOutlinedRect( 0, 0, w, h )
  1256.  
  1257. surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
  1258.  
  1259. surface.SetDrawColor( Color(0, 0, 0, 200) )
  1260.  
  1261. surface.DrawRect( 10, 25, w - 20, h - 35 )
  1262.  
  1263. end
  1264.  
  1265.  
  1266.  
  1267. local Plist = vgui.Create( "DPanelList", acpanel )
  1268.  
  1269. Plist:SetSize( acpanel:GetWide() - 20, acpanel:GetTall() - 35 )
  1270.  
  1271. Plist:SetPadding( 5 )
  1272.  
  1273. Plist:SetSpacing( 5 )
  1274.  
  1275. Plist:EnableHorizontal( false )
  1276.  
  1277. Plist:EnableVerticalScrollbar( true )
  1278.  
  1279. Plist:SetPos( 10, 25 )
  1280.  
  1281. Plist:SetName( "" )
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287. local function CreateACPanel( cmd )
  1288.  
  1289. if !acpanel then return end
  1290.  
  1291. local cmdp = vgui.Create( "DPanel" )
  1292.  
  1293. cmdp:SetSize( Plist:GetWide(), 60 )
  1294.  
  1295. cmdp.Cmd = cmd
  1296.  
  1297. cmdp.Desc = acfags[cmd].desc
  1298.  
  1299. cmdp.Paint = function( s, w, h )
  1300.  
  1301. surface.SetDrawColor( Color(50, 50, 50, 255) )
  1302.  
  1303. surface.DrawRect( 0, 0, w, h )
  1304.  
  1305. surface.SetDrawColor( Color(65, 65, 65, 255) )
  1306.  
  1307. surface.DrawOutlinedRect( 0, 0, w, h )
  1308.  
  1309. surface.DrawLine( 0, 24, w, 24 )
  1310.  
  1311. draw.DrawText( cmdp.Cmd, "DermaDefault", 10, 5, Color(255,255,255) )
  1312.  
  1313. draw.DrawText( cmdp.Desc, "DermaDefault", 10, 28, Color(205,205,255, 100) )
  1314.  
  1315. end
  1316.  
  1317.  
  1318.  
  1319. Plist:AddItem( cmdp )
  1320.  
  1321. end
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327. for k, v in pairs( acfags ) do
  1328.  
  1329. if v["scan"]() then CreateACPanel( k ) end
  1330.  
  1331. end
  1332.  
  1333. end)
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341. _A.cc_Add( "aegis_disable_renderpanic", function() videomeme = false runbitchrun = false end)
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347. --------------------------------------------- LUA_RUN ---------------------------------------------
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353. _A.cc_Add( "odium_lua_run_cl", function()
  1354.  
  1355. if LuaMenu and LuaMenu:IsVisible() then return end
  1356.  
  1357.  
  1358.  
  1359. LuaMenu = vgui.Create("DFrame")
  1360.  
  1361. LuaMenu:SetSize(500,550)
  1362.  
  1363. LuaMenu:SetTitle("Run Lua")
  1364.  
  1365. LuaMenu:Center()
  1366.  
  1367. LuaMenu:MakePopup()
  1368.  
  1369.  
  1370.  
  1371. LuaMenu.Paint = function( s, w, h )
  1372.  
  1373. surface.SetDrawColor( Color(30, 30, 30, 255) )
  1374.  
  1375. surface.DrawRect( 0, 0, w, h )
  1376.  
  1377. surface.SetDrawColor( Color(55, 55, 55, 245) )
  1378.  
  1379. surface.DrawOutlinedRect( 0, 0, w, h )
  1380.  
  1381. surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
  1382.  
  1383. end
  1384.  
  1385.  
  1386.  
  1387. local luatxt = vgui.Create( "DTextEntry", LuaMenu )
  1388.  
  1389. luatxt:SetPos( 5, 25 )
  1390.  
  1391. luatxt:SetSize( LuaMenu:GetWide() - 10, LuaMenu:GetTall() - 65 )
  1392.  
  1393. luatxt:SetText( "" )
  1394.  
  1395. luatxt:SetMultiline( true )
  1396.  
  1397. luatxt.OnChange = function( self )
  1398.  
  1399. end
  1400.  
  1401.  
  1402.  
  1403. local runlua = vgui.Create( "DButton", LuaMenu )
  1404.  
  1405. runlua:SetPos( 5, LuaMenu:GetTall() - 35 )
  1406.  
  1407. runlua:SetText( "Run Lua" )
  1408.  
  1409. runlua:SetTextColor( Color(255, 255, 255, 255) )
  1410.  
  1411. runlua:SetSize( LuaMenu:GetWide() - 10, 30 )
  1412.  
  1413.  
  1414.  
  1415. runlua.Paint = function( self, w, h )
  1416.  
  1417. surface.SetDrawColor( Color(60, 60, 60, 200) )
  1418.  
  1419. surface.DrawRect( 0, 0, w, h )
  1420.  
  1421. surface.SetDrawColor( Color( 60, 60, 60 ) )
  1422.  
  1423. surface.SetMaterial( downgrad )
  1424.  
  1425. surface.DrawTexturedRect( 0, 0, w, h/ 2 )
  1426.  
  1427. surface.SetDrawColor( Color(100, 100, 100, 255) )
  1428.  
  1429. surface.DrawOutlinedRect( 0, 0, w, h )
  1430.  
  1431. end
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437. runlua.DoClick = function()
  1438.  
  1439. runlau = luatxt:GetValue()
  1440.  
  1441. local run = cstr( runlau, "", false )
  1442.  
  1443. if isfaggot( run ) then _A.engine.RunString( runlau ) else
  1444.  
  1445. print( "YOUR CODE FUCKING SUCKS RETARD" )
  1446.  
  1447. print( run )
  1448.  
  1449. end
  1450.  
  1451. end
  1452.  
  1453.  
  1454.  
  1455. end)
  1456.  
  1457.  
  1458.  
  1459. end
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469. ------------------------------------------------------------------------------
  1470.  
  1471. -- NOTIFY --
  1472.  
  1473. ------------------------------------------------------------------------------
  1474.  
  1475.  
  1476.  
  1477. local messagetypes = false
  1478.  
  1479. timer.Simple( 5, function() -- have to load this after autorun otherwise Color() doesn't exist
  1480.  
  1481. messagetypes = {
  1482.  
  1483. [1] = { ["col"] = Color( 200, 200, 200 ), ["icon"] = Material( "icon16/application_xp_terminal.png" ) }, -- neutral message
  1484.  
  1485. [2] = { ["col"] = Color( 250, 200, 140 ), ["icon"] = Material( "icon16/cross.png" ) }, -- negative message
  1486.  
  1487. [3] = { ["col"] = Color( 180, 250, 180 ), ["icon"] = Material( "icon16/tick.png" ) }, -- positive message
  1488.  
  1489. [4] = { ["col"] = Color( 250, 140, 140 ), ["icon"] = Material( "icon16/error.png" ) }, -- error message
  1490.  
  1491. [5] = { ["col"] = Color( 180, 180, 250 ), ["icon"] = Material( "icon16/user.png" ) }, -- blue message
  1492.  
  1493. [6] = { ["col"] = Color( 250, 250, 180 ), ["icon"] = Material( "icon16/lightbulb.png" ) }, -- lightbulb message
  1494.  
  1495. }
  1496.  
  1497. end )
  1498.  
  1499.  
  1500.  
  1501. local aegiscomponent = { color = -1, name = "Aegis" }
  1502.  
  1503.  
  1504.  
  1505. local notifies = {}
  1506.  
  1507. local tableinsert = table.insert
  1508.  
  1509. local istable = istable
  1510.  
  1511. local error = error
  1512.  
  1513.  
  1514.  
  1515. function _A.aegis.Notify( component, type, text )
  1516.  
  1517. if !messagetypes then return end
  1518.  
  1519. if !component or !istable( component ) then component = { color = Color( 255, 0, 0 ), name = "DEFINE A SCRIPT COMPONENT PROPERLY YOU AUTIST" } end
  1520.  
  1521. if !messagetypes[type] then
  1522.  
  1523. tableinsert( notifies, { ["time"] = CurTime() + 10, ["ccol"] = Color(255,0,0), ["ctxt"] = "[ AEGIS ERROR ]", ["icon"] = "icon16/error.png", ["col"] = Color(255,0,0), ["txt"] = "Invalid aegis notify type! must be 1-6!" } )
  1524.  
  1525. return
  1526.  
  1527. end
  1528.  
  1529. if component.color == -1 then component.color = Color( 55, 55, 155 ) end
  1530.  
  1531. tableinsert( notifies, { ["time"] = CurTime() + 10, ["ccol"] = component.color, ["ctxt"] = "[ "..component.name.." ]", ["icon"] = messagetypes[type].icon, ["col"] = messagetypes[type].col, ["txt"] = text } )
  1532.  
  1533. end
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539. -- odium.aegis.Notify( { color = -1, name = "Aegis" }, 1, "NIGGERS" )
  1540.  
  1541.  
  1542.  
  1543. local function DrawNotifies()
  1544.  
  1545. -- if !messagetypes then return end
  1546.  
  1547. local x, y = 10, ScrH() / 2
  1548.  
  1549. local cutoff = 0
  1550.  
  1551. for k, v in pairs( notifies ) do
  1552.  
  1553. if cutoff > 30 then continue end
  1554.  
  1555. cutoff = cutoff + 1
  1556.  
  1557. local lx = 10
  1558.  
  1559. local timeleft = v.time - CurTime()
  1560.  
  1561. if timeleft < 2 then lx = 10 - ( ( 2 - timeleft ) * 800 ) end -- pull back into the edge of the screen at the end of the timer
  1562.  
  1563. if timeleft <= 0.5 then notifies[k] = nil continue end -- your time is up faggot
  1564.  
  1565. local bgcol = Color( v.ccol.r, v.ccol.g, v.ccol.b, 145 )
  1566.  
  1567. local bgcol2 = Color( v.col.r, v.col.g, v.col.b, 145 )
  1568.  
  1569. surface.SetDrawColor( v.ccol )
  1570.  
  1571. local txw, txh = draw.SimpleText( v.ctxt, "Trebuchet18", lx, y, v.ccol, 0, 0 )
  1572.  
  1573.  
  1574.  
  1575. surface.SetDrawColor( bgcol )
  1576.  
  1577. surface.DrawRect( lx - 5, y - 1, txw + 10, 20 )
  1578.  
  1579. surface.DrawLine( lx - 5, y - 1, lx - 5 + (txw + 10), y - 1 )
  1580.  
  1581.  
  1582.  
  1583. surface.SetDrawColor( Color(255,255,255, 150) )
  1584.  
  1585. surface.SetMaterial( v.icon )
  1586.  
  1587. surface.DrawTexturedRect( (lx - 5) + txw + 16, y + 1, 16, 16 )
  1588.  
  1589.  
  1590.  
  1591. txw = txw + 22
  1592.  
  1593.  
  1594.  
  1595. surface.SetDrawColor( bgcol2 )
  1596.  
  1597. local txw2, txh2 = draw.SimpleText( v.txt, "Trebuchet18", (lx - 5) + txw + 20, y, v.col, 0, 0 )
  1598.  
  1599. surface.DrawRect( (lx - 5) + txw + 15, y - 1, txw2 + 10, 20 )
  1600.  
  1601. surface.DrawLine( (lx - 5) + txw + 15, y - 1, ((lx - 5) + txw + 15) + txw2 + 10, y - 1 )
  1602.  
  1603.  
  1604.  
  1605. y = y - 25
  1606.  
  1607. end
  1608.  
  1609. end
  1610.  
  1611.  
  1612.  
  1613. timer.Simple( 6, function()
  1614.  
  1615. _A.h_Add( "HUDPaint", "AegisNotifications", DrawNotifies )
  1616.  
  1617. -- _A.aegis.Notify( aegiscomponent, 1, "BLACK PEOPLE" )
  1618.  
  1619. end )
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625. local function InjectCCSystem()
  1626.  
  1627. --[[
  1628.  
  1629. ANUBIS CHANGE
  1630.  
  1631. This function was having a bit of a cry when the second argument to concommand.Add, func,
  1632.  
  1633. was null. I just added a little check that makes sure func is A ok to be used.
  1634.  
  1635. ]]
  1636.  
  1637. local _concommandAdd = concommand.Add
  1638.  
  1639. concommand.Add = aegis.Detour( concommand.Add, function( ... )
  1640.  
  1641. local args = {...}
  1642.  
  1643. local func = args[2]
  1644.  
  1645.  
  1646.  
  1647. if func and jufi(func).source == "@" then
  1648.  
  1649. return _A.cc_Add( ... )
  1650.  
  1651. end
  1652.  
  1653.  
  1654.  
  1655. return _concommandAdd( ... )
  1656.  
  1657. end)
  1658.  
  1659.  
  1660.  
  1661. local _concommandRun = concommand.Run
  1662.  
  1663. concommand.Run = aegis.Detour( concommand.Run, function( player, command, arguments, args )
  1664.  
  1665. _concommandRun( player, command, arguments, args )
  1666.  
  1667.  
  1668.  
  1669. local LowerCommand = string.lower( command )
  1670.  
  1671.  
  1672.  
  1673. if ( CommandList2[ LowerCommand ] != nil ) then
  1674.  
  1675. CommandList2[ LowerCommand ]( player, command, arguments, args )
  1676.  
  1677. return true
  1678.  
  1679. end
  1680.  
  1681.  
  1682.  
  1683. return false
  1684.  
  1685. end, "concommand.Run")
  1686.  
  1687.  
  1688.  
  1689. InjectAegisCommands()
  1690.  
  1691.  
  1692.  
  1693. print("////////////////// Project Odium Detours: Stage 3 Initialized //////////////////")
  1694.  
  1695. end
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701. local blockincludes = {
  1702.  
  1703. // gpseak crashes us so lets block it from loading
  1704.  
  1705. ["lib/preferences.lua/preferences.lua"] = true,
  1706.  
  1707. ["lib/i18n.lua/i18n.lua"] = true,
  1708.  
  1709. ["conf/theme.lua"] = true,
  1710.  
  1711. ["speak/cl_main.lua"] = true,
  1712.  
  1713. ["conf/emoticons.lua"] = true,
  1714.  
  1715. }
  1716.  
  1717.  
  1718.  
  1719. local ac = {
  1720.  
  1721. ["extensions/client/vehicle.lua"] = "!cake anticheat",
  1722.  
  1723. ["autorun/simplicityac.lua"] = "simplicity anticheat",
  1724.  
  1725. }
  1726.  
  1727.  
  1728.  
  1729. local old_include = include
  1730.  
  1731. include = aegis.Detour( include, function( str )
  1732.  
  1733. if ac[str] then
  1734.  
  1735. _A.aegis.anticheats[str] = ac[str]
  1736.  
  1737. aegis.log( "Anticheat detected: "..ac[str] )
  1738.  
  1739. end
  1740.  
  1741. if blockincludes[str] then
  1742.  
  1743. aegis.log( "Blocked loading of naughty file: "..str )
  1744.  
  1745. return
  1746.  
  1747. end
  1748.  
  1749. if str == "ulib/shared/sh_ucl.lua" then InjectHookSystem() end -- inject it again cos ulx just raped us
  1750.  
  1751. return old_include(str)
  1752.  
  1753. end)
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761. local saferequires = {
  1762.  
  1763. ["baseclass"] = true,
  1764.  
  1765. ["concommand"] = true,
  1766.  
  1767. ["saverestore"] = true,
  1768.  
  1769. ["hook"] = true,
  1770.  
  1771. ["gamemode"] = true,
  1772.  
  1773. ["weapons"] = true,
  1774.  
  1775. ["scripted_ents"] = true,
  1776.  
  1777. ["player_manager"] = true,
  1778.  
  1779. ["numpad"] = true,
  1780.  
  1781. ["team"] = true,
  1782.  
  1783. ["undo"] = true,
  1784.  
  1785. ["cleanup"] = true,
  1786.  
  1787. ["duplicator"] = true,
  1788.  
  1789. ["constraint"] = true,
  1790.  
  1791. ["construct"] = true,
  1792.  
  1793. ["usermessage"] = true,
  1794.  
  1795. ["list"] = true,
  1796.  
  1797. ["cvars"] = true,
  1798.  
  1799. ["http"] = true,
  1800.  
  1801. ["properties"] = true,
  1802.  
  1803. ["widget"] = true,
  1804.  
  1805. ["cookie"] = true,
  1806.  
  1807. ["utf8"] = true,
  1808.  
  1809. ["drive"] = true,
  1810.  
  1811. ["draw"] = true,
  1812.  
  1813. ["markup"] = true,
  1814.  
  1815. ["effects"] = true,
  1816.  
  1817. ["halo"] = true,
  1818.  
  1819. ["killicon"] = true,
  1820.  
  1821. ["spawnmenu"] = true,
  1822.  
  1823. ["controlpanel"] = true,
  1824.  
  1825. ["presets"] = true,
  1826.  
  1827. ["menubar"] = true,
  1828.  
  1829. ["matproxy"] = true,
  1830.  
  1831. }
  1832.  
  1833.  
  1834.  
  1835. local tocopy = ""
  1836.  
  1837. local hooksinjected = false
  1838.  
  1839. local old_req = require
  1840.  
  1841. _A.require = old_req
  1842.  
  1843. require = aegis.Detour( require, function( str )
  1844.  
  1845. if tocopy != "" and _G[tocopy] then
  1846.  
  1847. _A.G[tocopy] = tabble.Copy( _G[tocopy] )
  1848.  
  1849. tocopy = ""
  1850.  
  1851. end
  1852.  
  1853.  
  1854.  
  1855. if saferequires[str] and saferequires[str] != -1 then
  1856.  
  1857. tocopy = str
  1858.  
  1859. saferequires[str] = -1
  1860.  
  1861. end
  1862.  
  1863.  
  1864.  
  1865. if str == "gamemode" and !hooksinjected then InjectHookSystem() InjectCCSystem() end
  1866.  
  1867. return old_req(str)
  1868.  
  1869. end)
  1870.  
  1871.  
  1872.  
  1873. local renderview = render.RenderView
  1874.  
  1875. local renderclear = render.Clear
  1876.  
  1877. local rendercap = render.Capture
  1878.  
  1879. --local eyepos = EyePos
  1880.  
  1881. --local eyeang = EyeAngles
  1882.  
  1883. local vgetworldpanel = vgui.GetWorldPanel
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891. local function renderpanic( delay )
  1892.  
  1893. if runbitchrun then return end
  1894.  
  1895. runbitchrun = true
  1896.  
  1897. renderclear( 0, 0, 0, 255, true, true )
  1898.  
  1899.  
  1900.  
  1901. renderview( {
  1902.  
  1903. origin = LocalPlayer():EyePos(),
  1904.  
  1905. angles = LocalPlayer():EyeAngles(),
  1906.  
  1907. x = 0,
  1908.  
  1909. y = 0,
  1910.  
  1911. w = ScrW(),
  1912.  
  1913. h = ScrH(),
  1914.  
  1915. dopostprocess = true,
  1916.  
  1917. drawhud = true,
  1918.  
  1919. drawmonitors = true,
  1920.  
  1921. drawviewmodel = true
  1922.  
  1923. } )
  1924.  
  1925.  
  1926.  
  1927. local worldpanel = vgetworldpanel()
  1928.  
  1929. if IsValid( worldpanel ) then
  1930.  
  1931. worldpanel:SetPaintedManually( true )
  1932.  
  1933. end
  1934.  
  1935.  
  1936.  
  1937. for k, v in pairs( ents.GetAll() ) do
  1938.  
  1939. if v:GetColor() and v:GetColor().a == 100 and v:GetRenderMode() and v:GetRenderMode() == 4 then v:SetColor( Color( 255, 255, 255 ) ) end
  1940.  
  1941. end
  1942.  
  1943.  
  1944.  
  1945. timer.Simple( delay, function()
  1946.  
  1947. vgetworldpanel():SetPaintedManually( false )
  1948.  
  1949. runbitchrun = false
  1950.  
  1951. end)
  1952.  
  1953. end
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965. local findmeta = FindMetaTable
  1966.  
  1967. local ply = findmeta( "Player" )
  1968.  
  1969. local oconcommand = ply.ConCommand
  1970.  
  1971. ply.ConCommand = aegis.Detour( ply.ConCommand, function( pl, cmd, ... )
  1972.  
  1973.  
  1974.  
  1975. if string.lower(cmd) == "jpeg" then
  1976.  
  1977. if blockjpg then return end
  1978.  
  1979. renderpanic( 0.2 )
  1980.  
  1981. oconcommand( pl, cmd, ... )
  1982.  
  1983. timer.Simple( 0.2, function()
  1984.  
  1985. _A.aegis.Notify( aegiscomponent, 3, "Protected your client from jpeg screenshot request" )
  1986.  
  1987. end )
  1988.  
  1989. return
  1990.  
  1991. end
  1992.  
  1993.  
  1994.  
  1995. if string.lower(cmd) == "__screenshot_internal" then
  1996.  
  1997. renderpanic( 0.3 )
  1998.  
  1999. oconcommand( pl, cmd, ... )
  2000.  
  2001. timer.Simple( 0.3, function()
  2002.  
  2003. _A.aegis.Notify( aegiscomponent, 3, "Protected your client from __screenshot_internal request" )
  2004.  
  2005. end )
  2006.  
  2007. return
  2008.  
  2009. end
  2010.  
  2011.  
  2012.  
  2013. return oconcommand( pl, cmd, ... )
  2014.  
  2015. end)
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021. render.Capture = aegis.Detour( render.Capture, function( data )
  2022.  
  2023. renderpanic( 0.05 )
  2024.  
  2025. local capture = rendercap( data )
  2026.  
  2027. return capture
  2028.  
  2029. end )
  2030.  
  2031.  
  2032.  
  2033. local orcp = render.CapturePixels
  2034.  
  2035. render.CapturePixels = aegis.Detour( render.CapturePixels, function(...)
  2036.  
  2037. renderpanic( 0.05 )
  2038.  
  2039. orcp( ... )
  2040.  
  2041. return
  2042.  
  2043. end )
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055. --local chattxt = chat.AddText
  2056.  
  2057. local orcc = RunConsoleCommand
  2058.  
  2059. RunConsoleCommand = aegis.Detour( RunConsoleCommand, function( cmd, ... )
  2060.  
  2061.  
  2062.  
  2063. if string.lower(cmd) == "__screenshot_internal" then
  2064.  
  2065. renderpanic( 0.3 )
  2066.  
  2067. orcc( cmd, ... )
  2068.  
  2069. timer.Simple( 0.3, function()
  2070.  
  2071. _A.aegis.Notify( aegiscomponent, 3, "Protected your client from __screenshot_internal request" )
  2072.  
  2073. end )
  2074.  
  2075. return
  2076.  
  2077. end
  2078.  
  2079.  
  2080.  
  2081. if string.lower(cmd) == "jpeg" then
  2082.  
  2083. renderpanic( 0.2 )
  2084.  
  2085. orcc( cmd, ... )
  2086.  
  2087. timer.Simple( 0.2, function()
  2088.  
  2089. _A.aegis.Notify( aegiscomponent, 3, "Protected your client from jpeg screenshot request" )
  2090.  
  2091. end )
  2092.  
  2093. return
  2094.  
  2095. end
  2096.  
  2097.  
  2098.  
  2099. return orcc( cmd, ... )
  2100.  
  2101. end )
  2102.  
  2103.  
  2104.  
  2105. local gayinfonum = gcinfo()
  2106.  
  2107. local gayinfo = gcinfo
  2108.  
  2109. gcinfo = aegis.Detour( gcinfo, function( ... )
  2110.  
  2111. local onum = gayinfo( ... )
  2112.  
  2113. local newnum = onum - gayinfonum
  2114.  
  2115. return newnum
  2116.  
  2117. end)
  2118.  
  2119.  
  2120.  
  2121. local nigger = string.find
  2122.  
  2123. local function protectpath( f )
  2124.  
  2125. local inf = dbginfo( 4 )
  2126.  
  2127. if !inf then return true end
  2128.  
  2129. local src = inf.source
  2130.  
  2131. return nigger( f, "acebot_settings.dat" ) and src != "@"
  2132.  
  2133. end
  2134.  
  2135.  
  2136.  
  2137. local fagopen = file.Open
  2138.  
  2139. file.Open = aegis.Detour( file.Open, function( f, m, p )
  2140.  
  2141. if protectpath( f ) then return end
  2142.  
  2143. return fagopen( f, m, p )
  2144.  
  2145. end )
  2146.  
  2147.  
  2148.  
  2149. local fagexists = file.Exists
  2150.  
  2151. file.Exists = aegis.Detour( file.Open, function( f, p )
  2152.  
  2153. if protectpath( f ) then return false end
  2154.  
  2155. return fagexists( f, p )
  2156.  
  2157. end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement