Skip to main content

A project to read password leak files easily. More documentation in github page.

Project description

# Passwords
I have been working with password leaks for a while, and dealing with them is
not always fun due to multiple reasons. They are often large, takes a lot of time
to load in memory, and have mix of strings in different format, such as `UTF-8`,
`UTF-16`, `ASCII`. These make the files very annoying to process. The result is a
mess of error handling and memory management, instead of quickly compute the
statistics we want to compute.

I have to do it for living (at least for now), and so I decided to create this
little module to efficiently store and process the password leak files. This
library expects a clean password file, and it will not clean it for you. It
just makes life easy afterwards to process this file for other purposes. Not
sure how generic is the purpose, as I am the only one who is using it right now.
All feedbacks are very welcome.

Cleaned password-leak files can be downloaded from

## How to install?
* `numpy`
* `marisa_trie`

Download the `` file into your main code and it should work. Or, install via pip,
`pip install readpw`

## How to use?
In [1]: from readpw import Passwords

In [2]: ry = Passwords('/home/rahul/passwords/rockyou-withcount.txt.bz2')

In [3]: for id_, pw, f in ry.iterpws(10):
...: print id_, pw, f
3121838 123456 290729.0
919221 12345 79076.0
12769146 123456789 76789.0
11327966 password 59462.0
11789229 iloveyou 49952.0
11389450 princess 33291.0
6851250 1234567 21725.0
8034161 rockyou 20901.0
10680580 12345678 20553.0
2902439 abc123 16648.0

In [5]: ry.sumvalues(10) # sums the frequency of most frequent 10 passwords.
Out[5]: 669126.0

In [6]: list(ry.sample_pws(10))


Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for readpw, version 1.0.0
Filename, size & hash File type Python version Upload date
readpw-1.0.0-py3.6.egg (6.9 kB) View hashes Egg 3.6
readpw-1.0.0-py3-none-any.whl (9.0 kB) View hashes Wheel 3.6

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page