I remember when the Internet predecessor was just connected to the Pentagon, defense contractors and some bases. In Gizmodo:
" .... This map was made on August 2 by John Matherly, the founder of Shodan, a search engine for internet-connected devices. Matherly, who calls himself an internet cartographer, collected the data to put it together by sending ping requests to every IP address on the internet, and storing the positive responses. A ping is a network utility that sends an echo-request message (known as a packet) to an IP address—the internet's version of "hey, are you there?"
That part was relatively easy compared to the visualization process, says Matherly. "It took less than five hours to gather the data, and another 12 hours or so to generate the map image." For that, he used the matplotlib plotting library in the programing language Python. ... "