Giter Site home page Giter Site logo

hashcheck's Introduction

HashCheck

HashCheck is basically a simple fork of Troy Hunts Pwned Passwords Service. You can use it to test a users password against a dictionary file. The file itself is accessed via a binary search, so searching in Troys ordered 30Gig txt file works fine.

The Dictionary

Troys password files can be downloaded here: https://haveibeenpwned.com/Passwords V2 contains 500+ million leaked password hashes. Please make sure to download the ordered by hash version.

File Format: hash:value<whitespace-padding>

Installtion

Clone repository or Download Download the ordered password list npm install

Startup

FILE=./hashes.txt node app.js

Environment Variables

Parameter Description Default
FILE Path to the ordered hash database file ./pwned-passwords-ordered-2.0.txt
PORT Port for the API to listen on 3000
BUFFER_SIZE Size of an entry (default 63) 63

Webinterface

The webinterface uses the browsers webcrypto API to send the password SHA1 hashed to the backend. It displays a warning if the app is not delivered via https.

API

The API consists of a simple endpoint where you can post a SHA1-Hash for lookup:

Content-Type: application/json
Payload: {"hash":"40bd001563085fc35165329ea1ff5c5ecbdbbeef"}
Response
JSON
Not known: {"known":false}
Known: {"known":true,"count":"358"}

Run with docker

Build your image:

docker build -t hashcheck

Run the container, for example with:

docker run --rm -ti -p 8080:3000 -v /local/pwned-passwords-ordered-2.0.txt:/usr/src/hashcheck/pwned-passwords-ordered-2.0.txt:ro hashcheck

Note: The default path for the dictionary inside the container is /usr/src/hashcheck/. If you use this location for your volume mount, you don't have to specifiy the env FILE for the container.

Credits / Authors

hashcheck's People

Contributors

mvitz avatar echox avatar rstrangh avatar

Stargazers

 avatar Yann 'Ze' Richard avatar

Watchers

 avatar Oliver Wolf avatar  avatar Tobias Neef avatar Martin Eigenbrodt avatar James Cloos avatar Marc Jansing avatar Marc Giersch avatar  avatar  avatar

hashcheck's Issues

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.