trying something
This commit is contained in:
@@ -6,17 +6,12 @@ myComputer = myShell.host_computer
|
|||||||
crypto = include_lib("/lib/crypto.so")
|
crypto = include_lib("/lib/crypto.so")
|
||||||
if not crypto then exit("<center><color=red>There is no crypto.so in you /lib\n</color></center>")
|
if not crypto then exit("<center><color=red>There is no crypto.so in you /lib\n</color></center>")
|
||||||
|
|
||||||
|
g = get_custom_object
|
||||||
|
|
||||||
passFile = user_input("Path to encrypted file: \n")
|
passFile = user_input("Path to encrypted file: \n")
|
||||||
fullString = myComputer.File(passFile).get_content
|
fullString = myComputer.File(passFile).get_content
|
||||||
lines = fullString.split(char(10))
|
lines = fullString.split(char(10))
|
||||||
|
|
||||||
|
|
||||||
/* TODO
|
|
||||||
Fix logic to properly display name:pass combo
|
|
||||||
I think I'm deciphering too late
|
|
||||||
I think I should decipher first, then split
|
|
||||||
*/
|
|
||||||
|
|
||||||
userNames = []
|
userNames = []
|
||||||
hashes = []
|
hashes = []
|
||||||
passes = []
|
passes = []
|
||||||
@@ -25,15 +20,26 @@ for line in lines
|
|||||||
line = line.trim
|
line = line.trim
|
||||||
if line == "" then continue
|
if line == "" then continue
|
||||||
parts = line.split(":")
|
parts = line.split(":")
|
||||||
//if parts.len < 2 then continue
|
if parts.len < 2 then continue
|
||||||
userNames.push(parts[0])
|
userNames.push(parts[0])
|
||||||
hashes.push(parts[1])
|
hashes.push(parts[1])
|
||||||
end for
|
end for
|
||||||
|
|
||||||
for entry in hashes
|
for entry in hashes
|
||||||
passes.push(crypto.decipher(entry))
|
if g.hashTable.hasIndex(hashes[entry]) then
|
||||||
|
passes.push(hashes[entry])
|
||||||
|
continue
|
||||||
|
end if
|
||||||
|
passes.push(entry)
|
||||||
end for
|
end for
|
||||||
|
|
||||||
|
if passes.len > 0 then
|
||||||
|
for line in passes
|
||||||
|
passes.replace([line], crypto.decipher(line))
|
||||||
|
g.hashTable.push(passes[line])
|
||||||
|
end for
|
||||||
|
end if
|
||||||
|
|
||||||
for line in userNames
|
for line in userNames
|
||||||
if not passes[indexOf(line)] then passes.indexOf(line) = "|no password found|"
|
if not passes[indexOf(line)] then passes.indexOf(line) = "|no password found|"
|
||||||
print(userNames[indexOf(line)] + " has the password " + passes[indexOf(line)])
|
print(userNames[indexOf(line)] + " has the password " + passes[indexOf(line)])
|
||||||
|
|||||||
Reference in New Issue
Block a user