':return: The result of running the payload using the most performant way
Basically, if I can run commands using exec() I\'ll use that, if
not I\'ll use read().'

def run_api(self, *args):

    available_syscalls = self.get_shell_syscalls()
    run_options = self.get_payload_implemented_methods()
    if (('execute' in run_options) and ('execute' in available_syscalls)):
        return self.api_execute(*args)
    elif (('is_open_port' in run_options) and ('is_open_port' in available_syscalls)):
        return self.api_is_open_port(*args)
    else:
        return self.api_read(*args)
