I have downloaded a rather simple link creation script.

Download a better one from http://nms-cgi.sourceforge.net/, specifically Free For All Links

Download this patch to add password protection (use the [download] Code link)

diff -b -B -r -U0 ffa/ChangeLog ffa-pass/ChangeLog --- ffa/ChangeLog 2003-01-16 23:05:58.000000000 -0800 +++ ffa-pass/ChangeLog 2012-03-08 18:05:11.625000000 -0800 @@ -0,0 +1,4 @@ +2012-03-08-18:04 Anonymous Monk + * add lame password protection so only admin can add links + * this could have been accomplished using .htaccess + diff -b -B -r -U0 ffa/ffa.pl ffa-pass/ffa.pl --- ffa/ffa.pl 2003-01-16 23:10:24.000000000 -0800 +++ ffa-pass/ffa.pl 2012-03-08 18:07:15.609375000 -0800 @@ -40,0 +41,3 @@ +# this is your password -- this is lame, unless your page is https, p +assword is sniffable +my $secretpass = 'the password i hardcoded'; + @@ -184,0 +188 @@ +my $password = param('password') || ''; @@ -194,0 +199 @@ +$password = escape_html($password); @@ -202,0 +208,6 @@ +unless ( $secretpass eq $password ) { + print redirect($linksurl); # only admin adds n + exit; +} + + @@ -315,0 +327 @@ + <input type="hidden" name="password" value="$password" /> @@ -345,0 +358 @@ + <input type="hidden" name="password" value="$password" /> diff -b -B -r -U0 ffa/links.html ffa-pass/links.html --- ffa/links.html 2002-01-30 09:21:04.000000000 -0800 +++ ffa-pass/links.html 2012-03-08 18:01:58.671875000 -0800 @@ -17,0 +18 @@ + Passsword: <input type="password" name="password" size="30" />< +br /> diff -b -B -r -U0 ffa/README ffa-pass/README --- ffa/README 2002-03-20 09:04:14.000000000 -0800 +++ ffa-pass/README 2012-03-08 18:08:15.343750000 -0800 @@ -58,0 +59,3 @@ + +$secretpass - CHANGE FROM DEFAULT so only you can add links. Only s +ecure over https. +

Apply patch

unzip ffa.zip cd ffa patch -p1 < ..\ffa.to.ffa-pass.min.diff

Then read the README to install/configure it, remember to change the default password :)


In reply to Re: Testing password variable by Anonymous Monk
in thread Testing password variable by silverbullet

Title:
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, 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:
    & &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.