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([[31],{1538:function(e,a,i){var r,n,s,o,t,l;n=i(1539),s=i(645),t=i(1541),r=i(1542),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},1539:function(e,a,i){var r,n,s,o,t,l,c,d,m,u,h,g;for(h in d=i(1540),l=i(916),g=i(645),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=0<=h?++l:--l)for(n=c=g=r,p=s;g<=p?c<p:c>p;n=g<=p?++c:--c)d.slice(r,+n+1||9e9)in u&&(m=u[b=d.slice(r,+n+1||9e9)],t.push({pattern:"dictionary",i:r,j:n,token:e.slice(r,+n+1||9e9),matched_word:b,rank:m,dictionary_name:i,reversed:!1,l33t:!1}));return this.sorted(t)},reverse_dictionary_match:function(e,a){var i,r,n,s,t,l;for(null==a&&(a=o),l=e.split("").reverse().join(""),s=0,i=(n=this.dictionary_match(l,a)).length;s<i;s++)(r=n[s]).token=r.token.split("").reverse().join(""),r.reversed=!0,t=[e.length-1-r.j,e.length-1-r.i],r.i=t[0],r.j=t[1];return this.sorted(n)},set_user_input_dictionary:function(e){return o.user_inputs=c(e.slice())},relevant_l33t_subtable:function(e,a){var i,r,n,s,o,t,l,c,d,m;for(o={},s=0,r=(t=e.split("")).length;s<r;s++)i=t[s],o[i]=!0;for(n in m={},a)d=a[n],(l=function(){var e,a,i;for(i=[],a=0,e=d.length;a<e;a++)(c=d[a])in o&&i.push(c);return i}()).length>0&&(m[n]=l);return m},enumerate_l33t_subs:function(e){var a,i,r,n,s,o,t,l,c,d,m,u,h,g,p;for(s=function(){var a;for(n in a=[],e)a.push(n);return a}(),p=[[]],i=function(e){var a,i,r,s,o,t,l,c;for(i=[],o={},t=0,s=e.length;t<s;t++)l=e[t],a=function(){var e,a,i;for(i=[],c=a=0,e=l.length;a<e;c=++a)n=l[c],i.push([n,c]);return i}(),a.sort(),r=function(){var e,i,r;for(r=[],c=i=0,e=a.length;i<e;c=++i)n=a[c],r.push(n+","+c);return r}().join("-"),r in o||(o[r]=!0,i.push(l));return i},r=function(a){var n,s,o,t,l,c,d,m,u,h,g,b,y,k,f,v;if(a.length){for(s=a[0],y=a.slice(1),d=[],m=0,l=(g=e[s]).length;m<l;m++)for(t=g[m],u=0,c=p.length;u<c;u++){for(n=-1,o=h=0,b=(k=p[u]).length;0<=b?h<b:h>b;o=0<=b?++h:--h)if(k[o][0]===t){n=o;break}-1===n?(v=k.concat([[t,s]]),d.push(v)):((f=k.slice(0)).splice(n,1),f.push([t,s]),d.push(k),d.push(f))}return p=i(d),r(y)}},r(s),g=[],c=0,t=p.length;c<t;c++){for(h={},d=0,l=(u=p[c]).length;d<l;d++)o=(m=u[d])[0],a=m[1],h[o]=a;g.push(h)}return g},l33t_match:function(e,a,i){var r,n,t,l,c,d,m,u,h,g,p,b,y,k,f,v;for(null==a&&(a=o),null==i&&(i=s),m=[],u=0,t=(g=this.enumerate_l33t_subs(this.relevant_l33t_subtable(e,i))).length;u<t&&(b=g[u],!this.empty(b));u++)for(k=this.translate(e,b
//# sourceMappingURL=31.js.map