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: Can wrap encode plain text?

Re: Can wrap encode plain text?

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Fri, 24 May 2002 15:54:00 GMT
Message-ID: <3CEE6216.DFA8C4D2@exesolutions.com>


Andrew Hardy wrote:

> But even that leaves all the text in clear view.
>
> It is quite annoying, all variable names and types remain visible, many
> assignments are easy to read, cursor declarations are visible, etc.
>
> If you write a piece of PL/SQL whose contents are proprietary, it's
> difficult to hide how they function without making it unintelligible e.g.
> using meaningless variables, etc.
>
> Andy
>
> "Daniel Morgan" <dmorgan_at_exesolutions.com> wrote in message
> news:3CED654C.BC2A6F3A_at_exesolutions.com...
> > Yong Huang wrote:
> >
> > > I want to hide plain text in my PL/SQL code. If it's in
> > > dbms_out.put[_line] or htp.print, the text won't be "wrapped"; instead
> > > there's just a "1" in front of the line. The following test is done on
> > > 9i and 8.1.7.2:
> > >
> > > $ cat q.sql
> > > create or replace procedure p
> > > is
> > > begin
> > > dbms_output.put('This is trade secret!');
> > > end;
> > > /
> > >
> > > $ wrap iname=q.sql
> > >
> > > PL/SQL Wrapper: Release 9.0.1.0.0- Production on Thu May 23 16:20:55
> > > 2002
> > >
> > > Copyright (c) Oracle Corporation 1993, 2001. All Rights Reserved.
> > >
> > > Processing q.sql to q.plb
> > > $ grep "trade secret" q.plb
> > > 1This is trade secret!:
> > >
> > > Is there a way to encode that text?
> > >
> > > Yong Huang
> >
> > a := 'a';
> > w := 'secret';
> > x := 'This ';
> > y := 'is ';
> > z := 'trade ';
> >
> > dbms_output.put_line(x||y||a||'z||w);
> >
> > Though I can't imagine why you would have DBMS_OUTPUT in any production
> > code.
> >
> > Daniel Morgan
> >

What I teach my students is to put text into procedures they are going to wrap that is intended to mislead or obfuscate the real text. So, for example, you might define 26 separate words (rather than the 5 I did above) and just choose to not use 21 of them. With very little effort you can obscure anything as you will clearly see if you run the SELECT statement below"

SELECT TRANSLATE ('zhks ks a sfcrfz', 'abcdefghijklmnopqrstuvwxyz', 'abcdfeghkjilmnopqrszuvwxyt ')
from dual;

Daniel Morgan Received on Fri May 24 2002 - 10:54:00 CDT

Original text of this message

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