qui c'ho perso un pò più di tempo (il problema m'aveva preso)
ecco, questa prova la mostra in chiaro ma trova anche prov2a ... insomma dato che 3*2 è sempre uguale a 2*3 il succo è che come sistema, questo, non vale un granchè ... se uno ha voglia/tempo di mettersi a fare qualche test il modo di entrare lo trovacodice:function findPass(n, startFrom){ startFrom = startFrom || 0; for(var i = startFrom, key = arguments.callee.key, result = [], changed = false, code; i < key.length; i++){ code = key.charCodeAt(i); if((n / code) == parseInt(n / code)){ result.push(key.charAt(i)); n /= code; i = startFrom - 1 > -1 ? --startFrom : 0; changed = true; } else if(i == key.length - 1 && n > 1 && changed){ i = 0; changed = false; } }; return result.join(""); }; findPass.key = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; for(var i = 0, test = {}; i < findPass.key.length; i++) test[findPass(811091030400, i)] = true; for(var key in test) document.write(key + " ");
P.S. basterebbe una buona funzione per il calcolo combinatorio che non impieghi troppo (magari scritta in C) ... che si possono avere senza problemi tutte le possibili combinazioni di passwords valide


)
Rispondi quotando