[EMAIL PROTECTED] wrote on 07/06/2005 05:53:34 AM:

> 

> $the_ip='80.224.159.46';
> $the_ip =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; $the_domain="$4.$3.$2.$1.
> sbl-xbl.spamhaus.org"; 
> >>##  you're reversing the order of the IP here. . . Is there some
> reason you're >>doing this?  $the_domain should now equal "46.159. 
> 224.80.sbl-xbl.spamhaus.org"
> 

46.159.224.80.sbl-xbl.spamhaus.org is not a valid domain name (unless it 
has been explicitly defined in the name server). The IP address uniquely 
identifies a network node. The node name is a convenience and an 
address-name association must be defined somewhere (in name server, local 
hosts file, etc.). Domains partition the namespace and allow distribution 
of services; e.g., each domain has a name server which are heirarchically 
invoked when resolving a name, as opposed to a single network-wide name 
server.

---------------

The purpose of my script is to determine if an IP is listed in the Spamhaus
DNS blacklist. If an IP is blacklisted, there will be an A record in
Spamhaus's dns servers for [reversed ip].sbl-xbl.spamhaus.org.

i.e.

58.74.125.200.sbl-xbl.spamhaus.org

Will return:

58.74.125.200.sbl-xbl.spamhaus.org.  3600  IN  A  127.0.0.4
58.74.125.200.sbl-xbl.spamhaus.org.  3600  IN  TXT
"http://www.spamhaus.org/query/bl?ip=200.125.74.58";

- Chris

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to