[Plugins-writers] working with nulls :)

From: Douglas Nordwall (doug@private)
Date: Wed Sep 27 2006 - 07:59:48 PDT


So, on to my next "make the scans cleaner" project.

How would one deal with snmp coming back with something like:

9.1.1.13.0 = Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00

It's not a null, from near as I can tell... that is, isnull(var[1])  
and isnull(string(var[1])) both are not true. doing a string(var[1])  
gives:
..........

it displays 10 periods which are not the ascii values (an artifact of  
the terminal perhaps?). I can get the length of the string (yay!) but  
am leery of just matching on a length (although, honestly, in this  
case, it's probably not gong to return any false negatives). How  
might one go about matching that? Forgive me, while I have a CS  
degree, my programming is kinda rusty (like 7 years since I was  
programming every day) and the documentation I can find is complete  
on what it covers, but I don't think it covers this :)

Doug Nordwall
Unix Administrator
EMSL Computer and Network Support
Unclassified Computer Security
Phone: (509)372-6776; Fax: (509)376-0420
The best book on programming for the layman is "Alice in Wonderland";  
but that's because it's the best book on anything for the layman.





_______________________________________________
Plugins-writers mailing list
Plugins-writers@private
http://mail.nessus.org/mailman/listinfo/plugins-writers



This archive was generated by hypermail 2.1.3 : Wed Sep 27 2006 - 08:00:41 PDT