当前位置: 首页>>代码示例>>Python>>正文


Python nt_errors.STATUS_MORE_ENTRIES属性代码示例

本文整理汇总了Python中impacket.nt_errors.STATUS_MORE_ENTRIES属性的典型用法代码示例。如果您正苦于以下问题:Python nt_errors.STATUS_MORE_ENTRIES属性的具体用法?Python nt_errors.STATUS_MORE_ENTRIES怎么用?Python nt_errors.STATUS_MORE_ENTRIES使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在impacket.nt_errors的用法示例。


在下文中一共展示了nt_errors.STATUS_MORE_ENTRIES属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_SamrEnumerateGroupsInDomain

# 需要导入模块: from impacket import nt_errors [as 别名]
# 或者: from impacket.nt_errors import STATUS_MORE_ENTRIES [as 别名]
def test_SamrEnumerateGroupsInDomain(self):
        dce, rpctransport, domainHandle  = self.connect()
        request = samr.SamrEnumerateGroupsInDomain()
        request['DomainHandle'] = domainHandle
        request['EnumerationContext'] =  0
        request['PreferedMaximumLength'] = 500
        status = nt_errors.STATUS_MORE_ENTRIES
        while status == nt_errors.STATUS_MORE_ENTRIES:
            try:
                resp4 = dce.request(request)
            except Exception, e:
                if str(e).find('STATUS_MORE_ENTRIES') < 0:
                    raise 
                resp4 = e.get_packet()
            resp4['Buffer'].dump()
            request['EnumerationContext'] = resp4['EnumerationContext'] 
            status = resp4['ErrorCode'] 
开发者ID:joxeankoret,项目名称:CVE-2017-7494,代码行数:19,代码来源:test_samr.py

示例2: test_SamrEnumerateAliasesInDomain

# 需要导入模块: from impacket import nt_errors [as 别名]
# 或者: from impacket.nt_errors import STATUS_MORE_ENTRIES [as 别名]
def test_SamrEnumerateAliasesInDomain(self):
        dce, rpctransport, domainHandle  = self.connect()
        request = samr.SamrEnumerateAliasesInDomain()
        request['DomainHandle'] = domainHandle
        request['EnumerationContext'] =  0
        request['PreferedMaximumLength'] = 500
        status = nt_errors.STATUS_MORE_ENTRIES
        while status == nt_errors.STATUS_MORE_ENTRIES:
            try:
                resp4 = dce.request(request)
            except Exception, e:
                if str(e).find('STATUS_MORE_ENTRIES') < 0:
                    raise 
                resp4 = e.get_packet()
            resp4['Buffer'].dump()
            request['EnumerationContext'] = resp4['EnumerationContext'] 
            status = resp4['ErrorCode'] 
开发者ID:joxeankoret,项目名称:CVE-2017-7494,代码行数:19,代码来源:test_samr.py

示例3: test_SamrEnumerateUsersInDomain

# 需要导入模块: from impacket import nt_errors [as 别名]
# 或者: from impacket.nt_errors import STATUS_MORE_ENTRIES [as 别名]
def test_SamrEnumerateUsersInDomain(self):
        dce, rpctransport, domainHandle  = self.connect()
        request = samr.SamrEnumerateUsersInDomain()
        request['DomainHandle'] = domainHandle
        request['UserAccountControl'] =  samr.USER_NORMAL_ACCOUNT
        request['EnumerationContext'] =  0
        request['PreferedMaximumLength'] = 8192
        status = nt_errors.STATUS_MORE_ENTRIES
        while status == nt_errors.STATUS_MORE_ENTRIES:
            try:
                resp4 = dce.request(request)
            except Exception, e:
                if str(e).find('STATUS_MORE_ENTRIES') < 0:
                    raise 
                resp4 = e.get_packet()
            resp4['Buffer'].dump()
            request['EnumerationContext'] = resp4['EnumerationContext'] 
            status = resp4['ErrorCode'] 
开发者ID:joxeankoret,项目名称:CVE-2017-7494,代码行数:20,代码来源:test_samr.py

示例4: test_SamrQueryDisplayInformation3

# 需要导入模块: from impacket import nt_errors [as 别名]
# 或者: from impacket.nt_errors import STATUS_MORE_ENTRIES [as 别名]
def test_SamrQueryDisplayInformation3(self):
        dce, rpctransport, domainHandle  = self.connect()
        request = samr.SamrQueryDisplayInformation3()
        request['DomainHandle'] = domainHandle
        request['DisplayInformationClass'] = samr.DOMAIN_DISPLAY_INFORMATION.DomainDisplayUser
        request['Index'] = 0
        request['EntryCount'] = 100
        request['PreferredMaximumLength'] = 8192
        #request.dump()
        try:
            resp = dce.request(request)
            resp.dump()
        except Exception, e:
            if str(e).find('STATUS_MORE_ENTRIES') >=0:
                e.get_packet().dump()
            else:
                raise 
开发者ID:joxeankoret,项目名称:CVE-2017-7494,代码行数:19,代码来源:test_samr.py

示例5: test_SamrQueryDisplayInformation

# 需要导入模块: from impacket import nt_errors [as 别名]
# 或者: from impacket.nt_errors import STATUS_MORE_ENTRIES [as 别名]
def test_SamrQueryDisplayInformation(self):
        dce, rpctransport, domainHandle  = self.connect()
        request = samr.SamrQueryDisplayInformation()
        request['DomainHandle'] = domainHandle
        request['DisplayInformationClass'] = samr.DOMAIN_DISPLAY_INFORMATION.DomainDisplayUser
        request['Index'] = 0
        request['EntryCount'] = 100
        request['PreferredMaximumLength'] = 8192
        #request.dump()
        try:
            resp = dce.request(request)
            resp.dump()
        except Exception, e:
            if str(e).find('STATUS_MORE_ENTRIES') >=0:
                e.get_packet().dump()
            else:
                raise 
开发者ID:joxeankoret,项目名称:CVE-2017-7494,代码行数:19,代码来源:test_samr.py

示例6: test_SamrQueryInformationAlias_SamrSetInformationAlias

# 需要导入模块: from impacket import nt_errors [as 别名]
# 或者: from impacket.nt_errors import STATUS_MORE_ENTRIES [as 别名]
def test_SamrQueryInformationAlias_SamrSetInformationAlias(self):
        dce, rpctransport, domainHandle  = self.connect()
        request = samr.SamrEnumerateAliasesInDomain()
        request['DomainHandle'] = domainHandle
        request['EnumerationContext'] =  0
        request['PreferedMaximumLength'] = 500
        status = nt_errors.STATUS_MORE_ENTRIES
        while status == nt_errors.STATUS_MORE_ENTRIES:
            try:
                resp4 = dce.request(request)
            except Exception, e:
                if str(e).find('STATUS_MORE_ENTRIES') < 0:
                    raise 
                resp4 = e.get_packet()
            resp4['Buffer'].dump()
            request['EnumerationContext'] = resp4['EnumerationContext'] 
            status = resp4['ErrorCode'] 
开发者ID:joxeankoret,项目名称:CVE-2017-7494,代码行数:19,代码来源:test_samr.py

示例7: test_SamrGetMembersInAlias

# 需要导入模块: from impacket import nt_errors [as 别名]
# 或者: from impacket.nt_errors import STATUS_MORE_ENTRIES [as 别名]
def test_SamrGetMembersInAlias(self):
        dce, rpctransport, domainHandle  = self.connect()
        request = samr.SamrEnumerateAliasesInDomain()
        request['DomainHandle'] = domainHandle
        request['EnumerationContext'] =  0
        request['PreferedMaximumLength'] = 500
        status = nt_errors.STATUS_MORE_ENTRIES
        while status == nt_errors.STATUS_MORE_ENTRIES:
            try:
                resp4 = dce.request(request)
            except Exception, e:
                if str(e).find('STATUS_MORE_ENTRIES') < 0:
                    raise 
                resp4 = e.get_packet()
            resp4['Buffer'].dump()
            request['EnumerationContext'] = resp4['EnumerationContext'] 
            status = resp4['ErrorCode'] 
开发者ID:joxeankoret,项目名称:CVE-2017-7494,代码行数:19,代码来源:test_samr.py

示例8: test_hSamrGetMembersInAlias

# 需要导入模块: from impacket import nt_errors [as 别名]
# 或者: from impacket.nt_errors import STATUS_MORE_ENTRIES [as 别名]
def test_hSamrGetMembersInAlias(self):
        dce, rpctransport, domainHandle  = self.connect()
        request = samr.SamrEnumerateAliasesInDomain()
        request['DomainHandle'] = domainHandle
        request['EnumerationContext'] =  0
        request['PreferedMaximumLength'] = 500
        status = nt_errors.STATUS_MORE_ENTRIES
        while status == nt_errors.STATUS_MORE_ENTRIES:
            try:
                resp4 = dce.request(request)
            except Exception, e:
                if str(e).find('STATUS_MORE_ENTRIES') < 0:
                    raise 
                resp4 = e.get_packet()
            resp4['Buffer'].dump()
            request['EnumerationContext'] = resp4['EnumerationContext'] 
            status = resp4['ErrorCode'] 
