Implement it as a CFX? :)
-Original Message-
From: Michael Dinowitz [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 10, 2000 6:30 PM
To: [EMAIL PROTECTED]
Subject: Re: Testing Assignment
Only problem is that formatbasen will fail if the number is to high. It
overloads what CF sees
them. I'll include the code for cf_longmod as well as others in it.
Implement it as a CFX? :)
-Original Message-
From: Michael Dinowitz [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 10, 2000 6:30 PM
To: [EMAIL PROTECTED]
Subject: Re: Testing Assignment
Only problem
I'm holding back from posting my tag result to the gallery so I can see
what
others will try. If anyone wants the tag now without trying to do it
themselves, contact me off list.
Something like this?
cfSetting enableCFOutputOnly="yes"
cfScript
// 2 vars for tag:
// ip = address to translate
//
I know thats not exactly what you asked but its one way to do dotless IP's
:)
I realize some are HEX and some are long binary.
I got reply happy ;)
- Original Message -
From: Michael Dinowitz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 10, 2000 1:11 PM
Subject: Testing
They're hex addresses as well? I didn't know that. My solution was:
CFPARAM NAME="Attributes.IP" TYPE="String"
CFPARAM NAME="Attributes.IPName" DEFAULT="IP" TYPE="String"
CFSET SetVariable('caller.'attributes.ipname, (ListGetAt(Attributes.IP, 1,
'.')*16777216)+(ListGetAt(Attributes.IP, 2,
Short and sweet, since I had a couple of minutes:
CFSET IP=Attributes.IP
CFSET Dotless = 0
CFSET Octets = ListLen(IP,".")
CFLOOP From="1" To="#Octets#" Index="i"
CFSET Dotless=Dotless + (ListGetAt(IP,i,".") * (256 ^ (Octets-i)))
/cfloop
CFSET Caller.Dotless=Dotless
Chris Evans
[EMAIL
Well, if you want to hardcode it. You'll have to re-code for IPv6 :).
Chris Evans
[EMAIL PROTECTED]
http://www.fuseware.com
-Original Message-
From: Brandon Whitaker [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 10, 2000 1:18 PM
To: [EMAIL PROTECTED]
Subject: Re: Testing Assignment
Here is a real quicky I put together over lunch:
== Start Code ==
cfparam name="Attributes.IP" default="0.0.0.0"
cfif ListLen(Attributes.IP, ".") NEQ 4 OR ListGetAt(Attributes.IP, "1",
".") EQ 0
!---
Error catching goes
[mailto:[EMAIL PROTECTED]]
Sent: Monday, July 10, 2000 1:18 PM
To: [EMAIL PROTECTED]
Subject: Re: Testing Assignment
I'm holding back from posting my tag result to the gallery so I can see
what
others will try. If anyone wants the tag now without trying to do it
themselves, contact me off list
Please excuse the wrapping imposed by Eudora...
At 12:52 PM 7/10/2000 -0500, you wrote:
Here is a real quicky I put together over lunch:
== Start Code ==
cfparam name="Attributes.IP" default="0.0.0.0"
cfif ListLen(Attributes.IP,
:)
- Original Message -
From: Russel Madere [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 10, 2000 1:54 PM
Subject: RE: Testing Assignment
Will IPv6 work with dotless IP addresses?
I haven't stayed up on it.
Russel
At 01:57 PM 7/10/2000 -0400, you wrote:
Well, if you want
Hey, that was more fun than work!
Thoughts for future versions . . . reverse (dotless to dotted), octal
addresses, hexadecimal addresses, combinations of hex, octal and dotted,
masked ip addresses with multiples of 256 added to a dotted IP or multiples
of 4294967296 added to dotless IPs.
I
I think that we should take all the options that you and others have
mentioned and make a single CF_IP that will have options for them all. Make
it a 'group project' with myself or someone else as the primary caretaker (a
la open source software).
Hey, that was more fun than work!
Thoughts
]
Sent: Monday, July 10, 2000 3:42 PM
Subject: Re: Testing Assignment
I think that we should take all the options that you and others have
mentioned and make a single CF_IP that will have options for them all.
Make
it a 'group project' with myself or someone else as the primary caretaker
(a
la
Me and a co worker *cough* cam *cough* were discussing
this and it would be a lot easier to write the range
checking code using the array converted to hex.
The InputBaseN tag would work well. Okay ill write
my version of how I would do it :P
Okay here goes some code, forgive the formatting
Looks good, although I have one thought to throw in...
At 05:47 PM 7/10/00 -0400, you wrote:
sniped
!--- Can convert multiple IP's using large dim arrays?? *shrug* ---
CFLOOP LIST="#ipAddress1#" DELIMITERS="." INDEX="i"
CFSET ipAddress1Arr[loopCnt] = i
CFSET loopCnt = loopCnt
Only problem is that formatbasen will fail if the number is to high. It
overloads what CF sees as an integer.
Me and a co worker *cough* cam *cough* were discussing
this and it would be a lot easier to write the range
checking code using the array converted to hex.
The InputBaseN tag would
arithmetic.
Michael J. Sheldon
Internet Applications Developer
Phone: 480.699.1084
http://www.desertraven.com/
PGP Key Available on Request
-Original Message-
From: Michael Dinowitz [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 10, 2000 15:30
To: [EMAIL PROTECTED]
Subject: Re: Testing Assignment
: Testing Assignment
True, it will fail for all IPs in the 128.XXX.XXX.XXX range or higher. Worse
yet, the behavior changed from CF 4.0 to 4.5
I had several functions from a year ago that had to be hacked badly in order
to keep them working. The moral of the story? CF sucks giant rocks when it
comes
19 matches
Mail list logo