Skip to content

Instantly share code, notes, and snippets.

@t3h2mas
Created May 4, 2016 00:00
Show Gist options
  • Save t3h2mas/e4faf75b1df0fdce35d0ce67ebf3fa63 to your computer and use it in GitHub Desktop.
Save t3h2mas/e4faf75b1df0fdce35d0ce67ebf3fa63 to your computer and use it in GitHub Desktop.
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import java.util.Random;
import java.io.IOException;
public class Cake {
public static void main(String[] cheese) throws IOException {
Document doc = Jsoup.connect(o("uggc://cbeauho.pbz/enaqbz"))
.userAgent("Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20070725 Firefox/25.0")
.referrer("http://www.google.com/")
.timeout(12000)
.followRedirects(true)
.get();
Random r = new Random();
Elements c = doc.select("div.commentMessage");
Element e = c.get(r.nextInt(c.size()));
System.out.println(e.ownText());
}
private static String o(String input) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < input.length(); i++) {
char c = input.charAt(i);
if (c >= 'a' && c <= 'm') c += 13;
else if (c >= 'A' && c <= 'M') c += 13;
else if (c >= 'n' && c <= 'z') c -= 13;
else if (c >= 'N' && c <= 'Z') c -= 13;
sb.append(c);
}
return sb.toString();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment