import winreg
try:
access_registry = winreg.ConnectRegistry(None, winreg.HKEY_CURRENT_USER)
access_key = winreg.OpenKey(access_registry, r"Software\\JavaSoft\\Prefs\\jetbrains")
except OSError:
print("не удается найти раздел")
if 'access_key' in locals():
list_keys_reg = []
i = 0
while True:
try:
x = winreg.EnumKey(access_key, i)
list_keys_reg.append(x)
print(list_keys_reg)
i += 1
except OSError:
break
import itertools
sCharacters = "abcdefghijklmnopqrstuvwxyz0123456789"
def brute_pass():
for aCombination in itertools.product(sCharacters, repeat=iCombinationLength):
guess_password = ''.join(aCombination)
print(''.join(aCombination))
if (guess_password == "124"):
print("Your password is : " + "".join(guess_password))
return False
for iCombinationLength in range(1, 4+1):
if brute_pass() ==False:
break