本文整理汇总了Python中impacket.dcerpc.v5.drsuapi.DS_NT4_ACCOUNT_NAME_SANS_DOMAIN属性的典型用法代码示例。如果您正苦于以下问题:Python drsuapi.DS_NT4_ACCOUNT_NAME_SANS_DOMAIN属性的具体用法?Python drsuapi.DS_NT4_ACCOUNT_NAME_SANS_DOMAIN怎么用?Python drsuapi.DS_NT4_ACCOUNT_NAME_SANS_DOMAIN使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类impacket.dcerpc.v5.drsuapi
的用法示例。
在下文中一共展示了drsuapi.DS_NT4_ACCOUNT_NAME_SANS_DOMAIN属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_DRSCrackNames
# 需要导入模块: from impacket.dcerpc.v5 import drsuapi [as 别名]
# 或者: from impacket.dcerpc.v5.drsuapi import DS_NT4_ACCOUNT_NAME_SANS_DOMAIN [as 别名]
def test_DRSCrackNames(self):
dce, rpctransport, hDrs, DsaObjDest = self.connect()
request = drsuapi.DRSCrackNames()
request['hDrs'] = hDrs
request['dwInVersion'] = 1
request['pmsgIn']['tag'] = 1
request['pmsgIn']['V1']['CodePage'] = 0
request['pmsgIn']['V1']['LocaleId'] = 0
request['pmsgIn']['V1']['dwFlags'] = 0
request['pmsgIn']['V1']['formatOffered'] = drsuapi.DS_NT4_ACCOUNT_NAME_SANS_DOMAIN
request['pmsgIn']['V1']['formatDesired'] = drsuapi.DS_USER_PRINCIPAL_NAME_FOR_LOGON
request['pmsgIn']['V1']['cNames'] = 1
name = LPWSTR()
#name['Data'] = 'FREEFLY-DC\x00'
#name['Data'] = 'CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=FREEFLY,DC=NET\x00'
#name['Data'] = 'CN=FREEFLY-DC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=FREEFLY,DC=NET\x00'
name['Data'] = 'Administrator\x00'
request['pmsgIn']['V1']['rpNames'].append(name)
resp = dce.request(request)
resp.dump()
示例2: test_hDRSCrackNames
# 需要导入模块: from impacket.dcerpc.v5 import drsuapi [as 别名]
# 或者: from impacket.dcerpc.v5.drsuapi import DS_NT4_ACCOUNT_NAME_SANS_DOMAIN [as 别名]
def test_hDRSCrackNames(self):
dce, rpctransport, hDrs, DsaObjDest = self.connect()
name = 'Administrator'
formatOffered = drsuapi.DS_NT4_ACCOUNT_NAME_SANS_DOMAIN
formatDesired = drsuapi.DS_STRING_SID_NAME
resp = drsuapi.hDRSCrackNames(dce, hDrs, 0, formatOffered, formatDesired, (name,))
resp.dump()
name = 'CN=NTDS Settings,CN=FREEFLY-DC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=FREEFLY,DC=NET'
resp = drsuapi.hDRSCrackNames(dce, hDrs, 0, drsuapi.DS_NAME_FORMAT.DS_FQDN_1779_NAME, drsuapi.DS_NAME_FORMAT.DS_UNIQUE_ID_NAME, (name,))
resp.dump()
name = 'CN=NTDS Settings,CN=FREEFLY-DC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=FREEFLY,DC=NET'
resp = drsuapi.hDRSCrackNames(dce, hDrs, 0, drsuapi.DS_NAME_FORMAT.DS_FQDN_1779_NAME, drsuapi.DS_STRING_SID_NAME, (name,))
resp.dump()
name = 'FREEFLY.NET'
#name = ''
resp = drsuapi.hDRSCrackNames(dce, hDrs, 0, drsuapi.DS_LIST_ROLES, drsuapi.DS_NAME_FORMAT.DS_FQDN_1779_NAME, (name,))
resp.dump()
示例3: test_hDRSCrackNames
# 需要导入模块: from impacket.dcerpc.v5 import drsuapi [as 别名]
# 或者: from impacket.dcerpc.v5.drsuapi import DS_NT4_ACCOUNT_NAME_SANS_DOMAIN [as 别名]
def test_hDRSCrackNames(self):
dce, rpctransport, hDrs, DsaObjDest = self.connect()
name = 'Administrator'
formatOffered = drsuapi.DS_NT4_ACCOUNT_NAME_SANS_DOMAIN
formatDesired = drsuapi.DS_STRING_SID_NAME
resp = drsuapi.hDRSCrackNames(dce, hDrs, 0, formatOffered, formatDesired, (name,))
resp.dump()
name = 'CN=NTDS Settings,CN=DC1-WIN2012,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=%s,DC=%s' % (self.domain.split('.')[0],self.domain.split('.')[1])
resp = drsuapi.hDRSCrackNames(dce, hDrs, 0, drsuapi.DS_NAME_FORMAT.DS_FQDN_1779_NAME, drsuapi.DS_NAME_FORMAT.DS_UNIQUE_ID_NAME, (name,))
resp.dump()
name = 'CN=NTDS Settings,CN=DC1-WIN2012,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=%s,DC=%s' % (self.domain.split('.')[0],self.domain.split('.')[1])
resp = drsuapi.hDRSCrackNames(dce, hDrs, 0, drsuapi.DS_NAME_FORMAT.DS_FQDN_1779_NAME, drsuapi.DS_STRING_SID_NAME, (name,))
resp.dump()
name = self.domain.upper()
#name = ''
resp = drsuapi.hDRSCrackNames(dce, hDrs, 0, drsuapi.DS_LIST_ROLES, drsuapi.DS_NAME_FORMAT.DS_FQDN_1779_NAME, (name,))
resp.dump()