TST Archive
« Source for Random Password Generator »

Welcome Guest. Please Login or Register.
Nov 21, 2009, 4:41am




DONATE TO TST

ProBoards.com READ THIS!

source

How to prevent your forum from being taken out!

Read all of The Main Interface before doing anything!

VOTE HERE, HERE, and HERE to help TST climb the ranks!

~TST Productions~


TST Archive :: The Great Hack War :: Anti-Spam Resources :: Proboards; Anti-Spam and Security :: Source for Random Password Generator
   [Search This Thread][Send Topic To Friend] [Print]
 AuthorTopic: Source for Random Password Generator (Read 682 times)
Admiral Refuge™
Admiral
****
Strategy Pr0
Combat Pr0
[M:4030]
member is offline

[avatar]



Joined: Sept 2005
Gender: Male
Posts: 1,217
Location: U.S.A.
Karma: 120
 Source for Random Password Generator
« Thread Started on Mar 19, 2007, 11:40pm »

Placement: anywhere you like. :)
Compatability: PBv4 / Crossbrowser
Notes: Can be placed anywhere you like on your forum, preferrably at the footer. :) Passwords can be generated at 4 different strengths, each including uppercase, lowercase, numbers, and special characters. I recommend using atleast a 10 character password mixed with all four combinations.


<script type="text/javascript">
<!--

// Random Password Generator v2
// Open source

var allPassChars = '';
allPassChars += '9876543210'; // number generation
allPassChars += 'aBcDeFgHiJkLmNoPqRsTuVwXyZ'; // upper/lowercase generation
allPassChars += '~!@#$%^&*()_+\{\}\\\[\]><?'; // special character generation

function doRanPass(len) {
var pass = '';
var passInp = dogooent.getElementById('passinp');
if (len != parseInt(len) || !len.match(/[\d.]/)) {
return passInp.value = 'Please select strength.';
}
else if (len == parseInt(len)) {
for (var i = parseInt(len - 1); i >= 0; i--) {
pass += allPassChars.charAt(Math.floor(Math.random() * (allPassChars.length - 1)));
}
return passInp.value = pass.replace(/\s/g, '');
}
}

with (dogooent) {
write('<div align="center" style="font-size: 10px;"><b>Password Generator</b><br />');
write('<input id="passinp" type="text" size="24" onfocus="this.select();" value="">');
write('&' + 'nbsp;<select name="passsel"><option value="str">Strength:</option><option value="5">5</option>');
write('<option value="10">10</option><option value="15">15</option><option value="20">20</option></select>');
write('<input type="button" value="Go" onclick="doRanPass(this.previousSibling.options[this.previousSibling.options.selectedIndex].value);">');
write('</div>');
}

//-->
</script>


Credit for this code goes to Jay from Proboards Support
Link to Post - Back to Top  IP: Logged

Creation, Betrayal, Peace, the Fall of Empires, the Rise of Empires, Wrath, Victory, the Past, the Future, Death, Resurrection, Eternity...
Read the Bible... It will scare the "Hell" out of you!
|John 3:16|Mark 16:15-18|
   [Search This Thread][Send Topic To Friend] [Print]

© 2006 The Spammers Takeout - All rights reserved. Graphics and design by Zellow.
Best viewed in 1024x768 screen resolution.
Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!