misc/password_profiler
This commit is contained in:
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env python3
|
||||
import hashlib
|
||||
|
||||
HASH_FILE = "hash.txt"
|
||||
WORDLIST_FILE = "passwords.txt" # wordlist that was generated using CUPP
|
||||
|
||||
def load_hash():
|
||||
with open(HASH_FILE, "r") as f:
|
||||
return f.read().strip()
|
||||
|
||||
def crack_password(target_hash):
|
||||
with open(WORDLIST_FILE, "r", encoding="utf-8", errors="ignore") as f:
|
||||
for password in f:
|
||||
password = password.strip()
|
||||
if hashlib.sha1(password.encode()).hexdigest() == target_hash:
|
||||
return password
|
||||
return None
|
||||
|
||||
if __name__ == "__main__":
|
||||
target_hash = load_hash()
|
||||
result = crack_password(target_hash)
|
||||
if result:
|
||||
print(f"Password found: picoCTF{{{result}}}")
|
||||
else:
|
||||
print("No match found.")
|
||||
@@ -0,0 +1 @@
|
||||
968c2349040273dd57dc4be7e238c5ac200ceac5
|
||||
Executable
+61
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -f cupp.py ]; then
|
||||
wget https://github.com/Mebus/cupp/raw/refs/heads/master/cupp.py
|
||||
fi
|
||||
|
||||
if [ ! -f cupp.cfg ]; then
|
||||
wget https://github.com/Mebus/cupp/raw/refs/heads/master/cupp.cfg
|
||||
fi
|
||||
|
||||
# NOTE: done interactively:
|
||||
# $ python cupp.py -i direnv nix impure
|
||||
# ___________
|
||||
# cupp.py! # Common
|
||||
# \ # User
|
||||
# \ ,__, # Passwords
|
||||
# \ (oo)____ # Profiler
|
||||
# (__) )\
|
||||
# ||--|| * [ Muris Kurgas | j0rgan@remote-exploit.org ]
|
||||
# [ Mebus | https://github.com/Mebus/]
|
||||
#
|
||||
#
|
||||
# [+] Insert the information about the victim to make a dictionary
|
||||
# [+] If you don't know all the info, just hit enter when asked! ;)
|
||||
#
|
||||
# > First Name: Alice
|
||||
# > Surname: Johnson
|
||||
# > Nickname: AJ
|
||||
# > Birthdate (DDMMYYYY): 15071990
|
||||
#
|
||||
#
|
||||
# > Partners) name: Bob
|
||||
# > Partners) nickname:
|
||||
# > Partners) birthdate (DDMMYYYY):
|
||||
#
|
||||
#
|
||||
# > Child's name: Charlie
|
||||
# > Child's nickname:
|
||||
# > Child's birthdate (DDMMYYYY):
|
||||
#
|
||||
#
|
||||
# > Pet's name:
|
||||
# > Company name:
|
||||
#
|
||||
#
|
||||
# > Do you want to add some key words about the victim? Y/[N]:
|
||||
# > Do you want to add special chars at the end of words? Y/[N]:
|
||||
# > Do you want to add some random numbers at the end of words? Y/[N]:
|
||||
# > Leet mode? (i.e. leet = 1337) Y/[N]:
|
||||
#
|
||||
# [+] Now making a dictionary...
|
||||
# [+] Sorting list and removing duplicates...
|
||||
# [+] Saving dictionary to alice.txt, counting 5180 words.
|
||||
# > Hyperspeed Print? (Y/n) :
|
||||
# [+] Now load your pistolero with alice.txt and shoot! Good luck!
|
||||
|
||||
if [ -f alice.txt ]; then
|
||||
mv alice.txt passwords.txt
|
||||
fi
|
||||
|
||||
./check_password.py
|
||||
@@ -0,0 +1,7 @@
|
||||
First Name: Alice
|
||||
Surname: Johnson
|
||||
Nickname: AJ
|
||||
Birthdate: 15-07-1990
|
||||
Partner's Name: Bob
|
||||
Child's Name: Charlie
|
||||
|
||||
Reference in New Issue
Block a user