mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-30 11:49:42 +02:00
Make sure objects.utility is imported automatically.
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
#
|
||||
|
||||
import collections
|
||||
import functools
|
||||
import logging
|
||||
import struct
|
||||
from collections import abc
|
||||
@@ -27,7 +26,7 @@ from typing import Any, ClassVar, Dict, List, Iterable, Optional, Tuple, Type, U
|
||||
|
||||
from volatility.framework import interfaces
|
||||
from volatility.framework.interfaces.objects import ObjectInformation
|
||||
from volatility.framework.objects import templates
|
||||
from volatility.framework.objects import templates, utility
|
||||
|
||||
vollog = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ from typing import Optional, Union
|
||||
from volatility.framework import interfaces, objects, constants
|
||||
|
||||
|
||||
def array_to_string(array: objects.Array, count: Optional[int] = None,
|
||||
def array_to_string(array: 'objects.Array', count: Optional[int] = None,
|
||||
errors: str = 'replace') -> interfaces.objects.ObjectInterface:
|
||||
"""Takes a volatility Array of characters and returns a string"""
|
||||
# TODO: Consider checking the Array's target is a native char
|
||||
@@ -35,7 +35,7 @@ def array_to_string(array: objects.Array, count: Optional[int] = None,
|
||||
return array.cast("string", max_length = count, errors = errors)
|
||||
|
||||
|
||||
def pointer_to_string(pointer: objects.Pointer, count: int, errors: str = 'replace'):
|
||||
def pointer_to_string(pointer: 'objects.Pointer', count: int, errors: str = 'replace'):
|
||||
"""Takes a volatility Pointer to characters and returns a string"""
|
||||
if not isinstance(pointer, objects.Pointer):
|
||||
raise TypeError("pointer_to_string takes a Pointer")
|
||||
|
||||
Reference in New Issue
Block a user