Guest User

charcodeat

a guest
Apr 23rd, 2014
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.93 KB | None | 0 0
  1. import string
  2. import itertools
  3.  
  4.  
  5. """
  6. function checkPass( password )
  7. {
  8.     var count1 = 3, count2 = 5;
  9.     var sumof1 = 0, sumof2 = 0;
  10.  
  11.     var charlist = "BHFE8";
  12.  
  13.     for( i = 0; i < password.length; ++i ) { sumof1 += ( password.charCodeAt( i ) * count1 ); count1++; }
  14.     for( i = 0; i < charlist.length; ++i ) { sumof2 += ( charlist.charCodeAt( i ) * count2 ); count2++; }
  15.  
  16.     (sumof1 == sumof2) ? setTimeout( "location.replace( 'http://www.enigmagroup.org/missions/basics/js/10/index.php?password=" + encodeURI(password) + "' );", 0 ) : alert( "Sorry, but the password was incorrect." );
  17. }
  18. """
  19.  
  20. CHARSET = string.uppercase + string.digits
  21. tabPassword = itertools.product(CHARSET, repeat=5)
  22.  
  23. charlist = "BHFE8"
  24. sumof2 = 0
  25. sumof1 = 0
  26. count1 = 3
  27. count2 = 5
  28.  
  29. for each_password in tabPassword:
  30.   for i in range(len(each_password)):
  31.     sumof1 += ord(each_password[i]) * count1
  32.     count1 += 1
  33.   if sumof1 == 2308:
  34.     print each_password
Add Comment
Please, Sign In to add comment