Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333] : superdoc . print w/replies, xml ) Need Help??
Generally the answer is no, but.. technically I think the answer might be yes if you can get your user to run a program (written in Perl though they don't need to know) to do so.

With the getpwuid command in Perl (or unix command line) you can get your login. I suppose the script could send this information in an encrypted signed hash as a cgi parameter to your server-side cgi program.

The information could be sent by having the client-side script open this composed URL in netscape. I sometimes use the following to open a picture in netscape.. probably this wouldn't be secure if you can read the source or replace it with your own script, so no guarantees. Also the URL would go out as cleartext if you are not running ssl.

cat /sbin/nsopen #!/usr/bin/perl $in = shift; $cmd = "netscape -remote \'openURL(" . $in . ")\'"; system $cmd;

The above code just opens a page in Mozilla. Possibly this kind of thing could be done in Windows too.

Update: I was thinking that this was a closed environment where you are running the server and everyone is logged in to it already. Otherwise, as Zaxo mentioned this is probably not a snooper script you will be able to get people to install. Was thinking of X based gui clients for astronomy or the mysql gui. Maybe not applicable to what you want to do.


In reply to Re: Detect logon ID from Browser by mattr
in thread Detect logon ID from Browser by TexasTess

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.