View Single Post
  #29 (permalink)  
Old May 23rd, 2002
tshdos tshdos is offline
Gnutella Veteran
 
Join Date: March 24th, 2002
Location: Virginia
Posts: 101
tshdos is flying high
Default

Quote:
I dont really know how to validate an ip?
What range do IPs have?
Is it always from 1 to 255?
For the purposes used here, it is probably easier just to compare the left n chars of the ip against the chars of the ip.
Example:

Public Const IP_MASKS = "127|192.168|(...)"

For Each Mask In Split( IP_MASKS, "|" )
If Left( HostIP, Len( Mask ) ) = Mask ) Then
'block ip
...

IPs range from 0 to 255. I am not sure if it is possible to have a 0 as the first number in an ip but it is ok for the others. I also think 255 might be reserved but I will have to check on that.


Quote:
I searched for tshdos on ICQ and I found one are
you Kevin?
Yes that is me. I have not used it in a year or so. I assumed they would delete it after a while.

Quote:
Well it is ok if I add your name on that
temporary homepage of Lynn?
I have no problem with that.
Reply With Quote