Coder Social home page Coder Social logo

edoardottt / pwdsafety Goto Github PK

View Code? Open in Web Editor NEW
61.0 5.0 13.0 39.42 MB

๐Ÿ”’command line tool checking password safety๐Ÿ”’

Home Page: https://edoardoottavianelli.it

License: GNU General Public License v3.0

Go 95.55% Makefile 2.02% Batchfile 2.43%
golang password pwd pwdhash password-strength safety security password-safety golang-application pwd-safety

pwdsafety's Introduction


Command line tool that checks how much a password is safe
Coded with ๐Ÿ’™ by edoardottt.

Mainteinance yes pr-welcome ask me anything go-report-card
workflows ubuntu-build license-GPL3

Get Started โ€ข Description โ€ข Scoring โ€ข Contributing โ€ข Changelog

This tool doesn't store any information!
Never use personal information in your password!

  • Use a password manager (I recommend bitwarden)
  • Don't use the same password for different services
  • Enable 2FA wherever possible

Get Started ๐ŸŽ‰

Snap

sudo snap install pwdsafety

Go1.17+

go install -v github.com/edoardottt/pwdsafety@latest

From source

  • First of all, clone the repo locally

    • git clone https://github.com/edoardottt/pwdsafety.git
  • pwdsafety has external dependencies, so they need to be pulled in:

    • cd pwdsafety/cmd && go get && cd ..
  • Linux (Requires high perms, run with sudo)

    • make linux (to install)

    • make unlinux (to uninstall)

  • Windows (executable works only in pwdsafety folder. Alias?)

    • make windows (to install)

    • make unwindows (to uninstall)

Description ๐Ÿ”ฆ

It reads from standard input the entered password.
First, it searches if the password or the password reversed is a well known pwd.
Then, just do little calculations, checking if the basic rules are respected, like if there are UPPERCASE CHARS, lowercase chars, numb3rs and symbols.
It stores the length of the password and the ratio [unique different chars / total chars].
It calculates then the entropy of a password.
Password entropy is a measurement of how unpredictable a password is.
The formula for entropy is:
formula

Where:

  • E = password entropy
  • R = pool of unique characters
  • L = number of characters in your password
  • Then R^L = the number of possible passwords

When the score <= 68(reasonable) it generates a random password.

Scoring ๐Ÿ’ฏ

Max score: 100

Scores:

  • Very weak: 0 - 35
  • Weak: 36 - 59
  • Reasonable: 60 - 68
  • Strong: 69 - 80
  • Very strong: 81 -100

Scoring parameters:

  • Found in known password
  • Found in known password reversed
  • Password composition:
    • numbers
    • symbols
    • uppercase
    • lowercase
  • Unique different characters
  • Length
  • Entropy

Contributing ๐Ÿ› 

Just open an issue / pull request.

Before opening a pull request, download golangci-lint and run

golangci-lint run

If there aren't errors, go ahead :)

See also CONTRIBUTING.md and CODE OF CONDUCT.md

Thanks to fabaff and ecnepsnai.

Changelog ๐Ÿ“Œ

Detailed changes for each release are documented in the release notes.

License ๐Ÿ“

This repository is under GNU General Public License v3.0.
edoardoottavianelli.it to contact me.

pwdsafety's People

Contributors

dependabot[bot] avatar edoardottt avatar fabaff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pwdsafety's Issues

Symbols Error

When I read the symbols, my program doesn't read well the symbols...

You can find a better explanation of what i trying to say running go test -v
So, in the tests I use 10 characters, but the result's length is 11.

The issue is in Utils/Basic-rules.go/GenerateSetString()

Remove engWordsList.txt

There's no need to have a 50000+ english words in a f*cking txt file.
Just give random pwd with 40+ chars.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.