开发者ID:eth0izzle,项目名称:cracke-dit,代码行数:19,代码来源:test_samr.py

示例9: enumerate_domain_groups

# 需要导入模块: from impacket import nt_errors [as 别名]
# 或者: from impacket.nt_errors import STATUS_MORE_ENTRIES [as 别名]
def enumerate_domain_groups(self, dce, domain_handle):
		request = samr.SamrEnumerateGroupsInDomain()
		request['DomainHandle'] = domain_handle
		request['EnumerationContext'] = 0
		request['PreferedMaximumLength'] = 0xffffffff

		while True:
			try:
				resp = dce.request(request)
			except Exception as dce_exception:
				if dce_exception.error_code == nt_errors.STATUS_MORE_ENTRIES:
					resp = dce_exception.get_packet()
					request['EnumerationContext'] = resp['EnumerationContext']
					groups = resp['Buffer']['Buffer']
					for i, group in enumerate(groups):
						rid = resp['Buffer']['Buffer'][i]['RelativeId']
						group_name = (resp['Buffer']['Buffer'][i]['Name']).encode('utf8')
						group_and_rid = ('{0},{1}'.format(group_name, rid))
						self.log.info(group_and_rid)
						self.data.append(group_and_rid)
					continue
			break 
开发者ID:Gilks,项目名称:enumerid,代码行数:24,代码来源:enumerid.py

示例10: getDomainUsers

# 需要导入模块: from impacket import nt_errors [as 别名]
# 或者: from impacket.nt_errors import STATUS_MORE_ENTRIES [as 别名]
def getDomainUsers(self, enumerationContext=0):
        if self.__samr is None:
            self.connectSamr(self.getMachineNameAndDomain()[1])

        try:
            resp = samr.hSamrEnumerateUsersInDomain(self.__samr, self.__domainHandle,
                                                    userAccountControl=samr.USER_NORMAL_ACCOUNT | \
                                                                       samr.USER_WORKSTATION_TRUST_ACCOUNT | \
                                                                       samr.USER_SERVER_TRUST_ACCOUNT |\
                                                                       samr.USER_INTERDOMAIN_TRUST_ACCOUNT,
                                                    enumerationContext=enumerationContext)
        except DCERPCException as e:
            if str(e).find('STATUS_MORE_ENTRIES') < 0:
                raise
            resp = e.get_packet()
        return resp 
开发者ID:Coalfire-Research,项目名称:Slackor,代码行数:18,代码来源:secretsdump.py

示例11: test_SamrEnumerateGroupsInDomain

# 需要导入模块: from impacket import nt_errors [as 别名]
# 或者: from impacket.nt_errors import STATUS_MORE_ENTRIES [as 别名]
def test_SamrEnumerateGroupsInDomain(self):
        dce, rpctransport, domainHandle  = self.connect()
        request = samr.SamrEnumerateGroupsInDomain()
        request['DomainHandle'] = domainHandle
        request['EnumerationContext'] =  0
        request['PreferedMaximumLength'] = 500
        status = nt_errors.STATUS_MORE_ENTRIES
        while status == nt_errors.STATUS_MORE_ENTRIES:
            try:
                resp4 = dce.request(request)
            except Exception as e:
                if str(e).find('STATUS_MORE_ENTRIES') < 0:
                    raise 
                resp4 = e.get_packet()
            resp4['Buffer'].dump()
            request['EnumerationContext'] = resp4['EnumerationContext'] 
            status = resp4['ErrorCode'] 
开发者ID:Coalfire-Research,项目名称:Slackor,代码行数:19,代码来源:test_samr.py

示例12: test_SamrEnumerateUsersInDomain

# 需要导入模块: from impacket import nt_errors [as 别名]
# 或者: from impacket.nt_errors import STATUS_MORE_ENTRIES [as 别名]
def test_SamrEnumerateUsersInDomain(self):
        dce, rpctransport, domainHandle  = self.connect()
        request = samr.SamrEnumerateUsersInDomain()
        request['DomainHandle'] = domainHandle
        request['UserAccountControl'] =  samr.USER_NORMAL_ACCOUNT
        request['EnumerationContext'] =  0
        request['PreferedMaximumLength'] = 8192
        status = nt_errors.STATUS_MORE_ENTRIES
        while status == nt_errors.STATUS_MORE_ENTRIES:
            try:
                resp4 = dce.request(request)
            except Exception as e:
                if str(e).find('STATUS_MORE_ENTRIES') < 0:
                    raise 
                resp4 = e.get_packet()
            resp4['Buffer'].dump()
            request['EnumerationContext'] = resp4['EnumerationContext'] 
            status = resp4['ErrorCode'] 
