33 lines
1.0 KiB
Plaintext
33 lines
1.0 KiB
Plaintext
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||
|
<Document>
|
||
|
<Protection InputFileName="Project1.exe" Options="32768" RunParameters="">
|
||
|
<Folders />
|
||
|
<Procedures>
|
||
|
<Procedure MapAddress='VMProtectMarker "Test marker"' Options="1" />
|
||
|
<Procedure MapAddress='string "Correct password"' Options="1" />
|
||
|
<Procedure MapAddress='string "Incorrect password"' Options="1" />
|
||
|
</Procedures>
|
||
|
<Messages />
|
||
|
</Protection>
|
||
|
<DLLBox />
|
||
|
<Script>
|
||
|
<![CDATA[function GetRandomSectionName()
|
||
|
local res = ""
|
||
|
for i = 1, 8 do
|
||
|
res = res .. string.char(32 + math.random(string.byte("z") - 32))
|
||
|
end
|
||
|
return res
|
||
|
end
|
||
|
|
||
|
function OnAfterSaveFile()
|
||
|
local file = vmprotect.core():outputArchitecture()
|
||
|
for i = 1, file:segments():count() do
|
||
|
segment = file:segments():item(i)
|
||
|
name = GetRandomSectionName()
|
||
|
print(string.format("Section \"%s\" is renamed to \"%s\"", segment:name(), name))
|
||
|
segment:setName(name)
|
||
|
end
|
||
|
end]]>
|
||
|
</Script>
|
||
|
</Document>
|