You might run into trouble with your ISP though, given the amount of outbound traffic you are going to generate.
Have you done the math to figure out how long it is going to take you to accomplish this? There are 4.2 billion possible IP addresses. Not all of them are valid public IP addresses. If your program is smart enough to exclude those, you still end up with somewhere around 2.5 billion addresses.
If you wanted your program to finish in 10 days, you would need to do 250 million pings a day. 1 million an hour. About 3,000 a second.
I do hope your program is multiprocess and/or multithreaded ;-)
There appear to be about 3.7 billion routable IPv4 addresses, actually, which at one per second would take over a century to ping.