3
votes

When I compile a project containg code such as:

ttest = record
   one, two: string;
   three: integer;
end;

I can see in the EXE strings like "ttest", "one", "two", and "three".

This is in any verion of Delphi, even in Free Pascal.

Is there any possibility to not put this in the compiled program? Without using packers, encrypters, or the like.

4
are you building a release version since it sounds more like a debug version unless those names are constant values... - Remko

4 Answers

3
votes

Not sure that this will help, but check out create smaller delphi xe executable, it seems like removing the RTTI could solve your problem.

3
votes

Try turning off every kind of debug information you can find in the Project Options dialog (menu item Project/Options), then rebuild the whole project (i.e. not just Compile, use the Project/Build menu item so that every unit in the project is recompiled). That should fix it.

The actual options you have to deselect in the project options depend on your Delphi version: for Delphi 2006/Turbo Delphi, these include all options under Debugging on the Compiler tab (maybe except "Assertions") and on the Linker tab "Include TD32 debug info" / "Include remote debug symbols". Newer Delphi versions have a "Build Configuration" feature similar to Visual Studio, selecting "Release" here and rebuilding should remove all "telltale" debugging information.

1
votes

Just avoid to put your data as published, if possible, otherwise fields names are visible. Additionally, don't forget that every method created when cliking the property inspector is automatically put as published (because they are also used in the dfm files). So each 'Button1Click' etc is visible and therefore easily localizable (method code).

Just check any program compiled with Delphi in IDA free and with the special 'Delphi string IDC script (find it at the IDA palace)'.In the Names window you'll easy see every TSomething, every TSomething published properties and methods...

0
votes

I solved the problem. Using "string" in records causes that the record name is visible in executable