01Forcer = {}
02
03Forcer.init = function(options = {})
04 self.passwords = []
05
06 self.cache_folder_path = options.table_path
07
08 self.cache_folder = get_shell.host_computer.File(self.cache_folder_path)
09
10 self.load_cache
11end function
12
13Forcer.load_cache = function()
14 print("loading cache")
15
16 for cache_file in self.cache_folder.get_files
17 cache_file_content = cache_file.get_content
18 if cache_file_content != "" then
19 lines = cache_file_content.split("\n")
20 for pass in lines
21 if pass.len == 0 then continue
22 self.passwords.push(pass)
23 end for
24 end if
25 end for
26end function
27
28Forcer.brute_force = function()
29 count = 0
30 pass_len = self.passwords.len
31 for pass in self.passwords
32 count = count + 1
33 shell = get_shell("root", pass)
34 if shell then
35 print("password is: "+pass)
36 shell.start_terminal
37 else
38 print(count+" out of "+pass_len+" not "+pass)
39 end if
40 end for
41end function
42
43
44Forcer.init({"table_path": params[0]})
45Forcer.brute_force
46
47