script.src
Forcer = {}
Forcer.init = function(passwords = [], options = {"verbose": false})
self.passwords = passwords
self.verbose = options.verbose
end function
Forcer.brute_force = function()
count = 0
pass_len = self.passwords.len
for pass in self.passwords
count = count + 1
shell = get_shell("root", pass)
if shell then
if self.verbose then print("password is: "+pass)
self.password = pass
self.shell = shell
return
else
if self.verbose then print(count+" out of "+pass_len+" not "+pass)
self.password = null
self.shell = null
end if
end for
end function
pass_path = user_input("password db path: ")
blocks = get_shell.host_computer.File(pass_path + "/blocks")
raw_data = ""
for f in blocks.get_files
raw_data = raw_data + f.get_content
end for
Forcer.init(raw_data.split(char(10)), {"verbose": false})
Forcer.brute_force
print "the root password is " + Forcer.password