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


Python ndr.NDRSTRUCT类代码示例

本文整理汇总了Python中impacket.dcerpc.v5.ndr.NDRSTRUCT的典型用法代码示例。如果您正苦于以下问题:Python NDRSTRUCT类的具体用法?Python NDRSTRUCT怎么用?Python NDRSTRUCT使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: __init__

 def __init__(self, data = None, isNDR64 = False):
     NDRSTRUCT.__init__(self, data, isNDR64)
     self.structure = (
         ('tdescElem',TYPEDESC),
         ('cDims',USHORT),
         ('rgbounds',SAFEARRAYBOUND_ARRAY),
     )
开发者ID:CoreSecurity,项目名称:impacket,代码行数:7,代码来源:oaut.py

示例2: __getitem__

 def __getitem__(self, key):
     if key == 'asData':
         value = ''
         for letter in self.fields['asData']['Data']:
             value += pack('<H', letter).decode('utf-16le')
         return value
     else:
         return NDRSTRUCT.__getitem__(self,key)
开发者ID:3xp10it,项目名称:sulley-win-installer,代码行数:8,代码来源:oaut.py

示例3: __setitem__

 def __setitem__(self, key, value):
     if key == 'Data' and isinstance(value, NDR) is False:
         try:
             value.encode('utf-16le')
         except UnicodeDecodeError:
             import sys
             value = value.decode(sys.getfilesystemencoding())
         self['Length'] = len(value)*2
         self['MaximumLength'] = len(value)*2
     return NDRSTRUCT.__setitem__(self, key, value)
开发者ID:CoreSecurity,项目名称:impacket,代码行数:10,代码来源:dtypes.py

示例4: __setitem__

 def __setitem__(self, key, value):
     if key == 'asData':
         value = value #+ '\x00'
         array = list()
         for letter in value:
             encoded = letter.encode('utf-16le')
             array.append(unpack('<H', encoded)[0])
         self.fields[key]['Data'] = array
         self['cBytes'] = len(value)*2
         self['clSize'] = len(value)
         self.data = None        # force recompute
     else:
         return NDRSTRUCT.__setitem__(self, key, value)
开发者ID:3xp10it,项目名称:sulley-win-installer,代码行数:13,代码来源:oaut.py

示例5: fromString

 def fromString(self, data, soFar=0):
     retVal = NDRSTRUCT.fromString(self, data, soFar)
     # self.dumpRaw()
     return retVal
开发者ID:sjitech,项目名称:impacket,代码行数:4,代码来源:drsuapi.py

示例6: getData

 def getData(self, soFar=0):
     return NDRSTRUCT.getData(self, soFar)
开发者ID:sjitech,项目名称:impacket,代码行数:2,代码来源:drsuapi.py

示例7: __init__

 def __init__(self, data = None,isNDR64 = False):
     NDRSTRUCT.__init__(self, data, isNDR64)
     self['context_handle_uuid'] = '\x00'*20
开发者ID:3xp10it,项目名称:sulley-win-installer,代码行数:3,代码来源:rrp.py

示例8: getData

 def getData(self, soFar = 0):
     self['SubAuthorityCount'] = len(self['SubAuthority'])
     return NDRSTRUCT.getData(self, soFar)
开发者ID:CoreSecurity,项目名称:impacket,代码行数:3,代码来源:dtypes.py

示例9: __setitem__

 def __setitem__(self, key, value):
     if key == 'Data' and isinstance(value, NDR) is False:
         self['Length'] = len(value)*2
         self['MaximumLength'] = len(value)*2
     return NDRSTRUCT.__setitem__(self, key, value)
开发者ID:ReaganTheDino,项目名称:buttsniffer,代码行数:5,代码来源:dtypes.py

示例10: __init__

 def __init__(self, data=None, isNDR64=False):
     NDRSTRUCT.__init__(self, data, isNDR64)
     self["context_handle_uuid"] = "\x00" * 20
开发者ID:mrlzh,项目名称:sLANt,代码行数:3,代码来源:rrp.py

示例11: getData

 def getData(self, soFar=0):
     self["SubAuthorityCount"] = len(self["SubAuthority"])
     return NDRSTRUCT.getData(self, soFar)
开发者ID:sjitech,项目名称:impacket,代码行数:3,代码来源:dtypes.py


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