Mass DNS Lookups Script

I needed an easy way to do mass DNS lookups a while back, and found a script online that I modified slightly to fit my needs. Posting it below for archiving purposes.