Skip to content

Commit

Permalink
Merge pull request #1 from MoraByte2027/Mora-Minor-0.2
Browse files Browse the repository at this point in the history
Update MemKey.py to 0.2
  • Loading branch information
Mora-Bytes authored Jul 7, 2023
2 parents a9019f2 + 8fe528b commit e05c271
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions MemKey.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
#MoraByte2027 - MemKey/0.2 (Windows nt 10; x64)

try:
import pyhibp, random
import string, os
import platform, sys
import hashlib
import hashlib, re

from pyhibp import pwnedpasswords as pw

size = 10
if len(sys.argv) >= 2:
size = int(sys.argv[1])+2
if size <= 2:
size = 6

time = 0

user = os.getlogin()
user = os.getlogin()
is_64bits = sys.maxsize > 2**32

if is_64bits: bit = 'x64'
Expand All @@ -22,17 +28,17 @@

Creator = """MoraByte2027"""

Ver = '0.1'
Ver = '0.2'

agent = "{0} - MemKey/{1} {2}".format(Creator, Ver, System)

print(agent)

pyhibp.set_user_agent(ua=agent)

paswrd = ''
paswrd = ''
password = ''
done = False
done = False

while not done:
for i in range(random.randint(3, 6)):
Expand All @@ -49,7 +55,14 @@
password = hex(int(hashlib.sha256(str(password).encode(), usedforsecurity=True).hexdigest(),16) + password)[2:size]

resp = pw.is_password_breached(password=password)
if not resp:
print("Password: {0}".format(password))
ok = not ((re.search(r"[a-z]", password) is None) or (re.search(r"\d", password) is None) or (len(password) <= 11))
if ok and not resp:
print("Password: {0} (Strong)".format(password))
done = True
elif not resp:
print("Password: {0} (Weak)".format(password))
done = True
else:
time += 1
if time >= 75: raise TimeoutError('Please up the Password Length.')
except KeyboardInterrupt: pass

0 comments on commit e05c271

Please sign in to comment.