[Nagiosplug-devel] [ nagiosplug-Feature Requests-1348595 ] check_tcp w/ expect string doesn't work w/ nulls in data

SourceForge.net noreply at sourceforge.net
Fri Nov 4 11:43:25 CET 2005


Feature Requests item #1348595, was opened at 2005-11-04 14:42
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397600&aid=1348595&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Submitted By: John Rouillard (rouilj)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_tcp w/ expect string doesn't work w/ nulls in data

Initial Comment:
I have a tcp service that generates a pattern that I
can test
for using the -e flag. However the data stream is binary
and nulls are embedded in the data stream and prevent
strstr() from recognizing the pattern in the stream.

E.G. set up a server that spits out

  \000 h e l l o

then use check_tcp -e "hello".

One way to do this is to use memchr and the length of the
data returned in the my_read call from the tcp socket to
implement a null agnostic strstrb() replacement for
strstr().

-- rouilj


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397600&aid=1348595&group_id=29880




More information about the Devel mailing list