hashcat Forum
Custom mask - brute force 12 length passwords with 1 capital letter, 1 number - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Support (https://hashcat.net/forum/forum-3.html)
+--- Forum: hashcat (https://hashcat.net/forum/forum-45.html)
+--- Thread: Custom mask - brute force 12 length passwords with 1 capital letter, 1 number (/thread-8576.html)



Custom mask - brute force 12 length passwords with 1 capital letter, 1 number - asters - 08-18-2019

I need to use brute force to crack the password. I know about the password that it has exactly 1 capital letter (A-Z), exacly 1 number (1-9) and exacly 10 lowercase letters (from a to z).

I have Python script that generates this type of passwords, but I don't know how to turn it into a hashcat mask.
Code:
import random

random.seed(None)

lowers = 'qwertyuiopasdfghjklzxcvbnm'
uppers = 'QWERTYUIOPASDFGHJKLZXCVBNM'
number = '0123456789'

length = 12

while True:
  uprspot = random.randint(0, length-1)
  numspot = uprspot

  while uprspot == numspot:
    numspot = random.randint(0, length-1)

  strgen = ""

  for i in range (0, length):

    if i == uprspot:
      strgen += random.choice(uppers)

    elif i == numspot:
      strgen += random.choice(number)

    else:
      strgen += random.choice(lowers)

  print(strgen)



RE: Custom mask - brute force 12 length passwords with 1 capital letter, 1 number - royce - 08-18-2019

There's no single mask. You have to generate a *list of masks*.

You can do this with policygen from the PACK toolkit.

https://security.stackexchange.com/questions/158956/bruteforce-with-hashcat-how-to-set-the-mask-properly


RE: Custom mask - brute force 12 length passwords with 1 capital letter, 1 number - Ar76 - 08-19-2019

Still going to take a long time.