MassResolve 0.1
Sponsored Links
MassResolve 0.1 Ranking & Summary
File size:
0.004 MB
Platform:
Any Platform
License:
GPL (GNU General Public License)
Price:
Downloads:
797
Date added:
2007-08-22
Publisher:
John Anderson
MassResolve 0.1 description
MassResolve application performs reverse DNS lookups for network blocks or an input file. The requests can be performed mulit-threaded.
Usage:
./res < subnet or filename to resolve > < forks >
Code:
/*
MassResolve (C) 2000 John Anderson (john@ev6.net)
This program performs reverse dns lookups for network blocks
or an input file and supports multi threading.
*/
#include < stdio.h>
#include < fcntl.h>
#include < netdb.h>
#include < signal.h>
#include < sys/time.h>
#include < unistd.h>
#include < netinet/in.h>
#include < netinet/ip.h>
#include < netinet/ip_icmp.h>
#include < errno.h>
#include < string.h>
#include < getopt.h>
#include < setjmp.h>
char *
rlookup (u_long ip)
{
static char hostname[256];
struct hostent *host;
struct sockaddr_in addr;
addr.sin_addr.s_addr = ip;
host =
gethostbyaddr ((char *) &addr.sin_addr, sizeof (addr.sin_addr), AF_INET);
if (host == NULL)
{
printf ("%s does not resolve.n", inet_ntoa (ip));
fflush (stdout);
}
else
{
printf ("%s resolves to %sn", inet_ntoa (ip), host->h_name);
fflush (stdout);
}
}
int maxforq = 0;
int
main (int argc, char **argv)
{
int pid, k, j, frk, i, mforks;
char *pt;
char mehost[200], sv[3];
FILE *inp;
mforks = 64; /* default */
if (argv[1] == NULL)
{
printf ("Usage: %s
n", argv[0]);
exit (0);
}
if (!argv[2] == NULL)
{
mforks = atoi (argv[2]);
}
/* printf ("Resolving all hosts in %s with %d threadsn", argv[1], mforks); */
if((inp=fopen(argv[1],"r"))!=NULL)
{
while(fgets(mehost,sizeof(mehost),inp))
{
sscanf(mehost,"%sn",mehost);
frk = fork ();
if (frk == 0)
{
fflush (stdout);
rlookup (inet_addr (mehost));
exit (0);
}
else
{ /* frk = 0 */
maxforq++;
if (maxforq > mforks)
{
wait (NULL); // waiting until the child died
maxforq--;
}
}
}
fclose(inp);
exit(0);
}
pt = strchr (argv[1], .);
if (pt == NULL)
{ /* ANET */
for (k = 0; k <= 255; k++)
{
for (j = 0; j <= 255; j++)
{
for (i = 1; i <= 255; i++)
{
frk = fork ();
if (frk == 0)
{
snprintf (mehost, sizeof (mehost), "%s.%u.%u.%u",
argv[1], k, j, i);
fflush (stdout);
rlookup (inet_addr (mehost));
exit (0);
}
else
{ /* frk = 0 */
maxforq++;
if (maxforq > mforks)
{
wait (NULL); // waiting until the child died
maxforq--;
}
}
}
}
}
fprintf (stderr, "%u ", j);
}
else
{
pt++;
pt = strchr (pt, .);
if (pt == NULL)
{ /* BNET */
for (j = 0; j <= 255; j++)
{
for (i = 1; i <= 255; i++)
{
frk = fork ();
if (frk == 0)
{
snprintf (mehost, sizeof (mehost), "%s.%u.%u",
argv[1], j, i);
fflush (stdout);
rlookup (inet_addr (mehost));
exit (0);
}
else
{
maxforq++;
if (maxforq > mforks)
{
wait (NULL); // waiting until the child died
maxforq--;
}
}
}
}
fprintf (stderr, "%u ", j);
}
else
{ /* CNET */
pt++;
pt = strchr (pt, .);
if (pt != NULL) /* Single host? */
{
rlookup (inet_addr (argv[1]));
}
else
{
for (i = 1; i <= 255; i++)
{
frk = fork ();
if (frk == 0)
{
snprintf (mehost, sizeof (mehost), "%s.%u", argv[1], i);
fflush (stdout);
rlookup (inet_addr (mehost));
exit (0);
}
else
{
maxforq++;
if (maxforq > mforks)
{
wait (NULL); // waiting until the child died
maxforq--;
}
}
}
fprintf (stderr, "!! %u !!", k);
}
}
}
}
Usage:
./res < subnet or filename to resolve > < forks >
Code:
/*
MassResolve (C) 2000 John Anderson (john@ev6.net)
This program performs reverse dns lookups for network blocks
or an input file and supports multi threading.
*/
#include < stdio.h>
#include < fcntl.h>
#include < netdb.h>
#include < signal.h>
#include < sys/time.h>
#include < unistd.h>
#include < netinet/in.h>
#include < netinet/ip.h>
#include < netinet/ip_icmp.h>
#include < errno.h>
#include < string.h>
#include < getopt.h>
#include < setjmp.h>
char *
rlookup (u_long ip)
{
static char hostname[256];
struct hostent *host;
struct sockaddr_in addr;
addr.sin_addr.s_addr = ip;
host =
gethostbyaddr ((char *) &addr.sin_addr, sizeof (addr.sin_addr), AF_INET);
if (host == NULL)
{
printf ("%s does not resolve.n", inet_ntoa (ip));
fflush (stdout);
}
else
{
printf ("%s resolves to %sn", inet_ntoa (ip), host->h_name);
fflush (stdout);
}
}
int maxforq = 0;
int
main (int argc, char **argv)
{
int pid, k, j, frk, i, mforks;
char *pt;
char mehost[200], sv[3];
FILE *inp;
mforks = 64; /* default */
if (argv[1] == NULL)
{
printf ("Usage: %s
exit (0);
}
if (!argv[2] == NULL)
{
mforks = atoi (argv[2]);
}
/* printf ("Resolving all hosts in %s with %d threadsn", argv[1], mforks); */
if((inp=fopen(argv[1],"r"))!=NULL)
{
while(fgets(mehost,sizeof(mehost),inp))
{
sscanf(mehost,"%sn",mehost);
frk = fork ();
if (frk == 0)
{
fflush (stdout);
rlookup (inet_addr (mehost));
exit (0);
}
else
{ /* frk = 0 */
maxforq++;
if (maxforq > mforks)
{
wait (NULL); // waiting until the child died
maxforq--;
}
}
}
fclose(inp);
exit(0);
}
pt = strchr (argv[1], .);
if (pt == NULL)
{ /* ANET */
for (k = 0; k <= 255; k++)
{
for (j = 0; j <= 255; j++)
{
for (i = 1; i <= 255; i++)
{
frk = fork ();
if (frk == 0)
{
snprintf (mehost, sizeof (mehost), "%s.%u.%u.%u",
argv[1], k, j, i);
fflush (stdout);
rlookup (inet_addr (mehost));
exit (0);
}
else
{ /* frk = 0 */
maxforq++;
if (maxforq > mforks)
{
wait (NULL); // waiting until the child died
maxforq--;
}
}
}
}
}
fprintf (stderr, "%u ", j);
}
else
{
pt++;
pt = strchr (pt, .);
if (pt == NULL)
{ /* BNET */
for (j = 0; j <= 255; j++)
{
for (i = 1; i <= 255; i++)
{
frk = fork ();
if (frk == 0)
{
snprintf (mehost, sizeof (mehost), "%s.%u.%u",
argv[1], j, i);
fflush (stdout);
rlookup (inet_addr (mehost));
exit (0);
}
else
{
maxforq++;
if (maxforq > mforks)
{
wait (NULL); // waiting until the child died
maxforq--;
}
}
}
}
fprintf (stderr, "%u ", j);
}
else
{ /* CNET */
pt++;
pt = strchr (pt, .);
if (pt != NULL) /* Single host? */
{
rlookup (inet_addr (argv[1]));
}
else
{
for (i = 1; i <= 255; i++)
{
frk = fork ();
if (frk == 0)
{
snprintf (mehost, sizeof (mehost), "%s.%u", argv[1], i);
fflush (stdout);
rlookup (inet_addr (mehost));
exit (0);
}
else
{
maxforq++;
if (maxforq > mforks)
{
wait (NULL); // waiting until the child died
maxforq--;
}
}
}
fprintf (stderr, "!! %u !!", k);
}
}
}
}
MassResolve 0.1 Screenshot
MassResolve 0.1 Keywords
MassResolve
NULL
MassResolve 0.1
DNS
reverse dns lookups
Reverse DNS
network blocks
input file
For Network
dns lookups
include
Argv
0
char
file
addr
Bookmark MassResolve 0.1
MassResolve 0.1 Copyright
WareSeeker periodically updates pricing and software information of MassResolve 0.1 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of MassResolve 0.1 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
how reverse dns lookups work
reverse dns lookup
disabling reverse dns lookups
includes free domain
no input file specified
how to get around network blocks
fox network
include this code
includes product information
input file c++
for networking
reverse dns check
network blocks to announce
includegraphics
straight and cross cable for networking
put file
reverse dns lookup tool
includes related article
Related Software
GResolver is an easy-to-use DNS query tool. Free Download
CGIParse project is a C++ class library for parsing the input of a cgi program. Free Download
CeeSpot is a command interpreter that compiles and runs script source. Free Download
passwd_info is a simple program that can query the /etc/passwd file for current user or specified user. Free Download
DNSMasq Webmin Module is a Webmin module to allow configuration of DNSMasq, a DNS proxy and DHCP server. Free Download
Argv is a Perl module that provides an OO interface to an arg vector. Free Download
namelur is a random name generator library with rule files. Free Download
NativeCall is a Java toolkit that lets you call operating system methods from whithin Java without JNI code. Free Download
Latest Software
Popular Software
Favourite Software