What you are getting is a 2-character representation of each digit --
it is a simple matter to convert to a readable format with:

<cfscript>

x="4954554650495446505350465254";

y="";
for (i=1; i LT Len(x); i=i+2) {
y=y & chr(mid(x, i, 2));
}

writeoutput("<br>" & x);
writeoutput("<br>" & y);

</cfscript>

Which gives:

4954554650495446505350465254
167.216.252.46

HTH

Dick

On Jul 17, 2004, at 8:43 AM, pandemic wrote:

> Hi,
>
>  I'm running into an issue that's got me stumped.��I have an
> application
>  that is storing IP addresses as unsigned 32 bit integers in a mysql
> db.
>  I need to pull this data from the db via Coldfusion (MX) so i've got
> my
>  select statement:
>
>  select distinct inet_ntoa(ip_src) as ipsource from acid_event limit 2;
>
>  Which returns:
>
>  +--------------+
>  | ipsource�����|
>  +--------------+
>  | 4.7.210.187��|
>  | 4.10.136.181 |
>  +--------------+
>  2 rows in set (0.09 sec)
>
>  inet_ntoa() is a native mysql function that converts the unsigned
> 32-bit
>  int into a 4-octet IP.��My problem is that CF thinks the result is
>  spiting out binary output, exact error is:
>  rror Occurred While Processing Request
>  ByteArray objects cannot be converted to strings.
>
>  A cfdump of the query and error are at
>  http://console.syn-recon.net/includes/top10attackers.cfm
>
>  Anyone have any advice ?
>
>  Thanks,
>  Florian
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to