A more adaptable approach might be to rewrite
this as a client-server application, though there is the risk
of creeping-featurism if this is not handled carefully.
Essentially, if you can store a "secret key" on both the
client and the server in a pseudo-secure manner (i.e.
both machines are trusted, or trusted enough), you can
use a simple MD5-style hash to authenticate with a
challenge-response system. The MD5 "secret key" is really
just some stuff you made up, like a whole pile of random
letters.
The "server" part is a CGI program that asks a "question",
presenting a series of random characters that are to be
encrypted by the remote client. The "client" is the program
that uses
LWP to access the server. It downloads the
question ($response->content()), encrypts it with the key,
and sends it back for verification. If the
crypt() passes
the muster, the server records the address that the request
originated from, plus any other data you might have sent
with it (i.e. your "real" address, should it be different,
or what have you).
If you're feeling extra
lazy, you can use
LWP::Simple
instead of going whole hog. Also, forget sending HTML
back and forth, just use HTTP to mule your data raw.
Client/server package is probably only about 20 lines of
code, when you get right down to it.
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.