View Single Post
  #2  
Old 30th November 2021, 01:31
BamBam0077 BamBam0077 is offline
Banned
 
Join Date: Jul 2013
P2P
Posts: 410
Wink
pass = randomPassword('6');

chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ234567890";

pass = randomUsername('12');

chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ234567890";

Bump:
PHP Code:<br/>
<script language="JavaScript">
function randomPassword(length) {
chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ234567890";
pass = "";
for(x=0;x<length;x++) {
i = Math.floor(Math.random() * 62); pass += chars.charAt(i); }
return pass; }

function randomPass() {
pass = randomPassword('8'); document.getElementById('input').value = pass; document.getElementById('input').type = "text"; document.getElementById('input').value = pass;
}

function randomUsername(length) {
chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ234567890";
pass = "";
for(x=0;x<length;x++) {
i = Math.floor(Math.random() * 62); pass += chars.charAt(i); }
return pass; }

function randomUsername() {
pass = randomPassword('16'); document.getElementById('input2').value = pass; document.getElementById('input2').type = "text"; document.getElementById('input2').value = pass;
}

</script>
Username: <input id="input2" type="button" value="Generate" onclick="randomUsername();" />

Last edited by BamBam0077; 30th November 2021 at 02:00.
Reply With Quote