def test_EnumDomains(samr, handle): """test the samr_EnumDomains interface""" print "Testing samr_EnumDomains" domains = toArray(samr.EnumDomains(handle, 0, -1)) print "Found %d domains" % len(domains) for idx, domain in domains: print "\t%s (%d)" % (display_lsa_string(domain), idx) for idx, domain in domains: print "Testing domain %s" % display_lsa_string(domain) sid = samr.LookupDomain(handle, domain) dom_handle = test_OpenDomain(samr, handle, sid) test_domain_ops(samr, dom_handle) samr.Close(dom_handle)
def test_LookupDomain(samr, handle, domain): """test the samr_LookupDomain interface""" print "Testing samr_LookupDomain" return samr.LookupDomain(handle, domain)