mirror of
https://github.com/Alukym/VMProtect-Source.git
synced 2025-06-17 10:18:00 -05:00
Initial commit
This commit is contained in:
32
examples/scripts/Random Section Names/Project1.exe.vmp
Normal file
32
examples/scripts/Random Section Names/Project1.exe.vmp
Normal file
@ -0,0 +1,32 @@
|
||||
<?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>
|
Reference in New Issue
Block a user