-2

To use a wordlist (large one "16 Gb") to crack a password issue i've downliaded a file in .lst form from: https://crackstation.net/buy-crackstation-wordlist-password-cracking-dictionary.htm

So when i try to readlines() the file to split lines it only read a 69100 line even the worlist contain more than a billion line.

ex:

passwordlist = str(raw_input("\nEnter the path name of the password list file : "))
list = open(passwordlist, "r")
passwords = list.readlines()
list.close()
for password in  passwords:
        attack(password.replace("\n",""))

i need to split the file into txt pieces using python whithout reading lines such as spliting a video or an audio.

anything could help please.

NINO Cikoo
  • 84
  • 1
  • 9
  • 2
    @James, the tags `readlines` and `large-files` definitely seems relevant here. – pingul Apr 04 '17 at 12:39
  • im sorry, im new here. thanx for correcting my tags. – NINO Cikoo Apr 04 '17 at 12:42
  • i have found the answers of my question. http://stackoverflow.com/questions/16289859/splitting-large-text-file-into-smaller-text-files-by-line-numbers-using-python – NINO Cikoo Apr 04 '17 at 13:27
  • Possible duplicate of [Splitting large text file into smaller text files by line numbers using Python](http://stackoverflow.com/questions/16289859/splitting-large-text-file-into-smaller-text-files-by-line-numbers-using-python) – pingul Apr 04 '17 at 13:45

1 Answers1

0

Have you tried read in a loop? read(size) or readline() https://docs.python.org/3/tutorial/inputoutput.html#methods-of-file-objects

  • yes! thanx for trying to reminding. thats the code if you can help: https://justpaste.it/edit/15414193/a5a3d8c5 – NINO Cikoo Apr 04 '17 at 12:53
  • 1
    The problem is the 'password' variable. Instead of list.readlines() loop over the file object with readlines() and check the current line. (Or use read(size) for chuncks of data.) – Dóra Szendrei Apr 04 '17 at 12:59
  • I've already tried this: https://justpaste.it/edit/15414472/f0e084a6 and when i print chuncks it keep repeating the first chunk. – NINO Cikoo Apr 04 '17 at 13:12
  • Actualy readlines could read more than 69100 line cause ive tried it with another wordlist and it have read more than a million line but in this wordlist it stop when it reach 69100 line no more even that the wordlist contain more than a billion line. – NINO Cikoo Apr 04 '17 at 13:19