Skip to content

Commit 141de77

Browse files
authored
Merge pull request #168 from zqnxz/master
feat: extended anti tamper
2 parents 247be5b + 1cc7200 commit 141de77

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/prometheus/steps/AntiTamper.lua

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,23 @@ function AntiTamper:apply(ast, pipeline)
6565
end
6666
6767
-- Anti Function Hook
68-
local funcs = {pcall, string.char, debug.getinfo}
68+
local funcs = {pcall, string.char, debug.getinfo, string.dump}
6969
for i = 1, #funcs do
7070
if debug.getinfo(funcs[i]).what ~= "C" then
7171
valid = false;
7272
end
73+
74+
if debug.getlocal(funcs[i], 1) then
75+
valid = false;
76+
end
77+
78+
if debug.getupvalue(funcs[i], 1) then
79+
valid = false;
80+
end
81+
82+
if pcall(string.dump, funcs[i]) then
83+
valid = false;
84+
end
7385
end
7486
7587
-- Anti Beautify

0 commit comments

Comments
 (0)