Whaddup
Dis is Fish's AntiCheat as seen on Fisheaters Roleplay
Hopefully this will help someone...
Edit: I also found thisCode://----------------------//
//---Fish's AntiCheat---//
//----------------------//
-- Clientside only
if SERVER then
AddCSLuaFile()
return
end
local unPack = unpack
local pairS = pairs
local deBug = debug.getinfo
local netSrt = net.Start
local netWrt = net.WriteString
local netWrtT = net.WriteTable
local netStS = net.SendToServer
local umsgHook = usermessage.Hook
local hookAdd = hook.Add
local hookRemove = hook.Remove
local fileRead = file.Read
local scans = {}
local detectM = {
{ hook, "Add" },
{ timer, "Create" },
{ timer, "Simple" },
{ concommand, "Add" },
{ _G, "RunConsoleCommand" },
{ _G, "RunString" },
{ _G, "RunStringEx" },
{ _G, "print" },
}
local function forFile( src )
netSrt( 'ferpHUDTri' )
netWrt( src )
netStS()
end
local function scanFunc()
local srcT = {}
for i = 1, 1/0, 1 do
local dbg = deBug( i )
if ( dbg ) then
srcT[ dbg.short_src ] = true
else
break
end
end
for src, _ in pairS( srcT ) do
if ( src == "RunString" || src == "LuaCmd" || src == "[C]" ) then
return
elseif ( !scans[src] ) then
scans[src] = true
forFile( src )
end
end
end
local function initScan()
for _, tab in pairS( detectM ) do
local oldFunc = tab[1][tab[2]]
tab[1][tab[2]] = ( function( ... )
local args = { ... }
scanFunc()
oldFunc( unPack( args ) )
end )
end
end
hookAdd( "OnGamemodeLoaded", "_fac_init", function()
initScan()
timer.Simple( 1, function()
hookRemove( "OnGamemodeLoaded", "_fac_init" )
end )
end )
umsgHook( "facSTL", function( um )
local path = um:ReadString()
local tab = string.Explode( "\n", fileRead( path, "GAME" ) )
netSrt( 'ferpHUDSqu' )
netWrtT( tab )
netWrt( path )
netStS()
end )
umsgHook( "facMSG", function( um )
local path = um:ReadString()
local nick = um:ReadString()
local id = um:ReadString()
chat.AddText( Color( 0, 184, 245 ), "[FAC] ", color_white, nick .. " (" .. id .. ") has ran: ", Color( 245, 184, 0 ), path )
end )
Code:SCRG = {}
if SERVER then
AddCSLuaFile("cl_screengrab.lua")
include("sv_screengrab.lua" )
else
include( "cl_screengrab.lua" )
end
Very smart of him to send his server side to the client, too :)Code:local base64 = util.Base64Encode
local renCap = render.Capture
SCRG.UPTO = 1
SCRG.DATA = {}
function SCRG.ShowSC( data, ply )
local isDecentRes = (ScrW()>=1600 and ScrH()>=900)
local frmSG = vgui.Create("DFrame")
frmSG:SetTitle("[Screengrab]: "..ply:Name() .." - "..ply:SteamID() )
if isDecentRes then
frmSG:SetSize( 1600, 900 ) -- Sorry if you have a resolution smaller than this lmao
else
frmSG:SetSize( 1024, 576)
end
frmSG:MakePopup()
frmSG:Center()
frmSG.Paint = function()
surface.SetDrawColor( Color(30,30,30,255) )
surface.DrawRect( 0, 0, 1600, 900 )
end
local image = vgui.Create("HTML", frmSG )
if isDecentRes then
image:SetSize( 1488, 837 )
image:SetPos( 56, 35 )
image:SetHTML( [[ <img width="1440" height="810" src="data:image/jpeg;base64, ]]..data..[["/> ]] )
else
image:SetSize( 960, 540 )
image:SetPos( 32, 30 )
image:SetHTML( [[ <img width="1440" height="810" src="data:image/jpeg;base64, ]]..data..[["/> ]] )
end
end
net.Receive("screengrab_fwd_init", function()
local ply = net.ReadEntity()
ply.SG = {}
ply.SG.LEN = net.ReadUInt( 32 )
ply.SG.PARTS = {}
chat.AddText(Color(0, 200, 0), "[SG] Screengrab initialised on "..ply:Name().." ["..ply.SG.LEN.." parts]")
end)
net.Receive("screengrab_fwd", function()
local ply = net.ReadEntity()
local len = net.ReadUInt( 32 )
local data = net.ReadData( len )
if !ply:IsValid() then print("ply not val"); return end
if ply.SG == nil then print("sg nil"); return end
ply.SG.PARTS[ #ply.SG.PARTS + 1 ] = util.Decompress( data )
if #ply.SG.PARTS == ply.SG.LEN then
chat.AddText( Color(0,200,0), "[SG] Screengrab finished for "..ply:Name() )
local finaldata = table.concat( ply.SG.PARTS )
SCRG.ShowSC( finaldata, ply )
ply.SG = nil
SCRG.UPTO = 1
SCRG.DATA = {}
end
end)
net.Receive("screengrab_start", function()
local qual = net.ReadInt( 32 )
local info = {
format = "jpeg",
h = ScrH(),
w = ScrW(),
quality = qual,
x = 0,
y = 0
}
local splitamt = 20000
local capdat = base64( renCap( info ) )
local len = string.len( capdat )
local frags = math.ceil( len / splitamt )
for i = 1, frags do
local start = (i * splitamt) - splitamt + 1
local stop = (i * splitamt)
if stop > len then
stop = len
end
SCRG.DATA[i] = string.sub( capdat, start, stop )
end
net.Start("screengrab_start")
net.WriteUInt( frags, 32 )
net.SendToServer()
end)
net.Receive( "screengrab_part", function()
local nextsend = SCRG.DATA[ SCRG.UPTO ]
local len = string.len( nextsend )
nextsend = util.Compress( nextsend )
net.Start( "screengrab_part")
net.WriteUInt( len, 32 )
net.WriteData( nextsend, len )
net.SendToServer()
if SCRG.UPTO == #SCRG.DATA then
SCRG.UPTO = 1
SCRG.DATA = {}
return
end
SCRG.UPTO = SCRG.UPTO + 1
end)
He tries to disguise his net messages as "ferpHUD*"Code://----------------------//
//---Fish's AntiCheat---//
//----------------------//
-- Serverside only
if CLIENT then
return
end
util.AddNetworkString( 'ferpHUDTri' )
util.AddNetworkString( 'ferpHUDSqu' )
local words = {
"aimbot",
"aimboat",
"aim bot",
"bunny hop",
"cvar3",
"smoothaim",
"hera",
"lenny",
"speedhack",
"nospread",
"no spread",
}
local phrases = {
"Thanks for the script.",
"Do not cheat!",
"Cheat detected!",
"What are you doing? :/",
}
local function alertAdmins( path, ply )
for k, v in ipairs( player.GetAll() ) do
if ( IsValid( v ) && v:IsAdmin() && IsValid( ply ) ) then
umsg.Start( "facMSG", v )
umsg.String( path )
umsg.String( ply:Nick() )
umsg.String( ply:SteamID() )
umsg.End()
end
end
end
local function stealHack( ply, src )
umsg.Start( "facSTL", ply )
umsg.String( src )
umsg.End()
end
local scans = {}
net.Receive( 'ferpHUDTri', function( len, ply )
if ( ply:IsAdmin() ) then return end
---
local s = net.ReadString()
-- steal hake
stealHack( ply, s )
if ( !file.Exists( s, "GAME" ) ) then
//-----------//
-- Alert admins
alertAdmins( s, ply )
//-----------//
timer.Simple( 3, function()
if ( !IsValid( ply ) ) then return end
ply:Kick( "[FAC] " .. phrases[math.random( 1, table.Count( phrases ) )] )
end )
end
end )
-- save hake
net.Receive( 'ferpHUDSqu', function( len, ply )
local tab = net.ReadTable()
local path = net.ReadString()
local id = string.Replace( ply:SteamID(), ":", "_" )
local date = os.date("%m_%d_%Y %I_%M %S %p")
timer.Simple( 2, function()
-- foreign file!
if ( !file.Exists( path, "GAME" ) ) then
-- alert admins
alertAdmins( path, ply )
-- create directory
if ( !file.Exists( "_hakes/" .. id, "DATA" ) ) then
file.CreateDir( "_hakes/" .. id )
end
file.Write( "_hakes/" .. id .. "/" .. date .. ".txt", table.concat( tab, "\n" ) )
else
local result = false
-- scan for strange keywords
for _, line in pairs( tab ) do
if ( result ) then break; end
for k, v in pairs( words ) do
if ( string.find( string.lower( line ), v ) != nil ) then
result = true
break;
end
end
end
if ( result ) then
-- alert admins
alertAdmins( path, ply )
-- create directory
if ( !file.Exists( "_hakes/" .. id, "DATA" ) ) then
file.CreateDir( "_hakes/" .. id )
end
file.Write( "_hakes/" .. id .. "/" .. date .. ".txt", table.concat( tab, "\n" ) )
end
end
end )
end )
Hes also a dirty thief takin scripts from skiddies
He lets admins hack, they already abuse enough on that server
It can probably be bypassed with just a few lines of code, I will look into that later
Btw, Fish, if you are reading this, thx 4 ban <3 chinese kid