mirror of https://github.com/gophish/gophish
1 line
801 KiB
JavaScript
1 line
801 KiB
JavaScript
|
!function(e){var a={};function i(r){if(a[r])return a[r].exports;var n=a[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=a,i.d=function(e,a,r){i.o(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,a){if(1&a&&(e=i(e)),8&a)return e;if(4&a&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&a&&"string"!=typeof e)for(var n in e)i.d(r,n,function(a){return e[a]}.bind(null,n));return r},i.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(a,"a",a),a},i.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},i.p="",i(i.s=3)}([function(e,a,i){var r,n,s,o;r=i(1),n=function(e){var a,i,r,n,s;for(r in a=0,e)s=e[r],a+=function(){var e,a,i;for(i=[],a=0,e=s.length;a<e;a++)(n=s[a])&&i.push(n);return i}().length;return a/=function(){var a;for(i in a=[],e)e[i],a.push(i);return a}().length},o={nCk:function(e,a){var i,r,n,s;if(a>e)return 0;if(0===a)return 1;for(n=1,i=r=1,s=a;1<=s?r<=s:r>=s;i=1<=s?++r:--r)n*=e,n/=i,e-=1;return n},log10:function(e){return Math.log(e)/Math.log(10)},log2:function(e){return Math.log(e)/Math.log(2)},factorial:function(e){var a,i,r,n;if(e<2)return 1;for(a=1,i=r=2,n=e;2<=n?r<=n:r>=n;i=2<=n?++r:--r)a*=i;return a},most_guessable_match_sequence:function(e,a,i){var r,n,s,o,t,l,c,d,m,u,h,g,p,b,y,k,f,v,w,z,j,x,q;for(null==i&&(i=!1),h=e.length,u=function(){var e,a,i;for(i=[],e=0,a=h;0<=a?e<a:e>a;0<=a?++e:--e)i.push([]);return i}(),g=0,t=a.length;g<t;g++)u[(d=a[g]).j].push(d);for(k=0,l=u.length;k<l;k++)u[k].sort(function(e,a){return e.i-a.i});for(p={m:function(){var e,a,i;for(a=[],i=0,e=h;0<=e?i<e:i>e;0<=e?++i:--i)a.push({});return a}(),pi:function(){var e,a,i;for(a=[],i=0,e=h;0<=e?i<e:i>e;0<=e?++i:--i)a.push({});return a}(),g:function(){var e,a,i;for(a=[],i=0,e=h;0<=e?i<e:i>e;0<=e?++i:--i)a.push({});return a}()},q=this,j=function(a,r){var n,s,o,t,l,c;for(s in t=a.j,l=q.estimate_guesses(a,e),r>1&&(l*=p.pi[a.i-1][r-1]),o=q.factorial(r)*l,i||(o+=Math.pow(1e4,r-1)),c=p.g[t])if(n=c[s],!(s>r)&&n<=o)return;return p.g[t][r]=o,p.m[t][r]=a,p.pi[t][r]=l},r=function(e){var a,i,r,n,s,o;for(d=m(0,e),j(d,1),s=[],a=o=1,n=e;1<=n?o<=n:o>=n;a=1<=n?++o:--o)d=m(a,e),s.push(function(){var e,n;for(i in n=[],e=p.m[a-1])r=e[i],i=parseInt(i),"bruteforce"!==r.pattern&&n.push(j(d,i+1));return n}());return s},m=function(a,i){return{pattern:"bruteforce",token:e.slice(a,+i+1||9e9),i:a,j:i}},z=function(e){var a,i,r,n,s,o,t;for(i in o=[],n=e-1,s=void 0,r=1/0,t=p.g[n])(a=t[i])<r&&(s=i,r=a);for(;n>=0;)d=p.m[n][s],o.unshift(d),n=d.i-1,s--;return o},s=w=0,f=h;0<=f?w<f:w>f;s=0<=f?++w:--w){for(x=0,c=(v=u[s]).length;x<c;x++)if((d=v[x]).i>0)for(o in p.m[d.i-1])o=parseInt(o),j(d,o+1);else j(d,1);r(s)}return b=(y=z(h)).length,n=0===e.length?1:p.g[h-1][b],{password:e,guesses:n,guesses_log10:this.log10(n),sequence:y}},estimate_guesses:function(e,a){var i,r;return null!=e.guesses?e.guesses:(r=1,e.token.length<a.length&&(r=1===e.token.length?10:50),i={bruteforce:this.bruteforce_guesses,dictionary:this.dictionary_guesses,spatial:this.spatial_guesses,repeat:this.repeat_guesses,sequence:this.sequence_guesses,regex:this.regex_guesses,date:this.date_guesses}[e.pattern].call(this,e),e.guesses=Math.max(i,r),e.guesses_log10=this.log10(e.guesses),e.guesses)},bruteforce_guesses:function(e){var a,i;return(a=Math.pow(10,e.token.length))===Number.POSITIVE_INFINITY&&(a=Number.MAX_VALUE),i=1===e.token.length?11:51,Math.max(a,i)},repeat_guesses:function(e){return e.base_guesses*e.repeat_count},sequence_guesses:function(e){var a,i;return a="a"===(i=e.token.charAt(0))||"A"===i||"z"===i||"Z"===i||"0"===i||"1"===i||"9"===i?4:i.match(/\d/)?10:26,e.ascending||(a*=2),a*e.token.length},MIN_YEAR_SPACE:20,REFERENCE_YEAR:(new Date).getFullYear(),regex_guesses:function(e){var a,i;if(a={alpha_lower:26,alpha_upper:26
|