homePW = #envar homePW myShell = get_shell("root", homePW) myComputer = myShell.host_computer crypto = include_lib("/lib/crypto.so") if not crypto then exit("
There is no crypto.so in you /lib\n
") g = get_custom_object passFile = user_input("Path to encrypted file: \n") fullString = myComputer.File(passFile).get_content lines = fullString.split(char(10)) userNames = [] hashes = [] passes = [] for line in lines line = line.trim if line == "" then continue parts = line.split(":") if parts.len < 2 then continue userNames.push(parts[0]) hashes.push(parts[1]) end for for entry in hashes if g.hashTable.hasIndex(hashes[entry]) then passes.push(hashes[entry]) continue end if passes.push(entry) 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 if not passes[indexOf(line)] then passes.indexOf(line) = "|no password found|" print(userNames[indexOf(line)] + " has the password " + passes[indexOf(line)]) end for