April 21, 201510 yr Generates valid imgur links go nuts import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URISyntaxException; import java.net.URL; /** * Imgur Link Generator * * @author Reid * @date 4/19/2015 * */ public class ImgurLinkGenerator { public static void main(String[] args) throws IOException, URISyntaxException { while(true) { validatePage(); } } private static void validatePage() throws IOException, URISyntaxException { final String genURL = generateURL(); final URL url = new URL(genURL); final BufferedReader file = new BufferedReader(new InputStreamReader(url.openStream())); String line; line = file.readLine(); if (!line.equals("‰PNG")) { System.out.println(genURL); } } private static String generateURL() { final char ch[] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; final String url = "http://i.imgur.com/"; int randChar = 0; String randomGen = ""; for (int i = 0; i < 5; i++) { randChar = (int) (Math.random() * ch.length); randomGen += ch[randChar]; } return url + randomGen + ".png"; } } Some photos may be NSFW http://i.imgur.com/mgtvq.png http://i.imgur.com/cwydp.png http://i.imgur.com/sfami.png http://i.imgur.com/ymufr.png http://i.imgur.com/uowsw.png http://i.imgur.com/ajfvy.png http://i.imgur.com/errui.png http://i.imgur.com/vmrox.png http://i.imgur.com/rncun.png http://i.imgur.com/jpodl.png http://i.imgur.com/kuzme.png http://i.imgur.com/fkhsl.png http://i.imgur.com/pikyp.png http://i.imgur.com/hpifq.png http://i.imgur.com/afllu.png http://i.imgur.com/cywes.png http://i.imgur.com/omqsv.png http://i.imgur.com/wmeiv.png http://i.imgur.com/vlbut.png http://i.imgur.com/zqwft.png http://i.imgur.com/rqsip.png http://i.imgur.com/ioslh.png http://i.imgur.com/jjyst.png http://i.imgur.com/heidv.png http://i.imgur.com/gpfhz.png http://i.imgur.com/dkorl.png http://i.imgur.com/kgwzp.png http://i.imgur.com/hlblf.png http://i.imgur.com/aktax.png http://i.imgur.com/uxyqc.png http://i.imgur.com/xzxen.png http://i.imgur.com/awdfq.png http://i.imgur.com/tydkc.png http://i.imgur.com/iuuhn.png http://i.imgur.com/dfcdx.png http://i.imgur.com/jwccy.png http://i.imgur.com/wyvow.png http://i.imgur.com/xshfh.png http://i.imgur.com/wdnai.png http://i.imgur.com/coxmf.png http://i.imgur.com/pfztl.png http://i.imgur.com/hovjm.png http://i.imgur.com/puzgo.png http://i.imgur.com/eddpc.png http://i.imgur.com/hddox.png http://i.imgur.com/rhcny.png Edited April 21, 201510 yr by Reid
April 24, 201510 yr Which one of those links is NSFW? Been trying to find it None of them probably are, but since its a random imgur link you never know what someone could have uploaded.
April 24, 201510 yr None of them probably are, but since its a random imgur link you never know what someone could have uploaded. Alright, Johnny Sins
April 29, 201510 yr oh god did you really have to write out all those char elements for your ch array? why not just String alphabet = "abc........xyz";
Create an account or sign in to comment