Giter Club home page Giter Club logo

pwnycorral's Introduction

Pwny Corral

Pwny Corral is a Python script that queries the haveibeenpwned.com API in order to determine whether or not an account has been compromised. Unlike many other scripts that perform this same function though, this script stores results. The intention being to allow companies/organizations to identify trends in common sources of compromised accounts that may allow proactive measures to be taken before their security posture is greatly affected.

Getting Started

Install TinyDB: TinyDB is used to store the JSON returned from the haveibeenpwned response. Before strorage, Pwny Corral modifies each JSON response by adding the compromised email address to each response.

pip install tinydb

Install TermGraph: Termgraph is used to graph the sites that have been breached along with the number of compromised accounts that exist in each.

pip3 install termgraph

Install Requests: Requests allows the haveibeenpwned.com API request to take place.

pip install requests

Using Pwny Corral

Add account to database: This will query haveibeenpwned for a single email address. If the email address is found to be compromised, the email address will be added to the JSON response and the response will be recorded to TinyDB.

# python pwnycorral.py -a [email address]

Description of particular breach: Command will query TinyDB for the description of a particular data breach. Currently, the data breach name is case-sensitive. For a listing of all current data breaches within TinyDB, try running Pwny Corral with the -s flag.


# python pwnycorral.py -b [name of breach site]

Remove account from database: This command will remove an email address and it's associated data from TinyDB.


# python pwnycorral.py -r [email address]

Display number of accounts in database: Display a count of accounts currently in your TinyDB.


# python pwnycorral.py -c

Display number of pwned websites in database: Display a listing of breached websites that have been loaded into your TinyDB. Useful if trying to find details of a particular breach using the -b flag.


# python pwnycorral.py -s

Bulk add email accounts: Perform a bulk query against haveibeenpwned. The supplied file should contain one email address per line. The JSON response from haveibeenpwned will be updated to include the compromised email address and loaded into your TinyDB.


# python pwnycorral.py -f [FILENAME]

List accounts in database: Displays a listing of all pwned accounts within your TinyDB.

# python pwnycorral.py -l

Determine if account is in database: Command will check if email address currently exists within your TinyDB. Currently, email address is case sensitive.


# python pwnycorral.py -e [email address]

Show details of specific account: Command will query TinyDB and show all breaches this account has been a part of.


# python pwnycorral.py -d [email address]

Display description of compromised site: Adding the -v flag to the "add account" command will display the compromised account details.


# python pwnycorral.py -a [email address] -v

Create graph: Graph breached sites and the number of accounts that are a part of each breach.


# python pwnycorral.py -g

Additional Information

For additional information, please see PwnyCorral-Instructions.pdf.

Authors

Brad Dial

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.