I have a wordlist generator
import itertools
s=[ [ 'T', 't'],
['E', 'e'],
['S', 's'],
['T', 't']
]
out = (itertools.product(*s))
for index, entry in enumerate(out):
result = ''.join(entry)
print(result)
textfile = open("wordlist.txt","a")
textfile.write(result)
textfile.write("\n")
textfile.close()
How can I check and print the size of the textfile (in GB or KB) that will be generated before saving the file? For example:
python test.py
You will need 20GB to generate wordlist.txt