/
rnekrasov
/
Python
Обзор
Документация
Войти
/
rnekrasov
/
Python
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
numeric_password_cracker.py
29 строк
1 KB
Nitkarsh Chourasia
Update numeric_password_cracker.py
22 июл 2023, 03:00
Не верифицирован
22 июл 2023, 03:00
d790f90
Код
Авторство
О чём код?
import itertools def generate_password_permutations(length): # Generate numeric password permutations of the given length digits = "0123456789" for combination in itertools.product(digits, repeat=length): password = "".join(combination) yield password def password_cracker(target_password, max_length=8): # Try different password lengths and generate permutations for length in range(1, max_length + 1): password_generator = generate_password_permutations(length) for password in password_generator: if password == target_password: return password return None if __name__ == "__main__": # Target numeric password (change this to the password you want to crack) target_password = "9133278" # Try cracking the password cracked_password = password_cracker(target_password) if cracked_password: print(f"Password successfully cracked! The password is: {cracked_password}") else: print("Password not found. Try increasing the max_length or target a different password.")