Results 1 to 8 of 8

Thread: Editing This Script... Password Generator

  1. #1
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Editing This Script... Password Generator

    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!

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Why not just generate the passwords, then prepend the characters you want?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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?

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You're using javascript. This is very easy:

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

    password = 'jd'+password;
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Generate your passwords, then use this bookmarklet:
    Code:
    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.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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?

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •