def get_target(self): target = MSLDAPTarget(self.ldap_host, port=self.ldap_port, proto=self.ldap_proto.lower()) if self.proxy_scheme is not None: proxy = MSLDAPProxy() proxy.ip = self.proxy_ip proxy.port = self.proxy_port proxy.timeout = 10 proxy.proxy_type = self.proxy_scheme proxy.username = self.proxy_username proxy.domain = self.proxy_domain proxy.settings = self.proxy_settings target.proxy = proxy return target
def get_ldap_target(self, proxy=None, timeout=1): return MSLDAPTarget( self.hostname, #port = 389, #proto = LDAPProtocol.TCP, #tree = None, proxy=proxy, timeout=timeout, #ldap_query_page_size = 1000, #ldap_query_ratelimit = 0 )
def get_target(self): target = MSLDAPTarget( self.ldap_host, port = self.ldap_port, proto = self.ldap_scheme, tree=self.ldap_tree, timeout = self.target_timeout ) target.domain = self.domain target.dc_ip = self.dc_ip target.proxy = self.proxy target.serverip = self.serverip return target
def get_target(self): """ Creates a target object :return: Target object :rtype: :class:`MSLDAPTarget` """ target = MSLDAPTarget( self.ldap_host, port = self.ldap_port, proto = self.ldap_scheme, tree=self.ldap_tree, timeout = self.target_timeout ) target.domain = self.domain target.dc_ip = self.dc_ip target.proxy = self.proxy target.serverip = self.serverip return target
def get_target(self): """ Creates a target object :return: Target object :rtype: :class:`MSLDAPTarget` """ if self.target is not None: return copy.deepcopy(self.target) target = MSLDAPTarget( self.ldap_host, port = self.ldap_port, proto = self.ldap_scheme, tree=self.ldap_tree, timeout = self.target_timeout, ldap_query_page_size = self.target_pagesize, ldap_query_ratelimit = self.target_ratelimit ) target.domain = self.domain target.dc_ip = self.dc_ip target.proxy = self.proxy target.serverip = self.serverip return target