MCPcopy Create free account
hub / github.com/fortra/impacket / SetUserAccountControl

Method SetUserAccountControl

examples/net.py:233–243  ·  view source on GitHub ↗
(self, name, action)

Source from the content-addressed store, hash-verified

231 samr.hSamrSetInformationUser2(self._dce, user_handle, buffer)
232
233 def SetUserAccountControl(self, name, action):
234 info = self.Query(name)
235 domain_handle = self._open_domain()
236 try:
237 user_handle = self._get_user_handle(domain_handle, name)
238 if action == 'enable':
239 self._hEnableAccount(user_handle)
240 else:
241 self._hDisableAccount(user_handle)
242 finally:
243 self._close_domain()
244
245
246

Callers 1

runMethod · 0.80

Calls 6

QueryMethod · 0.95
_hEnableAccountMethod · 0.95
_hDisableAccountMethod · 0.95
_open_domainMethod · 0.80
_get_user_handleMethod · 0.80
_close_domainMethod · 0.80

Tested by

no test coverage detected