what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

resolver.c

resolver.c
Posted Apr 2, 2003
Authored by jaguar

Mass domain name resolver that takes a file full of IP addresses as input.

tags | tool
systems | unix
SHA-256 | 1e7ebd83d4d2836ad207b8a6a69f7c1349b1863e7d37f837079afbcd63fb7cc9

resolver.c

Change Mirror Download
/* resov.c v1.0 mass domain resolver by jaguar
it accepts ips from a file
greets : dim , devine
*/


#include<stdio.h>
#include<netdb.h>
#include<netinet/in.h>
#include<sys/socket.h>
#include<arpa/inet.h>
#include<errno.h>
int main(int argc,char *argv[])
{
int c,i;
char ch[17];
FILE *fp;
struct hostent *host;
struct in_addr addr;
char *atmname;
unsigned long atm;

if(argc !=2) {
printf("usage: <filename> \n");
exit(1);

}
if((fp = fopen(argv[1], "r")) == NULL) {
printf("cannot open file %s\n", argv[1]);
exit(1);
}

fprintf(stdout,"--------------------------------\n");
fprintf(stdout,"### mass DNS resolver ###\n");
fprintf(stdout," www.badc0ded.com\n");
fprintf(stdout, "written by jaguar ###\n");
fprintf(stdout,"---------------------------------\n");


while((fgets(ch,17,fp)) != (char *) 0 ) {
atm = inet_addr(ch);

host = gethostbyaddr((char *)&atm,sizeof(struct in_addr),AF_INET);
if(host == NULL) {

fprintf(stderr,"couldnt resolve host %s",ch);
continue;
}
fprintf(stdout,"%s\t<-->\t%s\n",ch,host->h_name);

}
fclose(fp);
}


Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close