1
0

first commit

This commit is contained in:
Andrew W
2022-08-28 14:39:08 -05:00
commit 5a2894ed1b
33 changed files with 16552 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
[{"analyzerName":"intellisense-members-lstm-pylance","languageName":"python","identity":{"modelId":"E61945A9A512ED5E1A3EE3F1A2365B88F8FE","outputId":"E4E9EADA96734F01970E616FAB2FAC19","modifiedTimeUtc":"2020-08-11T14:06:50.811Z"},"filePath":"E61945A9A512ED5E1A3EE3F1A2365B88F8FE_E4E9EADA96734F01970E616FAB2FAC19","lastAccessTimeUtc":"2022-08-23T17:00:15.943Z"}]
+51
View File
@@ -0,0 +1,51 @@
import crypt
from hmac import compare_digest as compare_hash
import sys
passwordFileArg = sys.argv[1]
passwordList = sys.argv[2]
passwordHashLines = [ ]
hashesAndSalt = []
userIDs = [ ]
hashesFromFile = []
hashArr = []
index = 0
passwordFile = open(passwordFileArg)
passwordHashes = passwordFile.readlines()
for line in passwordHashes:
passwordHashLines.append(line)
passwordHashArr = passwordHashLines[index].split(":")
# Store salt + hashes, and hashes seperately as well
hash = passwordHashArr[1]
hashesAndSalt.append(hash)
passHash = hash.split("$")
userIDs.append(passwordHashArr[0])
hashArr.append(passHash[3])
# Use hashes
hashesFromFile.append(passwordHashArr[1])
index += 1
passwordFile.close()
index = 0
# Check hashes against passwords from file
passwordListFile = open(passwordList)
passwordList = passwordListFile.readlines()
# inner loop inside a loop over the password hashes
for hashedPassword in hashArr:
for password in passwordList:
# Compare hashes
cmpHash = crypt.crypt(password.rstrip().lstrip(), hashesAndSalt[index])
cmpHashPass = cmpHash.split("$")
cmpHashPass = cmpHashPass[3]
# print(cmpHashPass + " Password Hash: " + hashedPassword)
if compare_hash(cmpHashPass, hashedPassword):
print("Match found for userid " + userIDs[index] + ". Password = " + password)
break
else:
print("No match was found for " + userIDs[index] + ".")
index += 1
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+23
View File
@@ -0,0 +1,23 @@
import sys
import hashlib
passwordListFile = sys.argv[1]
passwords = [ ]
hashArr = []
hashDictonary = { }
index = 0
passwordFile = open(passwordListFile)
passwordList = passwordFile.readlines()
for password in passwordList:
passCleanEncoded = password.rstrip().lstrip().encode("utf_16_le")
hash = hashlib.new("md4")
hash.update(passCleanEncoded)
hashDictonary[hash.hexdigest()] = password
hashDictonarySorted = sorted(hashDictonary)
for hashEntry in hashDictonarySorted:
msg = hashEntry + ":" + hashDictonary[hashEntry]
print(msg.rstrip())
+3
View File
@@ -0,0 +1,3 @@
tommy:$6$HFQQdE2g$g0eyz6UN.c4Pg1tiQgdPPPXdQ1fEOwttCwzSah/Jo4RE9Eac4H7pgksaNLI/WSIyN8tNtCX4NaAq6Uwz.o.4W1:17400:0:99999:7:::
mathis:$6$niptplk1$.mMMVx4T375WhFkDN5RWEaD93HcmDCx3aBQrn2ZalbiRpl4FB2Rww/BeCPEfSYbegjPvoHM2llQmk/VBbSxWj.:17400:0:99999:7:::
tristan:$6$MWwusFJx$KCoO1wiWKtE.7j/7UiwD.1jXmOckMb5X4GGt1DotLS0laXdFga5n3wGfu43FC/Opxki7mY6Yf9XT.cBGN.pkp0:17400:0:99999:7:::
View File