inetnum 202.60.224.0 - 202.60.251.255 netname CYBEREC-HK descr Cyber Express Communication Ltd. descr Internet Services Provider descr Broadband Internet Access Service country HK admin-c PC2-AP, inverse tech-c PC2-AP, inverse mnt-by APNIC-HM, inverse mnt-lower MAINT-HK-CYBEREC, inverse changed hostmaster@apnic.net 20000405 source APNIC person Peter Chow, inverse address Cyber Express Communication Ltd. address Room 3, 7/F, Perfect Ind. Building address 31 Tai Yau Street, Sanpokong, Kowloon country HK phone +852-2353-1445 fax-no +852-2353-1105 e-mail hkptc@cyberec.com, inverse nic-hdl PC2-AP, inverse mnt-by MAINT-HK-CYBEREC, inverse changed hkptc@cyberec.com 20000407 source APNIC
#!/usr/bin/perl -w use strict; my $arin="/usr/bin/whois -h whois.arin.net"; my $ripe="/usr/bin/whois -h whois.ripe.net"; my $apnic="/usr/bin/whois -h whois.apnic.net"; my $krnic="/usr/bin/whois -h whois.krnic.net"; my $email; my $domain; my $result; my $ips = "203.197.64.42"; whois($ips); sub whois{ my $ip = $_[0]; $result = `$arin $ip`; if ($result =~ m/European Regional Internet Registry/){ $result = `$ripe $ip`; if (match()){ } #close if match } #close if result elsif ($result =~ m/Asia Pacific Network Information Center/){ $result = `$apnic $ip`; if ($result =~ m/hostmaster\@apnic.net/){ last; }#end if if ($result =~ m/Allocated to KRNIC Member/){ $result = `$krnic $ip`; } #end KRNIC match if (match()){ } #end if match } #end elsif elsif (handles($arin)){ if (match()) { } #end if match } #end elsif elsif (($email, $domain) = $result =~ m/([-.\w]+)(\@[-.\w]+)/) { print "The 1st email address is: $email$domain\n"; print "Email will also be sent to: abuse$domain\n"; } #end elsif else { print "Can not perform a whois query for $ip\n;" } #end else } #close whois sub ############### # Subroutines # ############### # whois: Obtain an email address from a whois query # sub match { ($email, $domain) = $result =~ m/([-.\w]+)(\@[-.\w]+)/; print "The 1st email address is: $email$domain\n"; print "Email will also be sent to: abuse$domain\n"; } #end sub match # handles: Obtain the handles from a whois query # sub handles { my $registry = $_[0]; $result =~ m/xxx/; my @handle = $result =~ m/\((.*?)\)/g; $result = `$registry $handle[1]`; } #end handles
In reply to How to Ignore an email address with this script. by dru145
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |