Re: [Plugins-writers] Converting a string to an int that's greater than 2^31-1

From: Jon Passki (cykyc@private)
Date: Thu Oct 06 2005 - 16:46:18 PDT


--- "George A. Theall" <theall@private> wrote:

> On Thu, Oct 06, 2005 at 09:32:06AM -0700, Jon Passki wrote:
> 
> > I'm tweaking my first plugin that I'm about ready to spam the
> list
> > with, but I'm having a situation where I'm given a string that
> > represents a long int.  I.e., the decimal value is greater than
> > 2147483647.  How can I convert that string into an int without
> > losing any information?
> 
> I don't think you can - NASL doesn't support long ints. Can you
> write
> your code so it looks at the value as composed of multiple parts?

Yeah, if I can break it down ;-)  Cyclical answer, I know.  The
string is an IP address, basically, in quad-octet form.  The moment
any numeric routines are applied, it's converted to an int, rounded
to 2^31.

Jon





		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
_______________________________________________
Plugins-writers mailing list
Plugins-writers@private
http://mail.nessus.org/mailman/listinfo/plugins-writers



This archive was generated by hypermail 2.1.3 : Thu Oct 06 2005 - 16:46:50 PDT