Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.
/ phassh-validator Public archive

Password validator docker container with baked in SHA-512 hashing element written in Python.

License

Notifications You must be signed in to change notification settings

8times4/phassh-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phassh-validator

phassh-validator is password complexity validator with a password hashing element(SHA-512).

The current setting validates the following criterias before hashing the provided password:

At least 12 characters, including:

  • 1x special character,
  • 1x uppercase letter,
  • 1x lowercase letter,
  • 1x number,

must be used.

Usage

Docker:

docker run --rm -it 8times4/phassh-validator:latest

then enter your password twice, and you'll get your hash.

Example:

% docker run --rm -it 8times4/phassh-validator:latest
Insert Password: 
Repeat Password: 
Your SHA-512 password hash is: $6$sCTugqKLcd33Q5gK$daUWUfRD/qD/MyMValJ./pHhUYraDOWQxeoiAgjciLDwFKlAdBRuJJGGwQwdsntqz7IdbebTC5gAGYnUU9/bP0

Python:

python3 validator.py

then enter your password twice, and you'll get your hash.

Example:

% python3 validator.py                       
Insert Password: 
Repeat Password: 
Your SHA-512 password hash is: $6Ykwgs.yHIpQ

FYI

Your hash can look different based on your operating system, however it's still just as secure.

See here for more info.

ToDo:

Add some properly formatted zxcvbn output to validate complexity properly.

Why?

Simply running docker run --rm --entrypoint python3 python:3 -c 'import crypt; print(crypt.crypt("YOUR_PASSWORD", crypt.mksalt(crypt.METHOD_SHA512)))' is simply not sufficient if you'd also want to validate password length, plus why would you want to type this command out every time you don't have your notes?

This simplifies ssh password generations for the end user.

Main validation code, courtesy of this StackOverflow user.

About

Password validator docker container with baked in SHA-512 hashing element written in Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published