SHOW:
|
|
- or go back to the newest paste.
| 1 | import string | |
| 2 | import itertools | |
| 3 | ||
| 4 | """ | |
| 5 | function checkPass( password ) | |
| 6 | {
| |
| 7 | var count1 = 3, count2 = 5; | |
| 8 | var sumof1 = 0, sumof2 = 0; | |
| 9 | ||
| 10 | var charlist = "BHFE8"; | |
| 11 | ||
| 12 | for( i = 0; i < password.length; ++i ) { sumof1 += ( password.charCodeAt( i ) * count1 ); count1++; }
| |
| 13 | for( i = 0; i < charlist.length; ++i ) { sumof2 += ( charlist.charCodeAt( i ) * count2 ); count2++; }
| |
| 14 | ||
| 15 | (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." ); | |
| 16 | } | |
| 17 | """ | |
| 18 | ||
| 19 | CHARSET = string.uppercase + string.digits | |
| 20 | tabPassword = itertools.product(CHARSET, repeat=5) | |
| 21 | ||
| 22 | charlist = "BHFE8" | |
| 23 | sumof2 = 0 | |
| 24 | sumof1 = 0 | |
| 25 | count1 = 3 | |
| 26 | count2 = 5 | |
| 27 | ||
| 28 | for each_password in tabPassword: | |
| 29 | for i in range(len(each_password)): | |
| 30 | sumof1 += ord(each_password[i]) * count1 | |
| 31 | count1 += 1 | |
| 32 | if sumof1 == 2308: | |
| 33 | print each_password |