Closed matlink closed 7 years ago
Tried something home-made:
import sys
import time
from pyhashcat import Hashcat
hc = Hashcat()
hc.hash = '8743b52063cd84097a65d1633f5c74f5'
hc.mask = '?d?d?d?d?d?d?d?d?d?d'
hc.quiet = True
hc.potfile_disable = True
hc.outfile = '/dev/null'
hc.workload_profile = 3
hc.attack_mode = 3
hc.hash_mode = 0
hc.benchmark = False
print '[+] Running benchmark ...'
if hc.hashcat_session_execute() >= 0:
ps = '-\\|/'
i = 0
while True:
i += 1
sys.stdout.write("%s\r" % ps[i%4])
sys.stdout.flush()
time.sleep(1)
if i == 5: break;
print(hc.status_get_hashes_msec_dev_benchmark(0))
print(hc.status_get_hashes_msec_dev_benchmark(1))
Works well, prints (per ms)
3096696.15181
4846983.19942
However, settings hc.benchmark = True
doubles the output, is that normal?
Looking for a better solution for benchmarking (i.e calling hashcat benchmark).
You know I haven't tried to benchmark yet. I'll have to dig into it more, but I agree this is something that should just work similar to how hashcat does.
So this is where your original error is coming from https://github.com/Rich5/pyHashcat/blob/6f5d565cf5b5c15e90efe564d6773bb20da2d8ce/pyhashcat/pyhashcat.c#L457
Which is an issue with my implementation. I need to account for calling benchmark as a special case.
Fixed. See test.py for simple example.
How is it possible to benchmark using pyHashcat? I tried with:
except that I got