
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Generate strong random passwords from CLI.
The usage is very simple, by default the command generate a password with 15[0] characters length, using letters, numbers and symnbols:
$ genpasswd
h8d=1Cs<;V}[Az/
You can see all options using:
$ genpasswd --help
Passwords types is a easy way to generate a specific format password, There are:
This list can be showed using
$ genpasswd --types
By default, genpasswd use complex, you can use custom combined with selected types, for example:
$ genpasswd -l 30 -t custom --numeric --symbols
:`:73(;%}6{=!;452?//~@$??7+1^=
This return a password generated with numbers and symbols, you can set specific chars to, and combine:
$ genpasswd -l 30 -t custom --chars abcDEF123
1c2bcF2baaab2EF2F31aDFD32Ec31a
$genpasswd -l 30 -t custom --chars abcDEF --numeric
ac29b9863210F57Dc87Fc922ba92aa
You can generate deterministic passwords based in thre variables; a phrasepass, a salt and an iterations number, the interations are set on 1000 by default, but the phrasepass and salt are requried.
This funcions allow you to generate strong passwords for services based on two (or three) memorizables seeds.
For example, if you can set a strong password to you email account, you can use the addres as phrasepass and a simple password as the salt, for example:
$ genpasswd -d -l 30
genpass: phrasepass: <- here you write you address (yourself@host.com)
genpass: salt: <- here your every day password (coldplay2012$)
fQz":Jib&7H,d}W6j+sA{)jnS~}u]3"
Ever you use a deterministic algorithm to generate a password (with this utility) the password will be identical. You can generate it whenever you need it. The internal algorithm used to generate the password is PBKDF2.
The advantage of using as phrasepass the account name, is that you can have a different password for each service.
For symetric binary key generation, there are a binary type, it works like a
simple random generator like dd if=/dev/random, but with the posibility of
generate a deterministic binary keys.
For example, if you need to generate a LUKS key, you need a 4096B binary blob. With DD it's:
$ dd if=/dev/random of=disk.key bs=1024 count=4
With genpasswd can be:
$ genpasswd -bl 4096 -o disk.key
Normally you need to backup this type of keys, but with the deterministic method, you can generate it with a password/salt schema and only remember it like a standar password.
$ genpasswd -dbl 4096 --100k -o disk.key
This generate a deterministic key with a 100,000 iterations.
$ sudo npm install genpasswd
$ git clone https://github.com/exos/genpasswd.git
$ npm install -d
$ npm install --save genpasswd
In your code:
var genPasswd = require('genpasswd');
var options = {
type: genPasswd.password.TYPE_COMPLEX,
passwordLength: 30
};
genPasswd.password.generate(options, function (err, password) {
// password is a string
});
You can see more details on the wiki
You can:
0- The 15 length password by default is because 15 chars is a better option (no best), based on stadistics makes for me
FAQs
Password generator
We found that genpasswd demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.