#!/bin/bash
gpuids=${1:-""}
timeout=${2:-"3600"}
temp_abort=${3:-"95"}

printf "2b576acbe6bcfda7294d6bd18041b8fe" > hashes.ntlm

device_arg=""
if [ -n "$gpuids" ]; then
	  device_arg="-d $gpuids"
fi

docker run --rm -it --runtime=nvidia -v "$PWD:/work" -w /work \
	  dizcza/docker-hashcat:cuda \
	    hashcat -m 1000 -a 3 hashes.ntlm '?1?1?1?1?1?1?1?1?1' -1 '?l?u?d' \
	      -D 2 $device_arg \
	        -w 4 --status --status-timer 5 \
		  -O --keep-guessing --runtime $timeout \
		    --hwmon-temp-abort=$temp_abort \
