Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- v//import java.util.Math;
- import java.net.*;
- import java.io.*;
- public class GoogleURL{
- public static char[] chars = {'0','1','2','3','4','5','6','7','8','9',
- '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',
- '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',
- '_'};
- public static char[] letters = {'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',
- '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',};
- public static char[] sChars = {'-'};
- public static String url_base = "https://lh3.googleusercontent.com/";
- //this is narrowed down to 3 random letters to save on time as it always appears to have 8 'A' chars
- public static String counter = "AAAAAAAA";
- public static String end = "CLABGAYYCw/";
- public static String temp;
- public static int rand(int min, int max){
- return (int)(Math.random() * max + min);
- }
- public static String build(boolean debug){
- temp = "";
- temp += url_base;
- temp += '-';
- for(int i = 0;i<11;i++){
- temp += chars[rand(0,62)];
- }
- temp += '/';
- for(int i = 0;i<11;i++){
- temp += chars[rand(0,63)];
- }
- temp += '/';
- temp += counter;
- for(int i = 0;i<3;i++){
- temp += letters[rand(0,52)];
- }
- temp += '/';
- for(int i = 0;i<33;i++){
- temp += chars[rand(0,63)];
- }
- temp += end;
- if(debug){
- System.out.println(temp);
- }
- return temp;
- }
- public static int getResponseCode(String str){
- try{
- URL u = new URL (str);
- HttpURLConnection huc = ( HttpURLConnection ) u.openConnection ();
- huc.setRequestMethod ("GET"); //OR huc.setRequestMethod ("HEAD");
- huc.connect () ;
- int code = huc.getResponseCode() ;
- return code;
- }catch(Exception e){
- System.out.println(e);
- return -1;
- }
- }
- public static void main(String[] args){
- while(1!=2){
- String str = build(false);
- int test = getResponseCode(str);
- if(test == 200){
- System.out.println(str);
- return;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement