www.pudn.com > Allhosts.zip > Allhosts.c
/* http://www.cotse.com Fear the swimming Elephant! */ /* Mass DNS Query program for vicy, by crisk. */ #include#include #include #include #include #include void main(int argc, char *argv[]) { unsigned long current; struct hostent *host; char *curname; char thename[70]; int i,j,num; struct in_addr addr; if (argc<3) { printf("Not enough args\n"); return; } num = atoi(argv[2]); host = gethostbyname(argv[1]); if (!host) { printf("Cannot resolve starting point. Aborting.\n"); return; } current = *((unsigned long *)host->h_addr); printf("Beginning DNS lookups\n"); for (i=0;i h_name : curname); j = 0; if (host) while (host->h_aliases[j] != NULL) printf("\r%s",host->h_aliases[j++]); current += 0x01000000; printf("\n"); } printf("Ending DNS lookups.\n"); }