示例#1
0
def BIGNUM_loadMembers(self, mappings, maxDepth):
  ''' 
  #self._d = process.readArray(attr_obj_address, ctypes.c_ulong, self.top) 
  ## or    
  #ulong_array= (ctypes.c_ulong * self.top)    
  '''
  if not self.isValid(mappings):
    log.debug('BigNUm tries to load members when its not validated')
    return False
  # Load and memcopy d / BN_ULONG *
  attr_obj_address = getaddress(self.d)
  if not bool(self.d):
    log.debug('BIGNUM has a Null pointer d')
    return True
  memoryMap = is_valid_address_value( attr_obj_address, mappings)
  # TODO - challenge buffer_copy use,
  contents=(BN_ULONG*self.top).from_buffer_copy(memoryMap.readArray(attr_obj_address, BN_ULONG, self.top))
  keepRef( contents, model.getSubtype(self.d), attr_obj_address )
  log.debug('contents acquired %d'%ctypes.sizeof(contents))
  return True
示例#2
0
def BIGNUM_loadMembers(self, mappings, maxDepth):
    ''' 
    #self._d = process.readArray(attr_obj_address, ctypes.c_ulong, self.top) 
    ## or        
    #ulong_array= (ctypes.c_ulong * self.top)        
    '''
    if not self.isValid(mappings):
        log.debug('BigNUm tries to load members when its not validated')
        return False
    # Load and memcopy d / BN_ULONG *
    attr_obj_address = get_pointee_address(self.d)
    if not bool(self.d):
        log.debug('BIGNUM has a Null pointer d')
        return True
    memoryMap = mappings.is_valid_address_value(attr_obj_address)
    # TODO - challenge buffer_copy use,
    contents = (BN_ULONG * self.top).from_buffer_copy(
        memoryMap.readArray(attr_obj_address, BN_ULONG, self.top))
    mappings.keepRef(contents, model.getSubtype(self.d), attr_obj_address)
    log.debug('contents acquired %d' % ctypes.sizeof(contents))
    return True
示例#3
0
def BIGNUM_get_d(self):
    return self._mapping_.getRef(model.getSubtype(self.d),
                                 get_pointee_address(self.d))
示例#4
0
def BIGNUM_get_d(self):
  return getRef( model.getSubtype(self.d), getaddress(self.d))
示例#5
0
def BIGNUM_get_d(self):
    return self._mapping_.getRef( model.getSubtype(self.d), get_pointee_address(self.d))