hashcat Forum

Full Version: Upper and Lower case on a known password
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I know the password I used and it contains Upper and lowercase letters as well as numbers. What i'd like to do is have hashcat randomly change the upper and lower of the letters only, so it will figure out my password correctly. I've tried using this rule that i've created (which is below) new to hashcat and not sure where to go, thanks in advance for the help here's an example of my password  O9ecvffF51&8djRjJo

rule I've created

u
l
(08-02-2023, 10:47 PM)marc1n Wrote: [ -> ]https://hashcat.net/wiki/doku.php?id=rule_based_attack

So the rule I created was correct?
No - please study that page in more detail.
(08-02-2023, 11:18 PM)royce Wrote: [ -> ]No - please study that page in more detail.

Ok, I will take another look @ it, thank you.
rules approach is okay, but you have to generate all possibilites for the whole length of your pass like this, i would do it like that first lower whole word then toggle specific index

l T0
l T1
l T2
...
until you reach your password length, but then you will need the next round aof rules for
l T0 T1
l T0 T2
...
and so on and so on, for sure you can utilize hahscat or maskprocessor to help you, but its still some work so

for a given string i made a simple python function which will output what you desire

Code:
import itertools
def lower_upper_permutationen_string(string):
    lower_upper = ((char.lower(), char.upper()) for char in string)
    tmp_list =[''.join(product) for product in itertools.product(*lower_upper)]
    result = sorted(list(set(tmp_list)))
    return result

print(lower_upper_permutationen_string('test'))
when runnnning this with string 'test' will result in list containg all possibilities of test upper/ lower, its 4^2 = 16 possibilities
Code:
['TEST', 'TESt', 'TEsT', 'TEst', 'TeST', 'TeSt', 'TesT', 'Test', 'tEST', 'tESt', 'tEsT', 'tEst', 'teST', 'teSt', 'tesT', 'test']

sadly there is no hashcat tool for this in hahscat utils like permute for this
(08-03-2023, 04:44 PM)Snoopy Wrote: [ -> ]rules approach is okay, but you have to genrate all possibilites for the whole length of your pass, i made a python function for this, for a given string 

Code:
def lower_upper_permutationen_string(string):
    lower_upper = ((char.lower(), char.upper()) for char in string)
    tmp_list =[''.join(product) for product in itertools.product(*lower_upper)]
    result = sorted(list(set(tmp_list)))
    return result

when runnnning this with string 'test' will result in all possibilities of test upper/ lower for test 4^2 = 16 possibilities
Code:
['TEST', 'TESt', 'TEsT', 'TEst', 'TeST', 'TeSt', 'TesT', 'Test', 'tEST', 'tESt', 'tEsT', 'tEst', 'teST', 'teSt', 'tesT', 'test']

Thanks snoopy!
(08-02-2023, 10:47 PM)marc1n Wrote: [ -> ]https://hashcat.net/wiki/doku.php?id=rule_based_attack

Thank you.