All Things WinBatch > WinBatch

CLR: simple password generator

(1/1)

stanl:
takes password length and number of non-characters as parameters:

--- Code: Winbatch ---
;simple password generator with CLR
length = 10
nonchars = 3
ObjectClrOption('useany', 'System.Web')
oSecure = ObjectClrNew("System.Web.Security.Membership")
password = oSecure.GeneratePassword(length,nonchars)
Message("Password Created",password)
Exit


 

JTaylor:
Thanks.  Was just looking for something like this the other day.   

Jim

stanl:

--- Quote from: JTaylor on September 15, 2021, 06:20:52 am ---Thanks.  Was just looking for something like this the other day.   

Jim

--- End quote ---


You are welcome. See that this works well for sending out input passwords based on timer to receive a download.

Navigation

[0] Message Index

Go to full version