Hi,
Is there a way to protect a FWH exe against being debugged or decompiled?. I do not want to use a compresion software such as UPX, as I have tested it and it does not always work.
Makbe a function that avoid some vectors?.
protection againts debugers or decompilers
protection againts debugers or decompilers
Saludos / Regards,
FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
- Patrick Mast
- Posts: 244
- Joined: Sat Mar 03, 2007 8:42 pm
Re: protection againts debugers or decompilers
I use OPX all the time and did not encounter any problem so far. How does it fail for you?MOISES wrote:Is there a way to protect a FWH exe against being debugged or decompiled?. I do not want to use a compresion software such as UPX, as I have tested it and it does not always work.
Also, in your code, you can do:
#pragma TEXTHIDDEN(1)
This scrambles any text in your exe. This makes "reading" text from your sources in your exe impossible.
See this sample:
Code: Select all
//NOTEST
/*
* $Id: tstprag.prg,v 1.2 2005/04/22 18:41:31 ptsarenko Exp $
*/
#pragma TracePragmas=On
#pragma ExitSeverity=1
/* Unknow pragmas will be ignored silently */
#pragma BadPragma=off
#pragma /Y+
function Main()
#pragma Shortcut=On
#pragma Shortcut= Off
#pragma Shortcut = On
#pragma Shortcut(OFF)
#pragma Shortcut( On)
#pragma Shortcut( OFF )
#pragma Shortcut( On )
#pragma Shortcut( OFF )
#pragma Shortcut( ON
/* or #pragma /Z+ */
if .t. .and. .f.
? "Always"
endif
if .f. .and. .t.
? "Never"
endif
#pragma /Z-
/* or #pragma Shortcut=Off */
#pragma Exitseverity=0
#pragma Exitseverity=1
#pragma Exitseverity(0)
#pragma Exitseverity( 1 )
#pragma Exitseverity( 0 )
#pragma Exitseverity= 2
#pragma Exitseverity= 1
/* Pragmas with bad values will cause an error */
#pragma WarningLevel=8
#pragma TEXTHIDDEN(1)
? "This is a hidden text"
#pragma TEXTHIDDEN(0)
return nil
Sincerely,
Patrick Mast,
xHarbour.com Inc.
http://www.xHarbour.com
Patrick:
Thank you for your reply. I tested http://upx.sourceforge.net/ and in some computers the program just did not run, so I decide not to use it any longer.
I am afraid I don´t understand the C example. Could you explain a little bit, please?.
Thank you.
Thank you for your reply. I tested http://upx.sourceforge.net/ and in some computers the program just did not run, so I decide not to use it any longer.
I am afraid I don´t understand the C example. Could you explain a little bit, please?.
Thank you.
Saludos / Regards,
FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40