To control something such that it only 'works' internally is difficult - if you distribute the code, someone can disassemble it, even if it's compiled.
To make it _more difficult_ on the other hand: what you need is something you can check - from within your script - that verifies that it's 'ok'.
There's nothing you can really do here that can't be spoofed but my thoughts would be (one or more of):
- check local hosts fully qualified DNS name.
- check the local host has the right network configuration.
- fire up a website, or daemon on a server internally (and ensure it's firewalled/not resolvable externally) and have the script perform a basic web fetch.
- Authenticate the user running your script, against an internal service. (E.g. LDAP/AD/nis etc.).
The short answer is of course that if you've given away an executable, someone can _always_ retro engineer it. The only way to retain some degree of control is to turn your script into a server side application - keep control of the code, and let people access it with their web browser. At which point you can do a lot better in terms of access control/authentication.
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, details, 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, summary, 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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.