Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mtchavez/common-pw
Common password checker - probable word list
https://github.com/mtchavez/common-pw
password-checker password-safety password-strength password-validator
Last synced: 24 days ago
JSON representation
Common password checker - probable word list
- Host: GitHub
- URL: https://github.com/mtchavez/common-pw
- Owner: mtchavez
- License: other
- Created: 2017-07-06T05:18:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-09T23:40:24.000Z (over 7 years ago)
- Last Synced: 2024-06-20T14:24:32.481Z (7 months ago)
- Topics: password-checker, password-safety, password-strength, password-validator
- Language: Go
- Size: 364 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Common Password Checker
common-pw is a go packge implementing a JSON API endpoint to check if a password
is in the top X most commonly used. Data is used from [Probable Word List][pwl]## Usage
### Installing
Clone repo `git clone https://github.com/mtchavez/common-pw`
#### Large Datasets
Download the data from the [probable word list][pwl] repository and place
in the data directory. Currently `Top32Million-probable.txt` is not in version
control because of size.### Server
Run the server on port 3000 with `go run main.go`. The password filters will
build in the background and can take ~20 seconds to build. The time it took to
build will be logged out.### Checking Passwords
Use cURL or something similar to post to `/validate` with a JSON body:
```json
{
"password": "the password to check"
}
```**Examples:**
```
$ curl -s -XPOST -H "Content-Type: application/json" http://localhost:3000/validate --data '{"password": "iloveyou"}' | jq
{
"status": "OK",
"top196": "true",
"top3575": "true",
"top95k": "true"
}
```
---
```
$ curl -s -XPOST -H "Content-Type: application/json" http://localhost:3000/validate --data '{"password": "annabelle"}' | jq
{
"status": "OK",
"top196": "false",
"top3575": "true",
"top95k": "true"
}
```
---
```
$ curl -s -XPOST -H "Content-Type: application/json" http://localhost:3000/validate --data '{"password": "!@#$%^&*("}' | jq
{
"status": "OK",
"top196": "false",
"top3575": "false",
"top95k": "true"
}
```
---
```
$ curl -s -XPOST -H "Content-Type: application/json" http://localhost:3000/validate --data '{"password": "Portlandia"}' | jq
{
"status": "OK",
"top196": "false",
"top3575": "false",
"top95k": "false"
}
```
---
```
$ curl -s -XPOST -H "Content-Type: application/json" http://localhost:3000/validate --data '{"password": "Portlandia"}' | jq
{
"status": "OK",
"top196": "false",
"top32m": "true",
"top3575": "false",
"top95k": "false"
}
```
---
**A password is required**
```
$ curl -s -XPOST -H "Content-Type: application/json" http://localhost:3000/validate --data '{}' | jq
{
"error": "a password must be provided",
"status": "failed"
}
```[pwl]: https://github.com/berzerk0/Probable-Wordlists