Skip to content

Commit

Permalink
Merge pull request #53 from EpixScripts/revision
Browse files Browse the repository at this point in the history
Fix script generator putting "userdata: address" into the constant table
  • Loading branch information
Upbolt authored Feb 4, 2022
2 parents 2f9bafd + b8d3f04 commit a7f1714
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion methods/userdata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ local function userdataValue(data)
local dataType = typeof(data)

if dataType == "userdata" then
return toString(data)
return "aux.placeholderUserdataConstant"
elseif dataType == "Instance" then
return data.Name
elseif dataType == "BrickColor" then
Expand Down
7 changes: 5 additions & 2 deletions ohaux.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ local isLClosure = islclosure or is_l_closure or (iscclosure and function(f) ret

assert(getGc and getInfo and getConstants and isXClosure, "Your exploit is not supported")

local placeholderUserdataConstant = newproxy(false)

local function matchConstants(closure, list)
if not list then
return true
end

local constants = getConstants(closure)

for index in pairs(list) do
if not constants[index] then
for index, value in pairs(list) do
if constants[index] ~= value and value ~= placeholderUserdataConstant then
return false
end
end
Expand Down Expand Up @@ -46,6 +48,7 @@ local function searchClosure(script, name, upvalueIndex, constants)
end
end

aux.placeholderUserdataConstant = placeholderUserdataConstant
aux.searchClosure = searchClosure

return aux

0 comments on commit a7f1714

Please sign in to comment.