Cannot commuincate with oclHashcat process
#1
Hello everyone,

I am trying to run oclHashcat as a subprocess in Python. I can start it up just fine, but I cannot pass the usual commands ([s]tatus, [q]uit, etc) by simply writing that character to STDIN.

Code:
import time import shlex from subprocess import Popen, PIPE command = "\"cudaHashcat64.exe\" --quiet -m 0 -a 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" proc = Popen(shlex.split(command), stdout=PIPE, stdin=PIPE, stderr=PIPE) time.sleep(1) proc.stdin.write("s") time.sleep(1) for line in iter(proc.stdout.readline, b''): if line: if line != "\r\n" and line != "\n": print(line) proc.stdout.flush() else: break proc.terminate()

I should be getting a status response (that will be shown if I remove "--quiet"), but I want to be able to send commands to it. Is oclHashcat not using STDIN and/or only expecting a single character?

I have been googling this for some time, found others that have had a similar issue, and can't view the source to figure it out myself, I would really appreciate any feedback you may have.

Thank you in advanced for any help or ideas!


Messages In This Thread
Cannot commuincate with oclHashcat process - by ubtks - 02-14-2015, 06:06 AM