[Tweak needed] - Generate a Complex Password without the number 0 (zero)

Hi there,
I've been reading this forum a lot, and happens to be the first time I need to post something on my own.
I've found this very useful piece
of code from your script repository and I've been able to tweak it for my needs but for one thing: eliminate the number 0 (zero) from the list of possible list of numbers to be used.
I know I could read the string and if 0 (zero) is found, reject the password, but would rather understand/find a way how to make it not an option at all to generate
the password.
Thanks a lot in advance for your answers.
Patrick

Change the following line in the script:
iAsc = Int(Rnd*10)+48
To: 
iAsc = Int(Rnd*9)+49
The original code generates a random ASCII character value for the numbers 0 to 9 (ASCII 48 to 57). The new code generates a random ASCII character value for the numbers 1 to 9 (ASCII 49 to 57).
As has been mentioned already, by not allowing zeros you are effectively (slightly) weakening your algorithm for generating complex passwords.
Jason Warren
@jaspnwarren
jasonwarren.ca
habaneroconsulting.com/Insights

Similar Messages

  • How can I reset my admin. password without the MAC OXS  reinstall, bought mine used and have no such disk

    Hi, how can I change my admin password without the reinstall of MAC OXS disk or whatever that is, I bought my macbook privately and cant update my adobe flash without the password which I have never set up. but anything I type in is wrong...... as a password.

    ok have read all relivant posts and have tried the restart command+R which does absolutely nothing. My Computer opens up as usual.
    I have found another response which suggests command+S and generate an entirely new admin. and password and you are not supposed to loose a single file.
    Has anyone done this and been successful? I have just installed a new hard drive in the last 3 months and don't want to do any damage.
    Hearing a success story would be nice.  Thanks

  • My iphone 3gs will not connect to itunes and it says that I need to do a system restore. It also says that I need to enter my password on the iphone to connect to itunes but I can not do this because the phone is in emergency phone call mode only.

    My iphone 3gs will not connect to itunes and it says that I need to do a system restore. It also says that I need to enter my password on the iphone to connect to itunes but I can not do this because the phone is in emergency phone call mode only.

    Turn your phone off and connect your cable to the computer, but not the device just yet. Start up iTunes. Now, hold down the home button on your phone and plug it in to the cable - don't let go of the button until iTunes tells you it's detected a phone in recovery mode. Now you can restore to factory settings.
    Unfortunately, the data on your phone is already gone if you're seeing the connect to iTunes logo.

  • I've forgotten my Administrator Password. When researching, it generally tells me I need to reboot my account with the original start-up disk. Is there a way to go about resetting your password without the disk?

    Please if anyone can be of help whom knows how to reset your adminsistrator password without your original start-up disk, I would really appreciate it! Thanks

    Try the method as mentioned by " Ds Store " in the below User Tip. You will have to boot your Mac in Single User Mode where you can reset the Password using Terminal Command and without the Snow Leopard Disc.
    https://discussions.apple.com/docs/DOC-5381

  • Need help resetting or changing my admin username and password without the installation disc

    I accidentally clicked on the check box that is located in system preferences in accounts that says "Allow user to administer this computer" and unchecked it. So the account that I set up the user name and password to is not the administer anymore and I don't know what account is. So now every time I want to make changes to anything and click on the lock button it will not accept my username and password. So how do I reset my username and password for the administer without the installation disc and without losing any files or folders????
    Message was edited by: ashkonnor8808

    Those changes require an installation DVD. However, see:
    Forgot Your Account Password
    For Snow Leopard and earlier with installer DVD
         Mac OS X 10.6- If you forget your administrator password
    For Snow Leopard and earlier without installer DVD
        How to reset your Mac OS X password without an installer disc | MacYourself

  • HT1414 need to restore my Ipad without the password

    my daughter locked my Ipad by trying to enter the password and ended up disableing the I pad and I did not sync it with Itunes now how do I restore it

    Recovery Mode (Note: data will be lost)
    1. Turn off iPad
    2. Connect USB cable to computer; leave the other end alone
    3. Press and hold the Home button down and connect the docking end of cable to iPad
    4. Continue holding the Home button until you see the "Connect To iTune" screen
    5. Release the Home button
    6. Open iTune
    7. You should see "iTunes has detected an iPad in recovery mode"
    8. Use iTune to restore iPad
    Note: You need to be patient and repeat the above many times to recover your iPad

  • HT4314 How can I reset the gem center password without the birthday

    Does anyone know how to reset game center password without knowing the birthday.  My son setup his own game center account and to logge out and know can't reset the password.

    Boot from your recovery partition by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the recovery desktop appears, select Utilities ▹ Terminal from the menu bar.
    In the Terminal window, enter “resetpassword” and press return. A Reset Password window opens.
    Select your boot volume if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Follow the prompts to reset the password.
    Select  ▹ Restart from the menu bar.
    You should now be able to log in with the new password, but you won't be able to unlock the Keychain. If you've forgotten the Keychain password (which is ordinarily the same as your login password), there's no way to recover it. You’ll need to reset your keychain in the preferences of the Keychain Access application.

  • How can I change the password without the startup disk?

    I recently purchased a used Macbook OS X 10.4.11. I don't know the password, and couldn't get the disk so I can reset it.
    If anyone could help me, that would be much appreciated! I'm new to this whole Mac thing, I bought it for college next year.
    Thanks!

    Hi emathers, and a warm welcome to the forums!
    As long as it's not a Firmware Password set, Reset OS X Password Without an OS X CD...
    http://theappleblog.com/2008/06/22/reset-os-x-password-without-an-os-x-cd/
    Once you've done that the computer reboots and it's like the first time you used the machine. Your old accounts are all safe. From there you just change all other account passwords in the account preferences! (Use a new Shortname & such so as not to interfere with the original)
    applesetupdone...
    http://discussions.apple.com/thread.jspa?messageID=6059333&#6059333
    http://www.askdavetaylor.com/howdo_i_reset_my_mac_os_x_admin_rootpassword.html

  • Generate numbers in incremental order, the number of times condition met?

    I have tried explaining my problem here also.
    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=31&t=007531&p=1
    But trying to put in other words now.
    I have a NO tag which appears many times in xml. and alwyas have some random numbers displaying.
    output looks something similar to this
    something......<NO>1</NO>
    something......<NO>1</NO>
    something......<NO>2</NO>
    something......<NO>1</NO>
    something......<NO>3</NO>
    something......<NO>1</NO>
    something......<NO>5</NO>
    something......<NO>1</NO>
    something......<NO>1</NO>
    something...... & so on.
    Now instead of these numbers coming in this order i prefer to display in final output file as
    1 2 3 4 5 .................... n
    Is it possible in any ways using xslt.
    DO we need to ignore the values given in input file and then generate output values for same.
    it can be like the number of times NO tag appears in xml, it should start from 1 and keep increasing value by 1, until NO tag finishes appearance.
    But next time when other xml transforms it again should be able to start from 1 till n.
    is there a possibility of using java code for this situation or xslt is capaable enough to handle this.
    Thanks
    VJ

    I'm guessing you are looking for something like this. I used a pull approach but it could be done with a push (xsl:for-each).
    Sample XML
    <?xml version="1.0" encoding="UTF-8"?>
    <root>
         <NO>1</NO>
         <NO>1</NO>
         <NO>2</NO>
         <NO>1</NO>
         <NO>3</NO>
         <NO>1</NO>
         <NO>5</NO>
         <NO>1</NO>
         <NO>1</NO>
    </root>
    Sample XSLT
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="xml" version="1.0" omit-xml-declaration="yes" encoding="UTF-8" indent="yes"/>
         <xsl:template match="root">
              <output>
                   <xsl:apply-templates select="NO"/>
              </output>
         </xsl:template>
         <xsl:template match="NO">
              <row>
                   <xsl:value-of select="position()"/>
              </row>
         </xsl:template>
    </xsl:stylesheet>
    Sample Output
    <output>
         <row>1</row>
         <row>2</row>
         <row>3</row>
         <row>4</row>
         <row>5</row>
         <row>6</row>
         <row>7</row>
         <row>8</row>
         <row>9</row>
    </output>

  • In a numbered list, how can I italicize the text without the number getting italicized?

    Text is set to regular in the style, but if I italicize the first word of the list item, the number gets italicized, too, which is decidedly uncool.
    Thanks.
    ~Valerie
    (CS6, Windows 8.1)

    Assigning character styles to entire paragraphs is bad practice.
    Basically the numbering will play follow the leader.
    If it's
    1. Regular Text
    2. Bold Text
    3. Italic
    The numeral usually takes on the format of the paragraph style.
    What is the best thing to do?
    Go into the Bullets and Numbering
    In that dialog section of the Paragraph Style
    There's a section to assign a Character Style to the numbering.
    Create a new style from this drop down menu.
    And choose Regular/Roman or whatver version of that font  you want the numbering to be.
    The numbers will always be Roman (or whatever you set)

  • Need to know how to limit the number of rows returned on Oracle

    MS SQL Server has a command called 'set row count'.
    We are trying to find similar one on Oracle.
    What we are trying to do is that instead of using rownum in the query statement, we would like to find way to limit the number of rows returned. I understand that we can use JDBC resultSet object, but that's not what we want.
    I know Oracle has one called arraysize, but this would not limit the number of rows returned either.
    Pease help.
    Thanks

    I understand that we can use JDBC resultSet object, but that's not what we want.I'm not sure which feature of ResultSet you use and which not.
    But if this question has anything to do with JDBC (that's the forum where you put it), I'd recommend to use Statement.setMaxRows(). This will limit the count of rows which your statement will fetch into it's ResultSet.

  • I replaced my keyboard batteries and the light is flashing so it is in discovery mode. But I am stuck on the home page where I need to type my password, without a keyboard. Aluminum trick didn't work. What do I do?

    I shut off my computer and the next day replaced the batteries in my keyboard after getting the low battery message. After replacing them and turning the keyboard on and off the green LED was blinking which meant it was in discovery mode. The problem is I can't login to my computer because I need to type in a password. But I can't use the keyboard so I can't use my mouse to find the device because I can't login.  The aluminum ball trick did not work and I did recheck the battery life and they are in the right way. How do I fix this?

    Try resetting the iPod >  iPod touch: Turning off and on (restarting) and resetting

  • I need to reset my password but the email linked t...

    Hi 
    I'm currently able to sign into Skype using my Microsoft account details. However Skype will not let me change any of my account settings without my Skype password (which is different to my Microsoft account details). I need to update the email associated with my Skype account as it is defunct. Howwver, I cant change it without remebering my password and I cant reset my password because Skype keeps using the defunct email address. Arrrgh! 
    Is there another way to change my Skype password? 
    Thanks

    http://community.skype.com/t5/Security-Privacy-Trust-and/So-you-want-to-change-your-primary-mail-but...

  • How do I change my password without the install cd?

    I need to change the password on my g4 powerbook (os x 10.4.2), but I don't have the install CD. Is there any way to do that? Please help! Thanks!

    Welcome to Apple Discussions, hm224.
    Do you want to reset OR change the password? If you know what your password is and only want to change it then you can do that from the Accounts section within System Preferences.
    However if you cannot remember your password and you don't have the original installer disc then perhaps you can try asking either an Apple Store, an Apple Authorised Service Provider or a PowerBook-owning friend to see if they will help. Otherwise you can purchase a retail copy of OS X Tiger.
    2.0GHz MacBook, 15" 1.25GHz/12" 1GHz PBs, 2xPPC Mac minis, 12" iBook G4,   Mac OS X (10.4.8)   Cube, 2xTAMs, iPod 4G & nano 2G, 1G & 2G iPs, AEBS, AX

  • Is there a way to reset my administrator password without the Mac OS X media?

    I can't remember my administrator password for my computer and I no longer have my Mac OS disc but I can't update any of my programs without my administrator password.
    Can anyone offer some friendly advice?!
    Thanks!

    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    When the menubar appears select Terminal from the Utilities menu. Enter resetpassword at the prompt and press RETURN. Follow instructions in the dialog window that will appear.
    Or see Reset a Mac OS X 10.7 Lion Password and OS X Lion- Apple ID can be used to reset your user account password.

Maybe you are looking for

  • OB52  Stuck

    Why i am recieving this error message ( Attached a screen shot ) Define OPEN AND CLOSE POSTING PERIODS  OB52 I created one, saved it.  Discovered a mistake. So let's copy another one rename it,  Now error message " Entry D002   does not exist in T010

  • Disabling the creation of sample application for new workspace

    Hi, Just wondering if it's possible to disable the sample the application that is created when ever you create a new workspace? Also so that it doesn't create the 'demo' tables and associated sequences. Pretty sure we have this configured at work, bu

  • Problems with screen resolution after reinstalling Windows 7 Home Premium

    Product Name: HP Pavilion dv6 Notebook PC Product Number: A6X94UA#ABA BIOS: F.1C Processor: Intel Core i7-2670QM Graphics Device: Intel HD Graphics Family I recently had to wipe my laptop and reinstall Windows 7 Home Premium (created restore disk fro

  • Can i Chang PDF file using Acrobat Pro (CS5)?

    Can i manipulate a PDF file - Delete elments, or delete elements with backgroung without changing the beckground? TNX Gadi

  • MSS- Search Position-- Sorting error

    Hello Experts, We are using EP7.0/ECC6.0 system. While navigating to MSS->Search position form, there are various columns available like (firstname, org unit, manager name etc..). When we are trying to sort the firstname column through header arrow,