When I try to mark blocks of the code containing string constants that is stored in variables, I got some errors.
I want to knwo how to use the VMProtect's Markers to do that.
My code :
Code: Select all
procedure TForm1.IdMappedPortTCP1Execute(AThread: TIdMappedPortThread);
var Payload, Host, Header, Krypt1, Krypt2:String;
begin
VMProtectBegin
('Krypt1 := EncryptString('website.com', 'pwd');'+sLineBreak+
'Krypt2 := EncryptString('website.net', 'pwd');');
VMProtectEnd;
if (pos('CONNECT',athread.NetData)<>0) or (pos('HTTP',athread.NetData)<>0) then begin
if host.Text = 'Host' then begin
Payload := 'GET http://'+Krypt1+'/ HTTP/1.1'+#13#10;
Host := AddHeader(AThread.NetData,'Host: '+Krypt2+''#13#10);
AThread.NetData := Payload+Host;
end;
end;
end;