July Plugins

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,575
46
Albuquerque, NM
prospero.unm.edu
#1
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.)
 
#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!
 
Jan 19, 2011
577
9
Norman, OK
#5
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)
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,575
46
Albuquerque, NM
prospero.unm.edu
#6
for /A, /D, /E, and /P: if no max is provided then assume that max is password length instead of equal to min
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.)
 
Jan 19, 2011
577
9
Norman, OK
#7
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.)
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
 
Jan 19, 2011
577
9
Norman, OK
#8
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?
 
#10
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.)
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
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
[email protected]@,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.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,575
46
Albuquerque, NM
prospero.unm.edu
#12
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
[email protected]@,3
Whereas, I think
Code:
C:\test> password /A
OdHDxKyw
would be preferable.
I'm not even sure that that should be legal syntax. (What would PASSWORD /L do?)
 
#14
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
 
May 29, 2008
529
3
Groton, CT
#15
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
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.
Makes sense. I agree.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,575
46
Albuquerque, NM
prospero.unm.edu
#17
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
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.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,575
46
Albuquerque, NM
prospero.unm.edu
#18
Code:
        /A  Alpha characters, lower case (min _1_ / max)
        /U  alpha characters, Upper case (min _1_ / max)
        /C  Case:  _0_ random, 1 word, 2 alternating, 3 "leet" (upper consonants, lower vowels), 4 inverse "leet"
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
I don't quite grok this. One option to insert lowercase letters, one to insert uppercase, and then one to recase them?
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.

How about a /C suboption to specify a probability, e.g. to make about 25% of letters uppercase and the rest lowercase?
A sixth probability suboption would also be good.
 
#20
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.
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.
 
May 29, 2008
529
3
Groton, CT
#21
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.
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
TextUtils v0.52.2

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

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,575
46
Albuquerque, NM
prospero.unm.edu
#23
Command line help for PASSWORD doesn't show "5 alternating" for case switch as listed in docs.
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.)