Changeset 5e140f298dbb2f136691b8623c74af85be4eda8e

Show
Ignore:
Timestamp:
09/20/01 06:05:29 (13 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1000965929 +0000
git-parent:

[9adf5e86f48122c081b0557248285f968efd7e52]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1000965929 +0000
Message:

prepost and non ASCII banners

git-svn-id: https://labs.omniti.com/resmon/trunk@7 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • TCPSERVICE.pl

    r37cbe43 r5e140f2  
    1919  socket($handle, Socket::PF_INET, Socket::SOCK_STREAM, $proto) || 
    2020    return "BAD(socket error)"; 
     21  $handle->autoflush(1); 
    2122  fcntl($handle, Fcntl::F_SETFL, Fcntl::O_NONBLOCK) || 
    2223    (close($handle) && return "BAD(fcntl error)"); 
     
    3233      return "BAD(connect failed)"; 
    3334    } 
     35    print $handle $arg->{prepost}."\r\n" if ($arg->{prepost}); 
    3436    ($fd) = $con->can_read($timeout); 
    3537    if($fd == $handle) { 
     
    3840      print $handle $arg->{post} if ($arg->{post}); 
    3941      close($handle); 
     42      $banner =~ s/([^\s\d\w.,;\/\\])/sprintf "\\%o", $1/eg; 
    4043      return "BAD($banner)" 
    4144        if($arg->{match} && ($banner =! /$arg->{match}/));