Class A, B, and C IP address list generator.
07c27ec81b726fd5ff06ae7b567a98730479e57c04fda9e6670461bb7f4475c8
/* This shit was Done by IronY */
/* Fucks go to: Comdak */
/* Greets go to: Pots and Hardcorps */
#include <stdio.h>
main(int argc,char *argv[]) {
int numa,temp,temp2,temp3;
FILE *out;
if (argc < 4 || argc > 5 || !strcmp(argv[1],"-h") )
{
printf("\n Pots Class generator By: IronY\n\n");
printf("class A generator ussage: %s a <num> <filename>\n",argv[0]);
printf("class B generator ussage: %s b <num>.<num> <filename>\n",argv[0]);
printf("class c generator ussage: %s c <num>.<num>.<num> <filename>\n",argv[0]);
printf("This message: %s -h\n\n",argv[0]);
exit(1);
}
out = fopen(argv[3],"w");
printf("\n Pots Class generator By: IronY\n\n");
if ( !strcmp(argv[1],"a") )
{
numa = atoi(argv[2]);
if (numa > 255 || numa < 1)
{
printf("Your Number Must be between 1 and 255\n");
exit(0);
}
printf("Generating Class a IP list.\n");
for (temp = 0; temp < 256; temp++)
{
for(temp2 = 0; temp2 < 256; temp2++)
{
for(temp3 = 0; temp3 < 256; temp3++)
{
fprintf(out,"%d.%d.%d.%d\n",numa,temp,temp2,temp3);
}
}
}
}
if ( !strcmp(argv[1],"b") )
{
printf("Generating Class b IP list.\n");
for (temp = 0; temp < 256; temp++)
{
for(temp2 = 0; temp2 < 256; temp2++)
{
fprintf(out,"%s.%d.%d\n",argv[2],temp,temp2);
}
}
}
if ( !strcmp(argv[1],"c") )
{
printf("Generating Class c IP list.\n");
for (temp = 0; temp < 256; temp++)
{
fprintf(out,"%s.%d\n",argv[2],temp);
}
}
printf("All Done....\nRember IronY owns you\n");
}