Last active
August 29, 2015 14:01
-
-
Save misodengaku/bb933051e0fbe59653f5 to your computer and use it in GitHub Desktop.
every_ip_address.txt generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void main() | |
{ | |
FILE *fp; | |
int a, b, c, d; | |
printf("start\n"); | |
fp = fopen("ip.txt", "wb"); | |
for (a = 0; a < 256; a++){ | |
for (b = 0; b < 256; b++){ | |
for (c = 0; c < 256; c++){ | |
for (d = 0; d < 256; d++){ | |
fprintf(fp, "%d.%d.%d.%d", a, b, c, d); | |
fputc(0x0a, fp); // LF | |
} | |
} | |
} | |
printf("A: %d\n", a); // 進捗 | |
} | |
fclose(fp); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment