How to protect your software from being reverse translated |
| You are here : Home | Resources | How to... | Protect your software from being reverse translated |
Elsewhere on the site we took a look at Mike Rudin's Revtran. This article shows you have you can take some steps to prevent your software being reverse translated.
There are a couple of Freeware applications that claim to be able to protect your code, these are:
Using OPLProt:
OPLProt requires you to put additional code into your application prior protecting it. This code takes the form of a jump round a print statement which OPLProt converts into code that confuses Revtran. Using the same code as in the Revtran article the additional code is highlighted below:
include "AppInfo.oxh"
PROC Proc1:
LOCAL s%
GOTO Jump::
PRINT "OPLProt*"
Jump::
gUSE 1
gVISIBLE OFF
s%=gCREATE(100, 100, 100, 100, 1, $111)
gORDER s%,1
gBUTTON "Button", 2, 50, 25, 0
ENDP
PROC Proc2:
LOCAL aifFile$(255), iconFile$(255)
GOTO Jump::
PRINT "OPLProt**"
Jump::
AppExtractAifIcon:(aifFile$, 16, 0, iconFile$+"16")
gIPRINT "Hello world"
GET
ENDP
Running Revtran against the code produced by OPLProt produces the following error message and the subsequent code:
![]()
REM Reverse-translated Series 5 OPL,
REM created by Revtran V6.4 (2000) S5
REM from D:\Documents\Programming\Test.opo
REM on Sat 20 Jul 2002 11:15:52.
REM Please do NOT distribute any
REM program altered using Revtran,
REM except with permission from
REM the program's original author.
INCLUDE "Appinfo.oxh"
PROC Proc1:
!! Bad structure in command 2 at &48, 1 missing item;
procedure skipped. !!
PROC Proc2:
!! Bad structure in command 2 at &A1, 2 missing items;
procedure skipped. !!
REM Revtran V6.4 (2000) S5 finished.
Using SafeOPL32:
SafeOPL32 works in the same way as OPLProt in that it expects you to include additional code in your source. It also provides a small routine that will add these required lines to your code. However, in tests using the same test script above, I was not able to get this to work and it corrupted the source therefore I would recommend adding the lines by hand.
Ultimately the results from the two programs were pretty much the same given the relatively simple test. OPLProt is the slicker program of the two and seems to be genuinely free whereas SafeOPL32 requires a payment in kind if you charge for your program.