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 https://wiki.skullsecurity.org/Passwords.

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

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



## How to use?
```ipython
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))
Out[6]:
[u'lilmarvin09',
u'evan*love',
u'mylove',
u'mmmsss',
u'whudafxup?',
u'123456',
u'123456',
u'beautiful',
u'james123',
u'foodie123']


```

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

readpw-1.0.0-py3.6.egg (6.9 kB view hashes)

Uploaded Source

readpw-1.0.0-py3-none-any.whl (9.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page