Created
February 4, 2011 18:14
-
-
Save OrigamiTech/811490 to your computer and use it in GitHub Desktop.
Dumps every IPv4 IP address to a text file.
This file contains 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
using System; | |
using System.IO; | |
namespace EveryIPv4{ | |
class Program{ | |
static void Main(string[] args){ | |
using(StreamWriter sw=new StreamWriter("dump.txt")) | |
for(uint u=uint.MinValue;u<=uint.MaxValue;u++) | |
for (byte b=0;b<4;b++) | |
sw.Write(((u>>((3-b)*8))&0xFF).ToString()+(b==3?'\n':'.')); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment