.NET: Script examples
Posted: Thu Feb 08, 2024 6:27 am
.NET: Disable renaming of methods with script
Just change CLASS_NAME to required class name like 'Test':
Exclude header from CRC checking (for PE only):
Just change CLASS_NAME to required class name like 'Test':
Code: Select all
function OnBeforeCompilation()
local heap = vmprotect.core():outputArchitecture():streams()
local methods = heap:table(TokenType.MethodDef)
for i = 1, methods:count() do
local method = methods:item(i)
if method:declaringType():name() == CLASS_NAME then
method:setRenameMode(RenameMode.None)
end
end
end
Code: Select all
function OnBeforeCompilation()
local header = vmprotect.core():outputArchitecture():segments():header()
if header ~= nil then
header:setExcludedFromMemoryProtection(true)
end
end