If you have access to the Verisign Zone file (Verisign TLD Zone files), and wish to extract the domain names to a text file for processing by another program, or to insert the domains into a database all you need to do is grep the file like so:

For .NET domains:
grep “^[a-zA-Z0-9-]\+ NS .*” net.zone|sed “s/NS .*//”|uniq >> netdomains.txt

For .COM domains:
grep “^[a-zA-Z0-9-]\+ NS .*” com.zone|sed “s/NS .*//”|uniq >> comdomains.txt

For .EDU domains:
grep “^[a-zA-Z0-9-]\+ NS .*” edu.zone|sed “s/NS .*//”|uniq >> edudomains.txt

This will create files that just contain the list of domains, each domain on a new line.  They will be missing the .com/.net/.edu extension so you will need to add the correct extension (depending on the file) during your import process, or in you code after the import.

Be prepared to wait.  It takes over an hour to process the .COM zone file on a MacBook Pro Core2 2.8Ghz machine.  Hey… as a side benefit, you can also cook eggs on your keyboard if you are hungry. Enjoy your eggs and a little Verisign Zone File on the side!