开发者ID:Coalfire-Research,项目名称:Slackor,代码行数:20,代码来源:test_samr.py

示例13: test_hSamrQueryDisplayInformation3

# 需要导入模块: from impacket import nt_errors [as 别名]
# 或者: from impacket.nt_errors import STATUS_MORE_ENTRIES [as 别名]
def test_hSamrQueryDisplayInformation3(self):
        dce, rpctransport, domainHandle  = self.connect()
        try:
            resp = samr.hSamrQueryDisplayInformation3(dce, domainHandle,  samr.DOMAIN_DISPLAY_INFORMATION.DomainDisplayUser)
            resp.dump()
        except Exception as e:
            if str(e).find('STATUS_MORE_ENTRIES') >=0:
                e.get_packet().dump()
            else:
                raise

        resp = samr.hSamrQueryDisplayInformation3(dce, domainHandle,  samr.DOMAIN_DISPLAY_INFORMATION.DomainDisplayMachine)
        resp.dump()

        resp = samr.hSamrQueryDisplayInformation3(dce, domainHandle,  samr.DOMAIN_DISPLAY_INFORMATION.DomainDisplayGroup)
        resp.dump()

        resp = samr.hSamrQueryDisplayInformation3(dce, domainHandle,  samr.DOMAIN_DISPLAY_INFORMATION.DomainDisplayOemGroup)
        resp.dump() 
开发者ID:Coalfire-Research,项目名称:Slackor,代码行数:21,代码来源:test_samr.py

示例14: test_SamrQueryDisplayInformation2

# 需要导入模块: from impacket import nt_errors [as 别名]
# 或者: from impacket.nt_errors import STATUS_MORE_ENTRIES [as 别名]
def test_SamrQueryDisplayInformation2(self):
        dce, rpctransport, domainHandle  = self.connect()
        try:
            resp = samr.hSamrQueryDisplayInformation2(dce, domainHandle,  samr.DOMAIN_DISPLAY_INFORMATION.DomainDisplayUser)
            resp.dump()
        except Exception as e:
            if str(e).find('STATUS_MORE_ENTRIES') >=0:
                e.get_packet().dump()
            else:
                raise

        resp = samr.hSamrQueryDisplayInformation2(dce, domainHandle,  samr.DOMAIN_DISPLAY_INFORMATION.DomainDisplayMachine)
        resp.dump()

        resp = samr.hSamrQueryDisplayInformation2(dce, domainHandle,  samr.DOMAIN_DISPLAY_INFORMATION.DomainDisplayGroup)
        resp.dump()

        resp = samr.hSamrQueryDisplayInformation2(dce, domainHandle,  samr.DOMAIN_DISPLAY_INFORMATION.DomainDisplayOemGroup)
        resp.dump() 
开发者ID:Coalfire-Research,项目名称:Slackor,代码行数:21,代码来源:test_samr.py

示例15: test_hSamrQueryDisplayInformation

# 需要导入模块: from impacket import nt_errors [as 别名]
# 或者: from impacket.nt_errors import STATUS_MORE_ENTRIES [as 别名]
def test_hSamrQueryDisplayInformation(self):
        dce, rpctransport, domainHandle  = self.connect()

        try:
            resp = samr.hSamrQueryDisplayInformation(dce, domainHandle,  samr.DOMAIN_DISPLAY_INFORMATION.DomainDisplayUser)
            resp.dump()
        except Exception as e:
            if str(e).find('STATUS_MORE_ENTRIES') >=0:
                e.get_packet().dump()
            else:
                raise


        resp = samr.hSamrQueryDisplayInformation(dce, domainHandle,  samr.DOMAIN_DISPLAY_INFORMATION.DomainDisplayMachine)
        resp.dump()

        resp = samr.hSamrQueryDisplayInformation(dce, domainHandle,  samr.DOMAIN_DISPLAY_INFORMATION.DomainDisplayGroup)
        resp.dump()

        resp = samr.hSamrQueryDisplayInformation(dce, domainHandle,  samr.DOMAIN_DISPLAY_INFORMATION.DomainDisplayOemGroup)
        resp.dump() 
开发者ID:Coalfire-Research,项目名称:Slackor,代码行数:23,代码来源:test_samr.py


注:本文中的impacket.nt_errors.STATUS_MORE_ENTRIES属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。