PDA

View Full Version : Editing This Script... Password Generator



tomyknoker
05-30-2007, 02:52 AM
Hi all,

I found a great script which can generate any number of passwords I want... However I want to edit it so that I can specify if I want to put always 2 characters in front of the passwords I can. For example if I want ed to generate 500 passwords, but all iof them started with 'jd', or 'lm'... Any ideas would be greatly apprecaited!

Here's the script

http://www.murchie.com/scripts/passwords/pw.shtml

Thanks in advance!

Twey
05-30-2007, 12:50 PM
Why not just generate the passwords, then prepend the characters you want?

tomyknoker
05-30-2007, 01:03 PM
Hi Twey... Yea I thought actually about doing that but I need to add 'lj' to 500 of them, can I make this happen in Excel or something?

djr33
05-30-2007, 01:05 PM
You're using javascript. This is very easy:

Assuming that password is a variable that stores the generated value--

password = 'jd'+password;

Twey
05-30-2007, 01:37 PM
Generate your passwords, then use this bookmarklet:
javascript:(function(str) { for(var i = 0, e = document.forms.PWGEN.elements.PASSWORD.value.split(/\r?\n/); i < e.length; ++i) e[i] = str + e[i]; document.forms.PWGEN.elements.PASSWORD.value = e.join("\n"); })("lm");Change the string in red at the end.

tomyknoker
05-31-2007, 03:48 AM
Hi twey... I'm not familiar with Bookmarklet's... So I've generate the passwords and now they are just in a text file... What's the next step?

Twey
05-31-2007, 08:16 AM
They need to be in the text field on that page. Just paste the above into your address bar and hit enter, unless you're using Konqueror, in which case it needs to be saved as a minitool first.

tomyknoker
05-31-2007, 01:44 PM
Twey how the hell do you leanr all this stuff?? I was so skepticle that was actualy going to work... but it did! Thanks again as always!