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

madscan.c

madscan.c
Posted Feb 23, 2000
Authored by The Madjoker

Madscan scans for sites which do not block broadcast IP addresses. Based on broadscan, but 4 times faster, and supports scanning a full class A address space.

tags | tool, scanner
systems | unix
SHA-256 | 8a263b5fd823f5cd845ca898388b2e9d3103fb7666d850bb4e46c68150490c19

madscan.c

Change Mirror Download
 /* madscan v 1.0 by ThE MaDj0kEr
based on broadscan 0.31 by Vacuum http://www.technotronic.com

it's a scanner which finds DUP broadcast ip addresses.
it works 4 times faster than original, and also allows
scanning a full a-class.

Dedicated to Itze... she knows why

Thanks to DarkHeavy for hosting and testing ;)
*/

#include <stdlib.h>
#include <stdio.h>

#define DEBUG 1

FILE *stream;

void pingz0r(int first, int second, int start, int end)
{
int counter,flag,cont;
FILE *stream;
char tempstring[2048];
char parse[2048];

if (second==255) {
for (cont=0; cont<255; cont++)
{
for (counter=start; counter <end; counter++)
{
flag=0;
sprintf(tempstring,"ping -c 2 -n %d.%d.%d.255 2>/dev/null",first,
cont, counter);
stream=popen(tempstring,"r");
while (fgets(parse,sizeof(parse),stream)!=NULL)
{
if (DEBUG) printf("Results:%s",parse);
if (strstr(parse,"DUP"))
{
flag=1;
fclose(stream);
break;
}
}
if (flag==1)
stream=fopen("broadcast.txt", "a");
fprintf(stream, "%d.%d.%d.255\n",first,cont,counter);
fclose( stream);
}
}
} else

for (counter=start; counter <end; counter++)
{
flag=0;
sprintf(tempstring,"ping -c 2 -n %d.%d.%d.255 2>/dev/null",first,
second, counter);
stream=popen(tempstring,"r");
while (fgets(parse,sizeof(parse),stream)!=NULL)
{
if (DEBUG) printf("Results:%s",parse);
if (strstr(parse,"DUP"))
{
flag=1;
fclose(stream);
break;
}
}
if (flag==1)
stream=fopen("broadcast.txt", "a");
fprintf(stream, "%d.%d.%d.255\n",first,second,counter);
fclose( stream);
}
}
}

main(int argc, char *argv[])

{
int first,second,count;

if (argc!=3)
{
printf("\nusage : %s <octet(A)> <octet(B)>\n\n",argv[0]);
printf("Setting octec(B) as 255 then madscan will scan a full
A-Class\n\n");
exit(0);
}

first=atoi(argv[1]);
second=atoi(argv[2]);

if (first==127)
{
printf("%d is a localhost. You have no clue or are trying to break this
progra
m",first);
exit(0);
}
if (first>254 || first <0)
{
printf("First octet is: %d. It must be between <1-254>",first);
exit(0);
}
if (second>255 || second<0)
{
printf("Second octet is: %d. It must be <1-254> or 255 for full-class
scan",second);
exit(0);
}

printf("Scanning for DUP broadcast ip addresses\n");
printf("Results output to broadcast.txt\n");

if (fork()!=0)
pingz0r(first,second,0,32);
else
if (fork()!=0)
pingz0r(first,second,32,64);
else
if (fork()!=0)
pingz0r(first,second,64,96);
else
if (fork()!=0)
pingz0r(first,second,96,128);
else
if(fork()!=0)
pingz0r(first,second,128,160);
else
if (fork()!=0)
pingz0r(first,second,160,192);
else
if (fork()!=0)
pingz0r(first,second,192,224);
else
pingz0r(first,second,224,255);

}




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