whisper.cat/weboasis/text/js/password-generator.js
2023-10-05 23:28:32 +11:00

1 line
7.9 KiB
JavaScript

var _$_bd84=["\x23\x70\x61\x73\x73\x5F\x31","\x23\x70\x61\x73\x73\x5F\x32","\x23\x70\x61\x73\x73\x5F\x33","\x23\x70\x61\x73\x73\x5F\x34","\x23\x70\x61\x73\x73\x5F\x35","\x63\x68\x65\x63\x6B\x65\x64","\x23\x61\x2D\x7A","\x23\x41\x2D\x5A","\x23\x6E\x75\x6D\x5F\x30\x2D\x39","\x23\x73\x79\x6D\x62\x6F\x6C\x73","\x23\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x5F\x31","\x23\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x5F\x32","\x23\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x5F\x33","\x23\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x5F\x34","\x23\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x5F\x35","\x70\x61\x73\x73\x2D\x6C\x65\x6E\x67\x74\x68","\x23\x70\x61\x73\x73\x4C\x65\x6E","\x61\x6C\x70\x68\x61\x2D\x6C\x6F\x77\x65\x72","\x3A\x63\x68\x65\x63\x6B\x65\x64","\x61\x6C\x70\x68\x61\x2D\x75\x70\x70\x65\x72","","\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A","\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A","\x31\x32\x33\x34\x35\x36\x37\x38\x39\x30","\x60\x7E\x21\x40\x23\x24\x25\x5E\x26\x2A\x28\x29\x5F\x2D\x2B\x3D\x7B\x7D\x5B\x5D\x5C\x7C\x3A\x3B\x22\x27\x3C\x3E\x2C\x2E\x3F\x2F","\x5E\x28\x3F\x3D\x2E\x2A\x5B\x61\x2D\x7A\x5D\x29\x28\x3F\x3D\x2E\x2A\x5B\x41\x2D\x5A\x5D\x29\x28\x3F\x3D\x2E\x2A\x5B\x30\x2D\x39\x5D\x29\x28\x3F\x3D\x2E\x2A\x5B\x21\x40\x23\x24\x25\x5E\x26\x2A\x5D\x29\x28\x3F\x3D\x2E\x7B\x38\x2C\x7D\x29","\x5E\x28\x28\x28\x3F\x3D\x2E\x2A\x5B\x61\x2D\x7A\x5D\x29\x28\x3F\x3D\x2E\x2A\x5B\x41\x2D\x5A\x5D\x29\x29\x7C\x28\x28\x3F\x3D\x2E\x2A\x5B\x61\x2D\x7A\x5D\x29\x28\x3F\x3D\x2E\x2A\x5B\x30\x2D\x39\x5D\x29\x29\x7C\x28\x28\x3F\x3D\x2E\x2A\x5B\x41\x2D\x5A\x5D\x29\x28\x3F\x3D\x2E\x2A\x5B\x30\x2D\x39\x5D\x29\x29\x29\x28\x3F\x3D\x2E\x7B\x36\x2C\x7D\x29","\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x27\x63\x6F\x6C\x6F\x72\x3A\x23\x34\x43\x41\x46\x35\x30\x27\x3E\x53\x74\x72\x6F\x6E\x67\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x27\x63\x6F\x6C\x6F\x72\x3A\x23\x46\x42\x43\x30\x32\x44\x27\x3E\x47\x6F\x6F\x64\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x27\x63\x6F\x6C\x6F\x72\x3A\x23\x62\x37\x31\x63\x31\x63\x27\x3E\x57\x65\x61\x6B\x3C\x2F\x73\x70\x61\x6E\x3E","\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x31\x3C\x62\x72\x3E","\x3C\x62\x72\x3E\x3C\x62\x72\x3E\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x32\x3C\x62\x72\x3E","\x3C\x62\x72\x3E\x3C\x62\x72\x3E\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x33\x3C\x62\x72\x3E","\x3C\x62\x72\x3E\x3C\x62\x72\x3E\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x34\x3C\x62\x72\x3E","\x3C\x62\x72\x3E\x3C\x62\x72\x3E\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x35\x3C\x62\x72\x3E","\x4E\x6F\x20\x62\x6C\x6F\x62\x73\x20\x6F\x6E\x20\x49\x45\x20\x76\x65\x72\x3C\x31\x30","\x0D\x0A","\x74\x65\x78\x74\x2F\x70\x6C\x61\x69\x6E","\x6E\x75\x6C\x6C\x2E\x74\x78\x74","\x46\x69\x6C\x65\x20\x6E\x61\x6D\x65\x3A","\x4D\x79\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x73","\x2E\x74\x78\x74","\x61","\x6E\x6F\x6E\x65","\x26\x23\x30\x33\x39\x3B","\x26\x71\x75\x6F\x74\x3B","\x26\x67\x74\x3B","\x26\x6C\x74\x3B","\x26\x61\x6D\x70\x3B","\x63\x68\x69\x6C\x64\x57\x69\x6E\x64\x6F\x77","\x6C\x6F\x63\x61\x74\x69\x6F\x6E\x3D\x79\x65\x73\x2C\x20\x6D\x65\x6E\x75\x62\x61\x72\x3D\x79\x65\x73\x2C\x20\x74\x6F\x6F\x6C\x62\x61\x72\x3D\x79\x65\x73","\x3C\x68\x74\x6D\x6C\x3E\x3C\x68\x65\x61\x64\x3E\x3C\x2F\x68\x65\x61\x64\x3E\x3C\x62\x6F\x64\x79\x3E","\x3C\x2F\x62\x6F\x64\x79\x3E\x3C\x2F\x68\x74\x6D\x6C\x3E","\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x61\x74\x20\x6C\x65\x61\x73\x74\x20\x36\x20\x63\x68\x61\x72\x61\x63\x74\x65\x72\x73\x20\x6C\x6F\x6E\x67\x2E","\x31\x30\x30\x30\x20\x69\x73\x20\x74\x68\x65\x20\x6D\x61\x78\x69\x6D\x75\x6D\x20\x63\x68\x61\x72\x61\x63\x74\x65\x72\x20\x6C\x69\x6D\x69\x74\x2E","\x2E\x61\x6C\x65\x72\x74","\x76\x69\x73\x69\x62\x69\x6C\x69\x74\x79","\x76\x69\x73\x69\x62\x6C\x65","\x2E\x73\x74\x72\x65\x6E\x67\x74\x68","\x23\x67\x65\x6E\x65\x72\x61\x74\x65\x50\x61\x73\x73","\x63\x68\x61\x6E\x67\x65","\x23\x73\x65\x74\x74\x69\x6E\x67\x73","\x30","\x23\x70\x61\x73\x73\x5F\x74\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x70\x61\x73\x73\x2D\x62\x6F\x78\x20\x69\x6E\x70\x75\x74","\x68\x69\x64\x64\x65\x6E","\x23\x63\x6C\x65\x61\x72\x41\x6C\x6C\x2C\x20\x23\x66\x69\x6C\x65\x5F\x6E\x65\x77","\x23\x66\x69\x6C\x65\x5F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x23\x66\x69\x6C\x65\x5F\x70\x72\x69\x6E\x74"];var area1=$(_$_bd84[0]),area2=$(_$_bd84[1]),area3=$(_$_bd84[2]),area4=$(_$_bd84[3]),area5=$(_$_bd84[4]);function checkAll(){$(_$_bd84[6]).prop(_$_bd84[5],!0),$(_$_bd84[7]).prop(_$_bd84[5],!0),$(_$_bd84[8]).prop(_$_bd84[5],!0),$(_$_bd84[9]).prop(_$_bd84[5],!0)}function fillPasswords(){var a=generatePassword(),b=generatePassword(),c=generatePassword(),f=generatePassword(),d=generatePassword();area1.val(a),$(_$_bd84[10]).html(getStrengthLevel(a)),area2.val(b),$(_$_bd84[11]).html(getStrengthLevel(b)),area3.val(c),$(_$_bd84[12]).html(getStrengthLevel(c)),area4.val(f),$(_$_bd84[13]).html(getStrengthLevel(f)),area5.val(d),$(_$_bd84[14]).html(getStrengthLevel(d))}function generatePassword(){var a={};a[_$_bd84[15]]= $(_$_bd84[16]).val(),a[_$_bd84[17]]= !!$(_$_bd84[6]).is(_$_bd84[18]),a[_$_bd84[19]]= !!$(_$_bd84[7]).is(_$_bd84[18]),a.numbers= !!$(_$_bd84[8]).is(_$_bd84[18]),a.symbols= !!$(_$_bd84[9]).is(_$_bd84[18]);var b=_$_bd84[20];a[_$_bd84[17]]&& (b+= _$_bd84[21]),a[_$_bd84[19]]&& (b+= _$_bd84[22]),a.numbers&& (b+= _$_bd84[23]),a.symbols&& (b+= _$_bd84[24]),b.replace(/[0O1IlB8\|]/g,_$_bd84[20]);for(var c=_$_bd84[20],f=0;f< a[_$_bd84[15]];f++){c+= b.charAt(Math.floor(Math.random()* b.length))};return c}function getStrengthLevel(a){var b= new RegExp(_$_bd84[25]),c= new RegExp(_$_bd84[26]);return b.test(a)?_$_bd84[27]:c.test(a)?_$_bd84[28]:_$_bd84[29]}function getContent(){return _$_bd84[30]+ area1.val()+ _$_bd84[31]+ area2.val()+ _$_bd84[32]+ area3.val()+ _$_bd84[33]+ area4.val()+ _$_bd84[34]+ area5.val()}function saveText(a,b){var c=navigator.userAgent.match(/MSIE\s([\d.]+)/),f=navigator.userAgent.match(/Trident\/7.0/)&& navigator.userAgent.match(/rv:11/),d=navigator.userAgent.match(/Edge/g),h=c?c[1]:f?11:d?12:-1;if(c&& h< 10){console.log(_$_bd84[35])}else {b= (b= getContent()).replace(/<br>/g,_$_bd84[36]);var g= new Blob([b],{type:_$_bd84[37]});if(_$_bd84[38]!= (a= prompt(_$_bd84[39],_$_bd84[40])+ _$_bd84[41])){if(h> -1){window.navigator.msSaveBlob(g,a)}else {var i=document.createElement(_$_bd84[42]);i.download= a,i.href= window.URL.createObjectURL(g),i.onclick= function(a){document.body.removeChild(a.target)},i.style.display= _$_bd84[43],document.body.appendChild(i),i.click()}}}}function escapeHtml(a){return a.replace(/&/g,_$_bd84[48]).replace(/</g,_$_bd84[47]).replace(/>/g,_$_bd84[46]).replace(/"/g,_$_bd84[45]).replace(/'/g,_$_bd84[44])}function ESCgetContent(){return _$_bd84[30]+ escapeHtml(area1.val())+ _$_bd84[31]+ escapeHtml(area2.val())+ _$_bd84[32]+ escapeHtml(area3.val())+ _$_bd84[33]+ escapeHtml(area4.val())+ _$_bd84[34]+ escapeHtml(area5.val())}function printTextArea(){allpass= ESCgetContent(),childWindow= window.open(_$_bd84[20],_$_bd84[49],_$_bd84[50]),childWindow.document.open(),childWindow.document.write(_$_bd84[51]),childWindow.document.write(allpass),childWindow.document.write(_$_bd84[52]),childWindow.print(),childWindow.document.close(),childWindow.close()}fillPasswords(),$(_$_bd84[59]).click(function(){$(_$_bd84[16]).val()< 6?Alert(_$_bd84[53]):$(_$_bd84[16]).val()> 500?Alert(_$_bd84[54]):($(_$_bd84[55]).hide(),fillPasswords(),$(_$_bd84[58]).css(_$_bd84[56],_$_bd84[57]))}),$(_$_bd84[61]).on(_$_bd84[60],function(){var a=$(_$_bd84[61]).val();1== a?$(_$_bd84[16]).val(8):2== a?($(_$_bd84[16]).val(29),checkAll()):3== a&& ($(_$_bd84[16]).val(63),checkAll())}),$(_$_bd84[63]).on(_$_bd84[60],function(){$(_$_bd84[61]).val(_$_bd84[62])}),$(_$_bd84[66]).click(function(){$(_$_bd84[64]).val(_$_bd84[20]),$(_$_bd84[58]).css(_$_bd84[56],_$_bd84[65])}),$(_$_bd84[64]).click(function(){this.blur(),Clipboard($(this))}),$(_$_bd84[67]).click(function(){saveText()}),$(_$_bd84[68]).click(function(){printTextArea()})