HTML/JavaScript

Wednesday, July 9, 2014

Password Generation with R

Submitted for your amusement. This script will generate ten passwords (N) of length 25. These are strong passwords. The program draws from numerals 0-9 and upper/lower case letters of the alphabet. Tune the parameters to your liking.

#!/usr/bin/Rscript --no-restore --quiet
#
length=25
N = 10
choices=c(0:9,letters,LETTERS)
for (n in 1:N) {
  pw = sample(choices,length,replace=TRUE)
  cat(pw,sep='',"\n")
}

This is a sample output. Don't use these passwords posted here, generate your own with your own copy of R. It only makes sense to use passwords like this if you're using a password manager such as LastPass or 1Password. You are using a password manager, right?

Er5Qu2KtAAmcyRVJ1IlAgR16O
vV8GtgPrf58U0Mo7SqPQ7YyGz
fIVSxjNsP46DOyDhrnW8OXxr4
1t9dF29UrZCHEvDi8Pd6REjXm
7H6hhxX2dSLebUbc5S1VaPBdu
1WlDWDaN2lrf5xPHHET41xvJR
ZNy8X3WFHCFe5YxFK4FJBoNt5
6MHmMnaScoxDfoApvNeugvuWx
VODxLoAF8M9KkTRVN2R12wOKJ
CdYuHafhTbcMEmG6GUsYZk9vl

No comments:

Post a Comment