You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
802 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{1323:function(e,a,i){"use strict";i.r(a),i.d(a,"scorePassword",(function(){return l}));var r=i(1324),n=i.n(r),s=i(87),o=i(84);const t=["riot","matrix"];function l(e){if(0===e.length)return null;const a=t.slice();s.a.get()&&a.push(s.a.get().getUserIdLocalpart());let i=n()(e,a);if(e.includes(" ")){const r=n()(e.replace(/ /g,""),a);r.score<i.score&&(i=r)}for(let e=0;e<i.feedback.suggestions.length;++e)i.feedback.suggestions[e]=Object(o.a)(i.feedback.suggestions[e]);return i.feedback.warning&&(i.feedback.warning=Object(o.a)(i.feedback.warning)),i}Object(o.b)("Use a few words, avoid common phrases"),Object(o.b)("No need for symbols, digits, or uppercase letters"),Object(o.b)("Use a longer keyboard pattern with more turns"),Object(o.b)("Avoid repeated words and characters"),Object(o.b)("Avoid sequences"),Object(o.b)("Avoid recent years"),Object(o.b)("Avoid years that are associated with you"),Object(o.b)("Avoid dates and years that are associated with you"),Object(o.b)("Capitalization doesn't help very much"),Object(o.b)("All-uppercase is almost as easy to guess as all-lowercase"),Object(o.b)("Reversed words aren't much harder to guess"),Object(o.b)("Predictable substitutions like '@' instead of 'a' don't help very much"),Object(o.b)("Add another word or two. Uncommon words are better."),Object(o.b)('Repeats like "aaa" are easy to guess'),Object(o.b)('Repeats like "abcabcabc" are only slightly harder to guess than "abc"'),Object(o.b)("Sequences like abc or 6543 are easy to guess"),Object(o.b)("Recent years are easy to guess"),Object(o.b)("Dates are often easy to guess"),Object(o.b)("This is a top-10 common password"),Object(o.b)("This is a top-100 common password"),Object(o.b)("This is a very common password"),Object(o.b)("This is similar to a commonly used password"),Object(o.b)("A word by itself is easy to guess"),Object(o.b)("Names and surnames by themselves are easy to guess"),Object(o.b)("Common names and surnames are easy to guess"),Object(o.b)("Straight rows of keys are easy to guess"),Object(o.b)("Short keyboard patterns are easy to guess")},1324:function(e,a,i){var r,n,s,o,t,l;n=i(1325),s=i(455),t=i(1327),r=i(1328),o=function(){return(new Date).getTime()},l=function(e,a){var i,l,c,d,m,u,h,g,p,b,y;for(null==a&&(a=[]),b=o(),p=[],c=0,d=a.length;c<d;c++)"string"!=(h=typeof(i=a[c]))&&"number"!==h&&"boolean"!==h||p.push(i.toString().toLowerCase());for(u in n.set_user_input_dictionary(p),m=n.omnimatch(e),(g=s.most_guessable_match_sequence(e,m)).calc_time=o()-b,l=t.estimate_attack_times(g.guesses))y=l[u],g[u]=y;return g.feedback=r.get_feedback(g.score,g.sequence),g},e.exports=l},1325:function(e,a,i){var r,n,s,o,t,l,c,d,m,u,h,g;for(h in d=i(1326),l=i(681),g=i(455),c=function(e){var a,i,r,n;for(n={},a=1,r=0,i=e.length;r<i;r++)n[e[r]]=a,a+=1;return n},o={},d)m=d[h],o[h]=c(m);n={qwerty:l.qwerty,dvorak:l.dvorak,keypad:l.keypad,mac_keypad:l.mac_keypad},s={a:["4","@"],b:["8"],c:["(","{","[","<"],e:["3"],g:["6","9"],i:["1","!","|"],l:["1","|","7"],o:["0"],s:["$","5"],t:["+","7"],x:["%"],z:["2"]},t={recent_year:/19\d\d|200\d|201\d/g},r={4:[[1,2],[2,3]],5:[[1,3],[2,3]],6:[[1,2],[2,4],[4,5]],7:[[1,3],[2,3],[4,5],[4,6]],8:[[2,4],[4,6]]},u={empty:function(e){var a;return 0===function(){var i;for(a in i=[],e)i.push(a);return i}().length},extend:function(e,a){return e.push.apply(e,a)},translate:function(e,a){var i;return function(){var r,n,s,o;for(o=[],n=0,r=(s=e.split("")).length;n<r;n++)i=s[n],o.push(a[i]||i);return o}().join("")},mod:function(e,a){return(e%a+a)%a},sorted:function(e){return e.sort((function(e,a){return e.i-a.i||e.j-a.j}))},omnimatch:function(e){var a,i,r,n,s;for(n=[],s=0,a=(r=[this.dictionary_match,this.reverse_dictionary_match,this.l33t_match,this.spatial_match,this.repeat_match,this.sequence_match,this.regex_match,this.date_match]).length;s<a;s++)i=r[s],this.extend(n,i.call(this,e));return this.sorted(n)},dictionary_match:function(e,a){var i,r,n,s,t,l,c,d,m,u,h,g,p,b;for(i in null==a&&(a=o),t=[],s=e.length,d=e.toLowerCase(),a)for(u=a[i],r=l=0,h=s;0<=h?l<h:l>h;r=
//# sourceMappingURL=23.js.map