#!/usr/bin/perl -w # # companies.pl (c) 2000-2003 Nick 'Sharkey' Moore # sharkey@zoic.org use LWP::UserAgent; $| = 1; # Setup @prefix = ('', 'www.'); @first = qw(micro multi my quick easy cyber super ultra hyper tele inter mega X open); @last = qw(soft tech ware net sys source); @domain = qw(.com .net .org .biz); my $ua = new LWP::UserAgent; $ua->agent('Agent/0.86 ' . $ua->agent); $ua->env_proxy(); $ua->timeout(45); sub pinger { my $fqdn = shift; foreach $prefix (@prefix) { my $url = "http://$prefix$fqdn/"; print STDERR "... trying $url\t\t"; my $req = new HTTP::Request HEAD => $url; my $res = $ua->request($req); print STDERR $res->status_line ."\n"; return "$prefix$fqdn" if ($res->is_success); } return undef; } print <<__EOF; Domain Name Bingo!

Domain Name Bingo!

  __EOF foreach my $last (@last) { print "\t$last\n"; } foreach my $first (@first) { print "
$first\n"; foreach my $last (@last) { print "\t\n"; foreach my $domain (@domain) { my $fqdn = pinger("$first$last$domain"); print qq!\t\t$fqdn
\n! if $fqdn; $fqdn = pinger("$first-$last$domain"); print qq!\t\t$fqdn
\n! if $fqdn; } } } print <<__EOF;

This table contains only fqdns which responded politely to a HEAD / request.
The script tries http://fqdn/ first, and if that fails has a go at http://www.fqdn/ for a laugh.
As well as all the 503's, there were a heap of 500, 404, 403 and 304 responses from various bits of crap, which I've left out.

Yeah, a lot of these are with domain name reservations, too.

generated by companies.pl __EOF