Only truly safe way:
- Print the http request headers to a log file.
- Tell the user to wait.
- You, sitting at console, read the log file.
- You, write the request to the server which prompts you for the username and password (which you type in).
- The server hands back the results in a log file.
- You cat back the results to the end user.
Fairly straight forward. Very secure.
Possible problems:
- Your hits per second will suck (until you get really fast).
- This is still susceptible to you being kidnapped and tortured for the password that is only in your head.
- Even if you are not kidnapped and beaten, you will die from exhaustion only hours after you IPO.
There might be another way, but to do it without suid... I'd love to see it (and use it).
my @a=qw(random brilliant braindead); print $a[rand(@a)];