You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
503 B
Perl

#!/usr/bin/perl
$TIMEOUT = 3;
$BUFLEN = 1024;
vec($rin='', fileno(STDIN), 1) = 1;
select($rout=$rin, undef, undef, $TIMEOUT);
if (vec($rout, fileno(STDIN),1))
{
exit if (sysread(STDIN, $line, $BUFLEN) < 1);
($serverPort, $clientPort) = split(',', $line);
$serverPort = int($serverPort);
$clientPort = int($clientPort);
exit if ($serverPort < 1 || $clientPort < 1);
printf("%s , %s : USERID : %s : %s\r\n", $serverPort, $clientPort, "MSDOS", "billgates");
}