Jan Posted February 11, 2010 Share Posted February 11, 2010 Hi, Thank you very much for sharing this. Very convenient when migrating clients. Best regards Jan 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted March 20, 2010 Share Posted March 20, 2010 Another good addon !! 0 Quote Link to comment Share on other sites More sharing options...
Grizzlyware Josh Posted March 23, 2010 Share Posted March 23, 2010 Quick Q: When generating the password in the client area, the buttons there, it generates it etc but it diplays it as text. I prosume this is fine... now thinking about it, how else are they going to know it Brain fart Awesome addon! Well done 0 Quote Link to comment Share on other sites More sharing options...
Snowman Posted March 25, 2010 Share Posted March 25, 2010 Suggestions Include: password_generator.js ( see attach file: clientareachangepw.tpl.jpg ) // compatibility for the template clientareachangepw.tpl function GeneratePassword2() { var p = GetRandomPassword(); var e = document.getElementsByName("newpw"); if (e.length>0) { e[0].value = p; if (e[0].type == "password") changeInputType(e[0],"text"); } // For a "confirm password" field e = document.getElementsByName("confirmpw"); if (e.length>0) { e[0].value = p; if (e[0].type == "password") changeInputType(e[0],"text"); } } in clientareachangepw.tpl <input type="button" value="Gerar Senha" onclick="GeneratePassword2();"/> Another suggestion: /clientregister.tpl ( see attach file: clientregister.tpl.jpg ) Congratulations I have applied these changes and they work well however one issue i found is the password strength meter then doesnt show how strong the pass is anyone know how to sort that? 0 Quote Link to comment Share on other sites More sharing options...
FrostByte Posted June 16, 2010 Share Posted June 16, 2010 Is there any way to get this little addon implemented for use on the promotion code screen? Would be handy to generate random strings for promotion codes rather than have to think up corny little codes like "autumsale" and "get20off" etc. Could someone maybe write a little script for that? Cheers 0 Quote Link to comment Share on other sites More sharing options...
serverorigin Posted July 28, 2010 Share Posted July 28, 2010 Nicely done! 0 Quote Link to comment Share on other sites More sharing options...
lightbeing creations Posted October 3, 2010 Share Posted October 3, 2010 Great addon that makes things so much easier, thanks. One question though, does it work with the new Ajax order form, as I don't seem to be able to get that to work? 0 Quote Link to comment Share on other sites More sharing options...
shotgun Posted January 16, 2011 Share Posted January 16, 2011 Thanks for this. I'm also using it to generate root passwords during the order process for vps's and servers. I got fed up with people using "password" as the root pass and leaving it get brute forced :-/ 0 Quote Link to comment Share on other sites More sharing options...
sol2010 Posted August 2, 2011 Share Posted August 2, 2011 Hmmm seems as though the download is broken - anyone have a link ? 0 Quote Link to comment Share on other sites More sharing options...
hostpro2u Posted August 4, 2011 Share Posted August 4, 2011 It works perfectly, thanks a lot. 0 Quote Link to comment Share on other sites More sharing options...
chuva Posted August 4, 2011 Share Posted August 4, 2011 Work in 4.5.2, perfect Thanks 0 Quote Link to comment Share on other sites More sharing options...
bellafronte Posted September 18, 2011 Share Posted September 18, 2011 the link for download dont work 0 Quote Link to comment Share on other sites More sharing options...
webjive Posted November 17, 2011 Share Posted November 17, 2011 The link is down. 0 Quote Link to comment Share on other sites More sharing options...
cenourinha Posted November 18, 2011 Share Posted November 18, 2011 Would like to see this as default in whmcs. 0 Quote Link to comment Share on other sites More sharing options...
gerrybakker Posted December 13, 2011 Share Posted December 13, 2011 pwgen 1.0 http://www.whmcs.com/members/communityaddons.php?action=viewmod&id=35 Works great - the download link is missing. I still have the zip file I downloaded last year. Where can we make it available to everyone again? Note: In WHMCS version 5.X edit the /admin/templates/blend/header.tpl file for the admin side password features - it works great - should be a standard feature in WHMCS. 0 Quote Link to comment Share on other sites More sharing options...
RFEHosting Posted December 23, 2011 Share Posted December 23, 2011 I agree, this would be a great feature to have in WHMCS as a standard feature. 0 Quote Link to comment Share on other sites More sharing options...
helresa Posted January 8, 2012 Share Posted January 8, 2012 to get the PW meter to work in V5 change password_generator.js as follows // Adding this for the password strength meter // This is copied in part from /whmcs/includes/jscript/pwstrength.js $("#password").keyup(function () { var pw = $("#password").val(); var pwlength=(pw.length); if(pwlength>5)pwlength=5; var numnumeric=pw.replace(/[0-9]/g,""); var numeric=(pw.length-numnumeric.length); if(numeric>3)numeric=3; var symbols=pw.replace(/\W/g,""); var numsymbols=(pw.length-symbols.length); if(numsymbols>3)numsymbols=3; var numupper=pw.replace(/[A-Z]/g,""); var upper=(pw.length-numupper.length); if(upper>3)upper=3; var pwstrength=((pwlength*10)-20)+(numeric*10)+(numsymbols*15)+(upper*10); if(pwstrength<0){pwstrength=0} if(pwstrength>100){pwstrength=100} $("#pwstrengthbox").removeClass("weak moderate strong"); $("#pwstrengthbox").html("Strong"); $("#pwstrengthbox").addClass("strong"); if (pwstrength<75) { $("#pwstrengthbox").html("Moderate"); $("#pwstrengthbox").addClass("moderate"); } if (pwstrength<30) { $("#pwstrengthbox").html("Weak"); $("#pwstrengthbox").addClass("weak"); } }); // End copied code and // Call the password keyup function (if it exists) to update the pw strength meter on the order checkout page $("#password").keyup(); But it would be good to get this integrated into the main system 0 Quote Link to comment Share on other sites More sharing options...
scar45 Posted January 29, 2012 Share Posted January 29, 2012 It appears that even though the download is missing, the instructions from the first post still seem to work fine w/WHMCS 5.0.3 for me. Great addon without a doubt! 0 Quote Link to comment Share on other sites More sharing options...
sol2010 Posted January 30, 2012 Share Posted January 30, 2012 (edited) Yes the link on the English WHMCS site is not working. However, you can find it here on the WHMCS Brazil site (wow these guys really are international! It's originally in Portuguese (hence the google translate link) so you need to translate a few words back to English (easy) You will need to amend the code (OK, Medium, Strong) in the JS file and also change the Generate button text - other than that it's good! Here's the link: scroll down the page to the Password Generator part. http://translate.google.com/translate?sl=auto&tl=en&js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2Fwww.whmcs.blog.br%2Ftag%2Fsenha%2F&act=url The download link is here for the zip file (www.whmcs.blog.br/wp-content/plugins/download-monitor/download.php?id=26) Edited January 30, 2012 by sol2010 0 Quote Link to comment Share on other sites More sharing options...
Brainchild Labs Pty Ltd Posted February 11, 2012 Share Posted February 11, 2012 So i can confirm this works.... following the instructions properly the only thing that does not work is the CLIENTAREAPWCHANGE and the CLIENTAREAREGISTER does not work, when you click on Generate Password button it does nothing i think its because it has something to do with the hidden asterix fields. If anyone can get this working let me know. 0 Quote Link to comment Share on other sites More sharing options...
xriddle Posted March 16, 2012 Share Posted March 16, 2012 So i can confirm this works.... following the instructions properly the only thing that does not work is the CLIENTAREAPWCHANGE and the CLIENTAREAREGISTER does not work, when you click on Generate Password button it does nothing i think its because it has something to do with the hidden asterix fields. If anyone can get this working let me know. I'm having the same issue ... works in Admin but in cart button does nothing 0 Quote Link to comment Share on other sites More sharing options...
rodeoXtreme Posted March 22, 2012 Share Posted March 22, 2012 We've been using this for a while now; however, to maintain PCI compliant, does anyone know how to include symbols in addition to the alphanumeric passwords. We've added chars += "\!\@,\%\~\=\)\(\;\$"; to the function GetRandomCharacter() { but it still doesn't include the symbol. Thanks 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted March 22, 2012 Share Posted March 22, 2012 Couple things you could try. Use single quotes rather than double quotes to wrap your string. and you probably do not need to escape all of them. Load up the page with firebug running and see if its throwing any javascript errors. 0 Quote Link to comment Share on other sites More sharing options...
rodeoXtreme Posted March 22, 2012 Share Posted March 22, 2012 Hi Frank, Thanks for the help. We have modified the previous code so symbols are now generating (I have included the code below), unfortunately we do not have it working in v5.0 Client Area yet. // AddAutoPasswordButtons: Look for password boxes and add a generate password button next to them function AddAutoPasswordButtons() { // Don't add the Generate button to certain pages where it wouldn't make sense var NoGenerate = [ 'WHMCS - Servers', 'WHMCS - Support Ticket Departments' ]; for (i=0; i<NoGenerate.length; i++) if (document.title == NoGenerate[i]) return; // Get the Password text box, if there is one var e = document.getElementsByName("password"); if (e.length>0) { var b = document.createElement("input"); b.type = "button"; b.value = "Generate"; b.onclick = GeneratePassword; e[0].parentNode.appendChild(b); } } // GeneratePassword: Generate a password and place it in a textbox function GeneratePassword() { var p = GetRandomPassword(); var e = document.getElementsByName("password"); if (e.length>0) { e[0].value = p; if (e[0].type == "password") e[0].type = "text"; } // For a "confirm password" field e = document.getElementsByName("password2"); if (e.length>0) { e[0].value = p; if (e[0].type == "password") e[0].type = "text"; } } // GetRandomNumber: Get a random number between two specified numbers function GetRandomNumber(lbound,ubound) { return (Math.floor(Math.random() * (ubound-lbound)) + lbound); } // GetRandomCharacter: Get a random character function GetRandomCharacter() { var chars = ""; // Choose your character sets below chars += "0123456789"; chars += "abcdefghijklmnopqrstuvwxyz"; chars += "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; chars += "\!\@,\%\~\=\)\(\;\$"; return chars.charAt(GetRandomNumber(0,chars.length)); } //puts each character from the string str in arr and returns a new array function PushArray(arr, str) { var a = []; for (var i = 0; i < str.length; i++) a[a.length] = str.charAt(i); arr[arr.length] = a; return arr; } //does the actual generating function GenerateRandomPasswords(length, letters, uppercase, numbers, punctuation, printable) { var pass_length = parseInt(length); if (pass_length < 1 || pass_length > 256) return false; var needed_charsets = []; if (printable === true) { var print_chars = []; for (var i = 32; i < 127; i++) print_chars[print_chars.length] = String.fromCharCode(i); needed_charsets[0] = print_chars; } else { if (letters === true) PushArray(needed_charsets, "qwertyuiopasdfghjklzxcvbnm"); if (uppercase === true) PushArray(needed_charsets, "QWERTYUIOPASDFGHJKLZXCVBNM"); if (numbers === true) PushArray(needed_charsets, "0123456789"); if (punctuation === true) PushArray(needed_charsets, ":;,.?!"); } if (0 == needed_charsets.length) return false; //var quantity = 3; if (pass_length < needed_charsets.length) pass_length = needed_charsets.length; var result = ""; //for (var i = 0; i < quantity; i++) { var p; while (true) { p = []; var used_charsets = []; for (var j = 0; j < needed_charsets.length; ++j) used_charsets[j] = false; for (var j = 0; j < pass_length; ++j) { var k = Math.floor(Math.random()*needed_charsets.length); var available_chars = needed_charsets[k]; p[j] = available_chars[Math.floor(Math.random()*available_chars.length)]; used_charsets[k] = true; } var all_charsets_used = true; for (var j = 0; j < needed_charsets.length; ++j) all_charsets_used = all_charsets_used && used_charsets[j]; if (all_charsets_used) break; } for (var j = 0; j < pass_length; j++) { var ch = p[j]; if ("<" == ch) ch = "<"; if (">" == ch) ch = ">"; result += ch; } //result += '<br />'; //alert(result); //} return result; } // GetRandomPassword: Get a random password function GetRandomPassword() { /* var p = ""; for (i=0; i<8; i++) p += GetRandomCharacter(); return p; */ return GenerateRandomPasswords(8, true, true, true, true, false); } //------------------------------------------------------------------------------ // Adding events to onLoad // Source: http://onlinetools.org/articles/unobtrusivejavascript/chapter4.html function addEvent(obj, evType, fn){ if (obj.addEventListener){ obj.addEventListener(evType, fn, false); return true; } else if (obj.attachEvent){ var r = obj.attachEvent("on"+evType, fn); return r; } else { return false; } } // Hook AddAutoPasswordButtons to window load addEvent(window,'load',AddAutoPasswordButtons); 0 Quote Link to comment Share on other sites More sharing options...
snake Posted March 28, 2012 Share Posted March 28, 2012 the download link here or on the community addons page no longer works 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.