Here are the examples of the python api win32net.NetGroupGetUsers taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
3 Examples
3
Example 1
Project: pysecdump Source File: cache.py
def NetGroupGetUsers(self, server, name, level):
keepgoing = 1
resume = 0
members = []
while keepgoing:
try:
m, total, resume = win32net.NetGroupGetUsers(server, name, level, resume, win32netcon.MAX_PREFERRED_LENGTH)
except:
return []
for member in m:
members.append(member)
if not resume:
keepgoing = 0
return members
3
Example 2
def __iter__(self):
"""Yield the list of members of this group.
:returns: yield a :class:`Principal` or subclass corresponding to each member
of this group
"""
resume = 0
while True:
members, total, resume = wrapped(win32net.NetGroupGetUsers, self.system, self.name, 1, resume)
for member in members:
yield principal(member['name'])
if resume == 0: break
3
Example 3
Project: LaZagne Source File: secretsdump.py
def __init__(self):
self.domain = '.' # current domain
self.logontype = win32con.LOGON32_LOGON_INTERACTIVE
self.provider = win32con.LOGON32_PROVIDER_WINNT50
IP = '127.0.0.1'
self.users = win32net.NetGroupGetUsers(IP,'none',0)[0]