Random Content Generators

August 24, 2012

Idea

Sometimes it seems that I am returning to the same websites, videos, music, etc. And in one way or another, if I search for content it will be biased by my own preferences. Thus there is a need for random content generators which will give unbiased random content for personal enrichment.

Generators

Random IP Generator

This is a batch file that PINGs random IP addresses and stores the matches into a text file. Matches are determined by whether the IP in question responds within 95ms. There are less than (since many are reserved use) 256^4 = 4.3 billion possible IP combinations for the 4-byte format, and a large amount of them are used so matches are relatively likely. I was able to get at least one valid IP for every run of the script. This script tests 50 random IPs during one run and appends all valid ones onto the file validRandomIPs.txt in the script's directory.

Download randomPing.bat

Random YouTube Generator

This is a JavaScript page that will generate random video references (the code in the youtube URL for a certain video) and test them using AJAX on a single page, displaying the valid video links if they are found. Note that most will not be valid - considering there are 13 billion (13e9) videos on YouTube and 64^11 = 7.379e19 reference combinations, your chances are about 1 in 5.68 billion. To get a match you would need to run the generator continuously every second for 184.5 years. To prevent excessive load on YouTube servers, this script will stop after every 100 URL requests and will need to be restarted.

Access the page randomYoutube.html