Files

forcer.src
  • Forcer = {}
  • Forcer.init = function()
  • Forcer.init = function(options = {})
  • self.passwords = []
  • self.cache_folder_path = home_dir + "/Config/decypherTable"
  • 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.split("=")[1])
  • 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
  • Forcer.init({"table_path": params[0]})
  • Forcer.brute_force
forcer2.src
  • Forcer = {}
  • Forcer.init = function()
  • self.passwords = []
  • self.cache_folder_path = home_dir + "/Config/decypherTable"
  • 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.split("=")[1])
  • end for
  • end if
  • end for
  • end function
  • Forcer.brute_force = function(func)
  • count = 0
  • pass_len = self.passwords.len
  • for pass in self.passwords
  • count = count + 1
  • result = func(pass)
  • if result == true then return
  • end for
  • end function
  • help = "Usage: forcer --wifi or --shell"
  • if params.len == 0 or params[0] == "-h" or params[0] == "--help" then exit(help)
  • if params[0] == "--wifi" then
  • computer = get_shell.host_computer
  • devices = computer.network_devices
  • networks = computer.wifi_networks(devices)
  • print(networks.join("\n"))
  • index = user_input("index: ", false)
  • print(networks)
  • Forcer.init
  • network = networks[index.to_int]
  • //for network in networks
  • network = network.split(" ")
  • device = devices.split(" ")[0]
  • bssid = network[0]
  • essid = network[2]
  • get_wifi = function(password)
  • status = computer.connect_wifi(device, bssid, essid, password)
  • print(bssid + " " + essid + " " + password)
  • if typeof(status) == "number" then
  • print(essid + " password is: " + password)
  • return true
  • end if
  • end function
  • Forcer.brute_force(@get_wifi)
  • //end for
  • end if
  • if params[0] == "--shell" then
  • Forcer.init
  • get_root = function(password)
  • shell = get_shell("root", password)
  • if shell then
  • print("root password is: " + password)
  • return true
  • end if
  • end function
  • Forcer.brute_force(@get_root)
  • end if