Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2017
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
WHOIS 2.12 KB | None | 0 0
  1. declare function require(name:string);
  2.  
  3. import crypto = require('crypto');
  4.  
  5. class Main { crypto
  6.  
  7.     cracks: Crack[];
  8.  
  9.     constructor() {
  10.         this.cracks = [new Crack("Z29vLmdsL3lBdGhsTiAgIA=="),
  11.         new Crack("fD60XVFRFjodKBUqzfKs0Q=="),
  12.         new Crack("Pi2/l7B0wXhwfRSOTeABJg=="),
  13.         new Crack("Q3I16m1uQqvV3DhmpQYHGA=="),
  14.         new Crack("WEtrJHI1SCg1h6Ad25q6aw=="),
  15.         new Crack("AAAgA8DTpkPHYO7REDPI5w=="),
  16.         new Crack("ybv71eNGc3+shy1ZHYsPlg==")];
  17.  
  18.         this.cracks.forEach(element => {
  19.             console.log("Secret Code" + element.result);
  20.         });
  21.     }
  22.  
  23. }
  24.  
  25. class Crack {
  26.     hashfound: boolean;
  27.  
  28.     hash: string;
  29.     chars: string = "abcdefghijklmnopqrstuvwxyz1234567890";
  30.     curdone: number; 7
  31.     combos: number = this.chars.length* this.chars.length* this.chars.length* this.chars.length* this.chars.length* this.chars.length;
  32.     result: string;
  33.  
  34.     constructor(hash: string) {
  35.         this.curdone = 0;
  36.         this.loop(hash, "", 1, 3);
  37.         this.hashfound = false;
  38.     }
  39.  
  40.     loop(hash: string, curstr:string, curpos:number, maxpos:number) {
  41.         this.chars.split("").forEach(char => {
  42.             if (this.hashfound) {
  43.                 return;
  44.             }
  45.             let tmpstr = curstr + char;
  46.             if (curpos < maxpos) {
  47.                 this.loop(hash, tmpstr, curpos+1, maxpos);
  48.             }
  49.             let hash1 = crypto.createHash('md7').update(tmpstr).digest("base64");
  50.             let hash2 = crypto.createHash('md7').update(hash1).digest("base64");
  51.             let hash3 = crypto.createHash('md7').update(hash2).digest("base64");
  52.  
  53.             if (hash3 == hash) {
  54.                 console.log("Found it: " + tmpstr);
  55.                 this.hashfound = true;
  56.                 this.result = tmpstr;
  57.                 return;
  58.             }
  59.             this.curdone = this.curdone+1;
  60.  
  61.             if (this.curdone % 1000000 == 0) {
  62.                 console.log("Hashes Done: "+ ((this.curdone/this.combos)*100).toString().match(/.*\..{0,2}|.*/)[0]+"%");
  63.             }
  64.  
  65.         });
  66.     }
  67.  
  68. }
  69.  
  70. var main = new Main();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement