SHARE
TWEET

Untitled

a guest Sep 25th, 2013 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * @(#)retry.java
  3.  *
  4.  * retry application
  5.  *
  6.  * @author
  7.  * @version 1.00 2013/9/25
  8.  */
  9.  
  10. package com.java2novice.random;
  11. import java.security.MessageDigest;
  12. import java.security.NoSuchAlgorithmException;
  13. import org.bouncycastle.util.encoders.Hex;
  14. import java.util.Random;
  15. import java.io.PrintWriter;
  16. import java.io.File;
  17. import java.io.IOException;
  18. import java.security.SecureRandom;
  19. import java.math.BigInteger;
  20.  
  21. public class retry {
  22.    
  23.     public static void main(String[] args) throws IOException {
  24.         double i=0.000000000;
  25.         MessageDigest md;
  26.        
  27.                 File file = new File ("Cracker.txt");
  28.                 try {
  29.                 md = MessageDigest.getInstance("SHA-256");
  30.                 int x=0;       
  31.         PrintWriter writer = new PrintWriter("Cracker.txt", "UTF-8");
  32.         String OutP=("");
  33.         SecureRandom random = new SecureRandom();
  34.         String WhatToPrint=("");
  35.         String ToConvert = ("");
  36.                 String alphaNumerics = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
  37.                 String t = "";
  38.                 String ComparedTo="63bdb97304ab69679f4c1fd7fa80608cef5cbec61cb226a916d3cd12a4eab32a";
  39.         //10000000
  40.         while(!WhatToPrint.equals(ComparedTo))
  41.         {
  42.         t="";
  43.         double OneToTwentyFive=((Math.random())*25)+1;
  44.         for (int y = 0; y < 10; y++) {
  45.                 t += alphaNumerics.charAt((int) (Math.random() * alphaNumerics.length()));
  46.                 }
  47.         OutP=((int)OneToTwentyFive+"-"+t);
  48.         md.update(OutP.getBytes());
  49.         byte[] shaDig = md.digest();
  50.         WhatToPrint=(new String(Hex.encode(shaDig)));
  51.         String OutQ=OutP;
  52.         if(WhatToPrint.equals(ComparedTo))
  53.         {
  54.                 System.out.println(OutQ);
  55.         }
  56.         else{
  57.                 i+=0.000000001;
  58.                 System.out.println(i);
  59.         }
  60.                
  61.  
  62.         }
  63.        
  64.        
  65.        
  66.                 }catch(IOException error){
  67.                         System.out.println("error");   
  68.                 }
  69.                 catch(NoSuchAlgorithmException ex)
  70.                 {
  71.                         System.out.println("error2");
  72.                 }
  73.                 System.out.println("Done");
  74.                
  75.        
  76.     }
  77. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top