Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void test(long i2)
- {
- try
- {
- URL url = new URL("http://sancy.univ-bpclermont.fr/~lafourcade/MissionCrypto2/Lettre21");
- String urlStr = "";
- String authStringEnc = new String(Base64.getEncoder().encode(("Ian:" + i2).getBytes()));
- HttpURLConnection HttpurlConnection = (HttpURLConnection)url.openConnection();
- HttpurlConnection.setRequestProperty("Authorization", "Basic " + authStringEnc);
- System.out.println(i2);
- HttpurlConnection.getInputStream();
- System.out.println("Found: " + i2);
- System.exit(0);
- }
- catch(Exception e)
- {
- // test(i - 1);
- }
- }
- static long i = 0L;
- public static void main(String[] args)
- {
- while(true)
- {
- Thread th = new Thread()
- {
- public void run()
- {
- test(i);
- }
- };
- th.start();
- try
- {
- Thread.sleep(5);
- }
- catch(Exception e)
- {}
- i++;
- }
Add Comment
Please, Sign In to add comment