Library brute.lua allows specifying a number of retries for each credential guess with script argument brute.retries. The implemented counting is one off, so brute.retries=1 means that no retries are attempted and brute.retries=0 results in infinite looping.