File tree Expand file tree Collapse file tree 1 file changed +23
-17
lines changed
Expand file tree Collapse file tree 1 file changed +23
-17
lines changed Original file line number Diff line number Diff line change @@ -38,22 +38,28 @@ function AntiTamper:apply(ast, pipeline)
3838 local string = RandomStrings .randomString ();
3939 code = code .. [[
4040 -- Anti Beautify
41- local sethook = debug and debug.sethook or function() end;
42- local allowedLine = nil;
43- local called = 0;
44- sethook(function(s, line)
45- called = called + 1;
46- if allowedLine then
47- if allowedLine ~= line then
48- sethook(error, "l");
49- end
50- else
51- allowedLine = line;
52- end
53- end, "l");
54- (function() end)();
55- (function() end)();
56- sethook();
41+ local sethook = debug and debug.sethook or function() end;
42+ local allowedLine = nil;
43+ local called = 0;
44+ sethook(function(s, line)
45+ if not line then
46+ return
47+ end
48+ called = called + 1;
49+ if allowedLine then
50+ if allowedLine ~= line then
51+ sethook(error, "l", 5);
52+ end
53+ else
54+ allowedLine = line;
55+ end
56+ end, "l", 5);
57+ (function() end)();
58+ (function() end)();
59+ sethook();
60+ if called < 2 then
61+ valid = false;
62+ end
5763 if called < 2 then
5864 valid = false;
5965 end
173179 return ast ;
174180end
175181
176- return AntiTamper ;
182+ return AntiTamper ;
You can’t perform that action at this time.
0 commit comments