Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: scramble ad link

by TedPride (Priest)
on Jul 02, 2006 at 08:10 UTC ( #558838=note: print w/replies, xml ) Need Help??

in reply to scramble ad link

This is more an obfuscation problem than anything else. Sure, there are millions of ways to encrypt the link, but anyone with half a brain will still be able to figure out where it is in the code, even with little or no programming experience. What you need to do is add a verification routine entirely separate from the link print (and preferably hidden somewhere they aren't likely to look) that loads the script, computes a hash of its size and/or contents, and checks it against an internal hash to make sure the script hasn't been modified. Then if they remove your link, the script errors out, and most people won't be smart enough to figure out why.

Replies are listed 'Best First'.
Re^2: scramble ad link
by GrandFather (Saint) on Jul 02, 2006 at 09:43 UTC

    Note Re: $. - smarter than you might think which describes using <DATA> to access the source of the script. That's a neat way to get the source actually being executed and if there is any excuse (like configuration parameters for example) to have a __DATA__ section then much of the code pertaining to the tests can vanish from sight as being relevant to checking configuration.

    The code protection could be made rather strong by requiring a key (some of the source) to decode important parts of the code that then get executed using eval.

    DWIM is Perl's answer to Gödel

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://558838]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2021-10-16 10:59 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (69 votes). Check out past polls.