Forcer = {}
Forcer.init = function(options = {})
self.passwords = []
self.cache_folder_path = options.table_path
self.cache_folder = get_shell.host_computer.File(self.cache_folder_path)
self.load_cache
end function
Forcer.load_cache = function()
print("loading cache")
for cache_file in self.cache_folder.get_files
cache_file_content = cache_file.get_content
if cache_file_content != "" then
lines = cache_file_content.split("\n")
for pass in lines
if pass.len == 0 then continue
self.passwords.push(pass)
end for
end if
end for
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
print("password is: "+pass)
shell.start_terminal
else
print(count+" out of "+pass_len+" not "+pass)
end if
end for
end function
Forcer.init({"table_path": params[0]})
Forcer.brute_force