This way, your password is transferred in plain text over the net!
You could use a CGI script to give you the last line of the file; there is no need to use telnet.
use strict; use warnings; my $correct = "eod complete exit status = 0"; use LWP::UserAgent; my $ua = new LWP::UserAgent; my $req = new HTTP::Request GET => "http://server.net/obscure-url/loglastline.cgi"; $res = $ua->request($req); if ($res->is_success) { warn "Log not correct: " . $res->content . "\n" unless ($res->content =~ /$correct/; } else { die "Ooops. something went wrong:\n" . $res->as_string() . "\n"; }
Update: Sorry -- maybe I shouldn't just assume that the Unix server has a webserver installed. I do recommend using ssh, though. You could even set up a user that upon login is presented with the last line of the shell script (set the login shell to a shell script that does that), then logs out. Set up a key pair for this user on the NT box and the Unix box, then call ssh using perl and catch the output. This should be much more secure.
In reply to Re: remote logchecker
by crenz
in thread remote logchecker
by ackme
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |