Giter Site home page Giter Site logo

pwnchk's Introduction

pwnchk

This tool provides a very basic API on top of Have I Been Pwned's API. The full API specification is availble here to allow you to check to see if a given account and/or password has been compromised. Note you should not use this applicaiton. It is untested, likely insecure, and in no case should be relied upon for your security.

Requirements

This tool was created to adhere to the specific requirements for a take-home development evaluation. The requirements as given were:

  1. Create a client for this API https://haveibeenpwned.com/API/v2
    1. Terminal client, GUI, web, etc
  2. Add as much functionality as you would like
  3. Add some documentation on how we can use it
  4. (Required) Push your project to github
  5. (Required) Try not to use external open source tools/libraries other than basic HTTP clients, the less the better

Due to time constraints this application implements only a very small part of the overall API, with a rudimentary command line interface.

Building

This application is built using stack. To build the application install stack as per the documentation, and then run:

user@host$ stack build

Running

You can execute the application from within the source directory with stack exec:

user@host$ stack exec pwnchk -- <account|password> [args]

The application is modal, with the first positional argument determining the mode, and subsequent arguments being passed along to the mode. A full list of the modes and their arguments are available by using the help mode or, in any mode, passing in the --help flag:

user@host$ stack exec pwnchk -- help
user@host$ stack exec pwnchk -- account --help
user@host$ stack exec pwnchk -- password --help

The account mode

user@host$ stack exec pwnchk -- account [options] <account>

The account mode will display a list of breaches that an account was involved in. By default only the names of breaches are provided, but you may provide.

Options

  1. --verbose will display additional information about the account breaches
  2. --include-unverified will display unverified breaches in addition to verified breaches.

The password mode

user@host$ stack exec pwnchk -- password [options]

The password mode will let you know if a given password has been compromised. By default the application will prompt you to enter the password from the command line. You may pass the password in using the --hash or --unsafe-password flag, but note that both of these modes are less secure than the default mode of operation.

Options

  1. --hash=<sha1> do not prompt for the password, instead use the password hash provided. Note that while this is safer than --unsafe-password the password hash may still be vulnerable to compromise, so this option is less secure than the standard mode.
  2. --unsafe-password=<password> use the provided plaintext password. Note: this is unsafe for several reasons. Do not use this option for any passwords that you are actively using.

Future Work

pwnchk's People

Contributors

rebeccaskinner avatar

Stargazers

Reliq avatar Val Packett avatar

Watchers

 avatar James Cloos avatar  avatar

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.