| 1 | import time
|
|---|
| 2 |
|
|---|
| 3 | from pympler import asizeof
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 | start = time.process_time()
|
|---|
| 7 |
|
|---|
| 8 | with open("/dev/shm/piotrcki-wordlist-top10m.txt") as f:
|
|---|
| 9 | passwords = {x.strip() for x in f}
|
|---|
| 10 |
|
|---|
| 11 | print("Reading password list took:", time.process_time() - start)
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 | start = time.process_time()
|
|---|
| 15 |
|
|---|
| 16 | is_present = "asdfjkl:" in passwords
|
|---|
| 17 |
|
|---|
| 18 | print("Checking if password is in list took:", time.process_time() - start)
|
|---|
| 19 |
|
|---|
| 20 | print("Password is in list:", is_present)
|
|---|
| 21 |
|
|---|
| 22 | print("Size of passwords in MB:", asizeof.asizeof(passwords) / 1024**2)
|
|---|