12-16-2020, 01:20 PM
(This post was last modified: 12-16-2020, 01:20 PM by defaultusername.)
Hi everybody!
I have a python script that outputs password candidates in batches, similar to this:
When writing the output to a file
the out.txt file is created immediately and continuously written into until the script finishes.
I want to pipe the output directly into hashcat:
However hashcat starts and then idles until generate.py has completed. Outfile out.txt only gets created after the python script has run completely.
Compare to princeprocessor:
creates out.txt before princeprocessor has finished and continuously writes into out.txt.
How do I make my python script feed into hashcat continuously?
I already tried
which did not help.
I have a python script that outputs password candidates in batches, similar to this:
Code:
import time
for i in range(10):
for j in range(10):
print(str(i)+str(j))
time.sleep(1)
When writing the output to a file
Code:
python generate.py > out.txt
I want to pipe the output directly into hashcat:
Code:
python generate.py | hashcat -a 0 --stdout --outfile out.txt
However hashcat starts and then idles until generate.py has completed. Outfile out.txt only gets created after the python script has run completely.
Compare to princeprocessor:
Code:
./pp64.bin input.txt | hashcat -a 0 --stdout --outfile out.txt
How do I make my python script feed into hashcat continuously?
I already tried
Code:
import time
import sys
for i in range(10):
for j in range(10):
print(str(i)+str(j))
sys.stdout.flush()
time.sleep(1)
which did not help.