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 details)

Uploaded Egg

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

Uploaded Python 3

File details

Details for the file readpw-1.0.0-py3.6.egg.

File metadata

  • Download URL: readpw-1.0.0-py3.6.egg
  • Upload date:
  • Size: 6.9 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for readpw-1.0.0-py3.6.egg
Algorithm Hash digest
SHA256 75c9101c81959483f0cd5791211175ac758928a63fceb07ceda22f4604bdc852
MD5 aadb77ca49daea82983fee77e81d6a75
BLAKE2b-256 f9f30c3e75d7babf085966378e8226b7b29714193031ffd4089fd57113c416ad

See more details on using hashes here.

File details

Details for the file readpw-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for readpw-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b93599f57d04ac5f7ba1e0f45a981d6c41787c3d82c1a989f1fba71295564625
MD5 9fc4879542033857ba0ff981810a9502
BLAKE2b-256 a7c39fc178f8dcfdfa2ff9a7d95bca35b405a98f401d15d0b935232a967d1a75

See more details on using hashes here.

Supported by

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