Skip to content

Commit

Permalink
- Add cheat detections
Browse files Browse the repository at this point in the history
- Fix minor "security" issue
  • Loading branch information
samuel committed Apr 20, 2024
1 parent 8a0f021 commit 225fbc9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lua/autorun/server/nova_sv_init.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Nova = Nova or {
["version"] = "1.7.10"
["version"] = "1.7.11"
}

Nova.extensions = Nova.extensions or {
["latest_version_anticheat"] = "1.0.1"
["latest_version_anticheat"] = "1.0.2"
}

local lines = {
Expand Down
2 changes: 1 addition & 1 deletion lua/nova/modules/admin/menupayloads.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Nova.getMenuPayload = function(ply_or_steamid)
-- Global Variables
------------------------------
NOVA_VERSION = "]] .. Nova["version"] .. [["
NOVA_UID = "]] .. Nova.getSetting("uid", "unknown") .. [["
NOVA_UID = "]] .. (isProtected and Nova.getSetting("uid", "unknown") or "") .. [["
NOVA_MENU = NOVA_MENU or nil
NOVA_LANG = NOVA_LANG or nil
NOVA_ACTIVE_TAB = NOVA_ACTIVE_TAB or nil
Expand Down
13 changes: 10 additions & 3 deletions lua/nova/modules/anticheat/anticheatpayload.lua
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ Nova.getAnticheatPayload = function()
"esp_enable", "smeg", "wallhack", "nospread", "antiaim", "hvh", "autostrafe",
"circlestrafe", "spinbot", "odium", "ragebot", "legitbot", "fakeangles", "anticac",
"antiscreenshot", "fakeduck", "lagexploit", "exploits_open", "gmodhack", "cathack",
"aimbot_ignoreteam", "antiaim_walldtc_yaw"
"aimbot_ignoreteam", "antiaim_walldtc_yaw", {"spin_enabled", "BhopVar"}
} ]] .. lines:Insert("ac_key") .. [[
]] .. lines:Insert("ac_f_key_9") .. [[
Expand Down Expand Up @@ -285,7 +285,7 @@ Nova.getAnticheatPayload = function()
local function is_string_bad(b_string, b_table)
b_string = string_lower(b_string or "")
for k, v in loop_ipairs(b_table or {}) do
if v and string_find(b_string, v) then
if _type(v) == "string" and string_find(b_string, v) then
return true, v
end
end
Expand Down Expand Up @@ -341,7 +341,14 @@ Nova.getAnticheatPayload = function()
local function check_convars()
if not _check_cvars then return end
for k, v in loop_ipairs(bad_cvar_names or {}) do
if convar_exists(v) then ]] .. vars:Get("ac_func_detection") .. [[("anticheat_known_cvar", "CVarName: " .. v) end
if _type(v) ~= "table" then v = {v} end
local f = true
for _, c in loop_ipairs(v) do
if not convar_exists(c) then f = false break end
end
if f then
]] .. vars:Get("ac_func_detection") .. [[("anticheat_known_cvar", "CVarName: " .. table.concat(v, ", "))
end
end
end
Expand Down

0 comments on commit 225fbc9

Please sign in to comment.