i have done such script already for myself, howeber, its a very complicated and timely job, because every domain name registration provider is defending itself against such "attack", the huge bulk dns queries are considered attacks, so the only way is doing it relatively slowly. Otherwise the bot could be blocked and access denied.
Well, if You are really interested , send me your detailed idea how You expect the thing should work, how many queries do you expect and what kind of data You exactly expect.