1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

July Plugins

Discussion in 'Plugins' started by Charles Dye, Aug 1, 2012.

  1. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,374
    Likes Received:
    40
    I've only updated one plugin in the past month:

    TextUtils plugin v0.50.1
    Added commands to save and restore arrays to/from disk files; modified the algorithm used by @OBSCURE to make it more secure.

    A more general change is that I've moved my plugins to a new server, so they can be accessed via either HTTP or FTP. The complete list is here: prospero.unm.edu/plugins/ or here: ftp://prospero.unm.edu/ (If you have the old address bookmarked, you'll be redirected to the new one.)
     
  2. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,054
    Likes Received:
    1
    Hi Charles. Why does the http and ftp address differe in the /plugins/ ??
     
  3. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,374
    Likes Received:
    40
    I may use that server to offer other, unrelated, web pages in the future. But I don't foresee making more than the one directory available via anonymous FTP.
     
  4. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    Charles:
    Thanks for the update and for making it available by FTP. A minor tweak (which you may have already done) may be useful for the future: making the file modification dates on the FTP site match the modification dates of the ZIP file contents. This would allow using your "latest file in tree" feature to easily limit downloads to only those files with newer content than previously downloaded ones.

    Thanks again for your efforts!
     
  5. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    Suggestions for the PASSWORD command in TextUtils. Several of the switches have a min,max setting. Now for the suggestions...
    • for /A, /D, /E, and /P: if no max is provided then assume that max is password length instead of equal to min
    • add a switch to allow setting a min,max for lowercase letters (also following previous bullet)
     
  6. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,374
    Likes Received:
    40
    That's actually how I wrote it initially, but I didn't like it. PASSWORD /P:1 with no other options would produce a password consisting entirely of punctuation, probably not what was intended. (Unspecified components default to zero, unless the total of the specified maximums is less than the minimum length.)
     
  7. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    I consider that to be exactly what was intended. I think that when you start telling it what you want, that you should have to specify exactly what you want.

    Before reading the docs, here was my first try which follows along with what you did with the /P...
    Code:
    C:\test> password /a:1 /c:0 /d:1 /e:1 /f /l:12 /p:1 /y /n:20
    TextUtils plugin: Minimum length 12 is greater than the sum of the maximums
     
  8. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    I'm going to walk you through my train of thought when trying out the command after discovering it the first time.

    1. Let's see what this command does...
    Code:
    C:\temp> password
    $86+lYI?q
    2. Interesting, what can it do?
    Code:
    C:\temp> password /?
    Generates random passwords.
     
    PASSWORD /A:m,n /C:n /D:m,n /E:m,n /F /L:m,n /N:n /P:m,n /S:m,n /Y
     
            /A:  Alpha characters (min/max)
            /C:  Case:  0 random, 1 lower, 2 upper, 3 word
            /D:  Digits (min/max)
            /E:  Extended characters (min/max)
            /F  make First character a letter if possible
            /L:  total Length (min/max)
            /N:  Number of passwords to generate
            /P:  Punctuation characters (min/max)
            /S:  Syllables (min/max)
            /Y  copy password to clipboard
     
    By default, passwords 7-10 characters long will be generated.  This
    command also saves its parameters for use by the _PASSWORD variable.
    3. OK, so I want passwords with at least 1 alpha, mixed case, at least 1 digit, at least 1 extended, start it with a letter, make it 12 characters long, at least 1 punctuation, copy it to the clipboard, and I want 20 of them.
    Code:
    C:\temp> password /a:1 /c:0 /d:1 /e:1 /f /l:12 /p:1 /y /n:20
    TextUtils plugin: Minimum length 12 is greater than the sum of the maximums
    4. Wow, that's weird. Hmm... lemme just tell it what I want in it. Alphas, mixed case, digits, starting with a letter, length 12, punctuation, clipboard it, and gimme 20.
    Code:
    C:\temp> password /a /c:0 /d /f /l:12 /p /y /n:20
    TextUtils plugin: Minimum length 12 is greater than the sum of the maximums
    5. Well CRAP!!! Can I just tell it how long I want it to be?
    Code:
    C:\temp> password /l:12
    s0nSI38}*/Z0
    6. OK, that works, so where did I put the damn manual?
     
  9. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,374
    Likes Received:
    40
    Okay, I've put a new build up. An unspecified maximum in /A /D /E /P or /S will default to the maximum value for that option. (But not /L. I definitely don't want /L:5 to return a 1024-character string.)
     
  10. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    Thanks, gonna try it now. I totally agree about the /L. If /L:5 is specified, then it should just return length of 5.
     
  11. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    If a switch is provided without a min and max then min should default to 1, not zero.

    Currently (0.50.2), this is what happens
    Code:
    C:\test> password /A
    48@2@,3
    Whereas, I think
    Code:
    C:\test> password /A
    OdHDxKyw
    would be preferable.

    ps. I'm probably going to be beating the PASSWORD command to death with suggestions as I've been looking into various software that does this. So far, the password generator in KeePass 2.19 looks to be most robust.
     
  12. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,374
    Likes Received:
    40
    I'm not even sure that that should be legal syntax. (What would PASSWORD /L do?)
     
  13. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    The /L switch would still require a min value (to define the min or min/max) and optionally a max.
     
  14. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    Are you ready for this?

    Here's what I'm thinking for functionality (square brackets indicate optional parameters, underscores are defaults)

    Code:
    C:\temp> password /?
    Generates random passwords.
     
    PASSWORD [/A[:m[,n]]] [/C:x] [/D[:m[,n]]] [/E[:m[,n]]] [/F] [/L:m[,n]] [/N:x] [/P[:m[,n]]] [/S[:m[,n]]] [/U[:m[,n]]] [/Y]
     
        Content switches
            /A  Alpha characters, lower case (min _1_ / max)
            /D  Digits (min _1_ / max)
            /E  Extended characters (min _1_ / max)
            /P  Punctuation characters (min _1_ / max)
            /U  alpha characters, Upper case (min _1_ / max)
     
        Format switches
            /C  Case:  _0_ random, 1 word, 2 alternating, 3 "leet" (upper consonants, lower vowels), 4 inverse "leet"
            /F  make First character a letter if possible
            /L  total Length (min / max)
            /N  Number of passwords to generate (_1_)
            /S  Syllables (min _1_ / max)
            /Y  copy password to clipboard
     
    By default, passwords 8 characters long will be generated using switches /A /D /P /U.
    Using any content switches will limit the password to the specified switches.
    This command also saves its parameters for use by the _PASSWORD variable.
     
    Examples:
        PASSWORD
            8 character password containing upper case, lower case, digits, and punctuation
     
        PASSWORD /A /L:6
            6 character lower case
     
        PASSWORD /A /U /D /L:12,16
            12 to 16 character upper, lower, digits
    
     
  15. dcantor

    Joined:
    May 29, 2008
    Messages:
    516
    Likes Received:
    3
    I'd really like to see /X:n mean the same as /X:n,n for all the specifications that take minimum and maximum values.

    In my arrogant opinion, it's completely counterintuitive that a length specification on a switch parameter like /X:n (where X stands for any letter) means a minimum of n with some predetermined maximum.

    I think the semantics should be:
    /X:n,m should mean between n and m of them.
    /X:n should mean the same as /X:n,n -- exactly 'n' of whatever X means; no more and no fewer.
    /X:,m should mean the same as /X:0,m (or perhaps /X:1,m).
    /X:n, (with the trailing comma) should mean at least n with the predetermined default maximum.
    /X: with no values should mean use predetermined values for minimum and maximum

    Just trying to be constructive.

    Dave C.
     
  16. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    Makes sense. I agree.
     
  17. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,374
    Likes Received:
    40
    Dave:

    I agree with all of the above except the last one. I still don't like the idea of /X: with no values at all -- it seems pointless to me, and ought to generate an error. /X:n, is a nice idea, and wouldn't be hard to add.
     
  18. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,374
    Likes Received:
    40
    I don't quite grok this. One option to insert lowercase letters, one to insert uppercase, and then one to recase them?

    How about a /C suboption to specify a probability, e.g. to make about 25% of letters uppercase and the rest lowercase?
     
  19. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    The /C would only apply if you have both upper and lower selected. There would be no reason to have changing case if only one or the other was in affect.

    For instance... PASSWORD /A /U /C:2 would output something like "AbCdEfGh". It wouldn't make sense for PASSWORD /A /C:2 since you're only allowing the program to create lower case letters. Basically, if both /A and /U are not in affect, then ignore any /L:x.

    A sixth probability suboption would also be good.
     
  20. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    I didn't notice that. Yeah, the colon character without something following it makes no sense and would be more difficult to parse. Either have the switch by itself or with a colon followed by some parameters.
     
  21. dcantor

    Joined:
    May 29, 2008
    Messages:
    516
    Likes Received:
    3
    Well, if I scored one good idea out of five, I'm happy to have contributed.

    So, perhaps /X could mean /X:1, (at least one).
     
  22. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    TextUtils v0.52.2

    Command line help for PASSWORD doesn't show "5 alternating" for case switch as listed in docs.
     
  23. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,374
    Likes Received:
    40
    Not very scientific, but I guess the threshold for putting a feature in the quick help is "useful at least 1% of the time", whereas for the help file it's more like "useful 0.1% of the time". (The quick help for PARSEARGS is missing eight flags -- all specialized to the point of bizarre.)
     
  24. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    I haven't looked at PARSEARGS, so haven't had the need to bitch about it yet. ;)
     

Share This Page