While still not 100% accurate, you could use the output of ifconfig to determine if your script is running on the machine you expect. My host, for example, has no external IP address but uses an Ethernet card to connect to a router. ifconfig returns the Hardware address of the Ethernet card. This is (supposedly) a unique address and thus you could use this address for your script.
Others have pointed out that code like die unless $hardware eq '6E:34:D8:6C:18' is easily bypassed. So maybe it'd be worth looking at an encryption of your code that uses the machine's hardware address as the key? That way the 'proxy' gets your hardware address and decrypts a code file using the key. It then runs the file or returns an error.
Of course, the serious hacker can still easily bypass this, but it wouldn't be too hard to write just this part in a compiled C file.
Just my thoughts on how to do the (nearly) impossible.
"Get real! This is a discussion group, not a helpdesk. You post something, we discuss its implications. If the discussion happens to answer a question you've asked, that's incidental." -- nobull@mail.com in clpm
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.