Re: [Plugins-writers] working with nulls :)

From: Douglas Nordwall (doug@private)
Date: Wed Sep 27 2006 - 08:08:35 PDT


On Sep 27, 2006, at 8:04 AM, Renaud Deraison wrote:
>
>
> The easiest way would be to convert it to an hex string :
>
>
>
> str = hexstr(data);
> if ( str == "0000000000000000000000" ) do_stuff();
>
>
> Alternatively, you can also do :
>
> if ( data == raw_string(0,0,0,0,0,0,0,0,0,0,0) ) do_stuff();
>
>
> I tend to find the former a bit more readable.
>
>

and I would agree with you. I didn't see hexstr in the documentation,  
but was wondering if it was there :)

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


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:09:06 PDT