Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: Prevent tampering bypass by changing error handling #169

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zqnxz
Copy link
Contributor

@zqnxz zqnxz commented Jun 22, 2024

This whole section would've been bypassable by just doing:
error = function() return end

  • Change to return print

zqnxz and others added 2 commits June 22, 2024 12:38
This whole section would've been bypassable by just doing:
``error = function() return end``

* Change to return print
@@ -105,7 +105,7 @@ function AntiTamper:apply(ast, pipeline)
end
code = code .. [[
local gmatch = string.gmatch;
local err = function() error("Tamper Detected!") end;
local err = function() return print("Tamper Detected!") end;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good but a better way would be to replace the code with while true do end to cause an infinite loop to prevent any further code from running, albeit that could lead to crashes. And have the print in front of the while loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants