Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @(#)retry.java
- *
- * retry application
- *
- * @author
- * @version 1.00 2013/9/25
- */
- package com.java2novice.random;
- import java.security.MessageDigest;
- import java.security.NoSuchAlgorithmException;
- import org.bouncycastle.util.encoders.Hex;
- import java.util.Random;
- import java.io.PrintWriter;
- import java.io.File;
- import java.io.IOException;
- import java.security.SecureRandom;
- import java.math.BigInteger;
- public class retry {
- public static void main(String[] args) throws IOException {
- double i=0.000000000;
- MessageDigest md;
- File file = new File ("Cracker.txt");
- try {
- md = MessageDigest.getInstance("SHA-256");
- int x=0;
- PrintWriter writer = new PrintWriter("Cracker.txt", "UTF-8");
- String OutP=("");
- SecureRandom random = new SecureRandom();
- String WhatToPrint=("");
- String ToConvert = ("");
- String alphaNumerics = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
- String t = "";
- String ComparedTo="63bdb97304ab69679f4c1fd7fa80608cef5cbec61cb226a916d3cd12a4eab32a";
- //10000000
- while(!WhatToPrint.equals(ComparedTo))
- {
- t="";
- double OneToTwentyFive=((Math.random())*25)+1;
- for (int y = 0; y < 10; y++) {
- t += alphaNumerics.charAt((int) (Math.random() * alphaNumerics.length()));
- }
- OutP=((int)OneToTwentyFive+"-"+t);
- md.update(OutP.getBytes());
- byte[] shaDig = md.digest();
- WhatToPrint=(new String(Hex.encode(shaDig)));
- String OutQ=OutP;
- if(WhatToPrint.equals(ComparedTo))
- {
- System.out.println(OutQ);
- }
- else{
- i+=0.000000001;
- System.out.println(i);
- }
- }
- }catch(IOException error){
- System.out.println("error");
- }
- catch(NoSuchAlgorithmException ex)
- {
- System.out.println("error2");
- }
- System.out.println("Done");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement