Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I have a Perl script ("use"-ing a number of packages written by me) which is supposed to be run from a particular directory (this is the "supported" version of the script). Some smart users are making a local copy of this script and using that after making whatever modifications they want. How to prevent this?

My users can run the script from various platforms (different flavors of Unix and Windows). They run the script typically from command line (or from other scripts) but never from a web interface.

I have an Oracle database which I make use of. By running the modified versions of my script, users can insert/update junk data into the database which I want to stop.

I can think of various ways to check if the absolute path (obtained using, e.g. FindBin) of the script run is a "supported" one, but the problem is that this check is done in the Perl file itself and the malicious user can easily remove that part of the code from his local copy.

Due to the huge number of platforms I have to support, I don't want to do the above check in, e.g. C (where I can have a complied version of the code) as to manage the compilations would be a nightmare then.

Any suggestions would be appreciated.

In reply to How to ensure that a supported version of my script is being executed? by sanbiswa

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the monks are mute...

    How do I use this? | Other CB clients
    Other Users?
    Others scrutinizing the Monastery: (4)
    As of 2018-05-21 17:45 GMT
    Find Nodes?
      Voting Booth?