Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Error compiling obfuscated code in Oracle 10g

Re: Error compiling obfuscated code in Oracle 10g

From: Anurag Varma <avdbi_at_hotmail.com>
Date: Thu, 24 Feb 2005 05:43:24 GMT
Message-ID: <0QdTd.26540$vK5.2819@twister.nyroc.rr.com>

"Rich" <rfried_at_visto.com> wrote in message news:1109208700.940819.128210_at_z14g2000cwz.googlegroups.com...
> My company is trying to ofbcfuscate our database code using Oracle's
> wrap utility.
>
> Seems pretty straightforward. For each pl/sql file, you call wrap
> iname=file.sql oname=file.plb. I even wrote a nifty batch file that
> takes in a directory name and wrapes each file.
>
> Everything worked using the 8i version of wrap. Got some nice
> gobbledy-gook, saw the dreaded string literals, but everything
> compiled.
>
> But, 8i's no longer supported, and the rest of our system is 10g. So,
> we installed the 10g client. After much handwringing, we got it to
> work. For whatever reason, it's not installed as part of the main
> client tools. Rather, following Oracle's advice, we installed the
> custom client with everything, then copied in two files: wrap.exe and
> ORAPLC10.DLL. This did the trick, and we got nice gobbledy-gook files.
> Or so we thought.
>
> Problem is, the 10g-wrapped files won't compile. I've tried numerous
> times, and with various syntax. I've tried converting the source using
> dos2unix, or removing crlf, etc.
>
> I opened the .plb files, and noticed something fishy - the 10g-wrapped
> files look like there are no spaces. Just one long 73-char fixed-width
> column. Looking at the hex, there are no spaces, cr's, lf's, or any
> other "break". Depending on the source, I've gotten PLS-00114:
> identifier '(...)' too long, PLS-00103: Encountered the symbol "+",
> etc. So, I think the files are wrapped incorrectly. If I had to
> guess, I'd say that the "workaround" install of wrap was only partially
> successful, though the instructions came from Oracle, according to our
> DBA...
>
> On the other hand, the 8i-wrapped files have some, albeit weird,
> format. They compile just fine.
>
> Help? We were supposed to go to production with this in a few days.
> (I made the mistake of testing with the 8i client, and assumed that the
> 10g files would work fine. QA informed me otherwise)
-snip-

The problem is most probably with your pl/sql code. Maybe its having problems compiling in a 10g database.
The wrap utility has changed from 8i/9i to 10g. In fact most of oracle code is wrapped. So if there was a general problem with the wrap utility, I'd expect that to affect the oracle wrapped code quite significantly. Try for example viewing the .plb files in $ORACLE_HOME/rdbms/admin ... What you think is incorrect/abnormal wrapping seems to be normal.

So unless you wish to show us a sample code which is failing in your case .. you might want to open a Tar.

BTW: The example code in your mail works fine (wrapped) in my 10g database.

Anurag Received on Wed Feb 23 2005 - 23:43:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US