mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-09 19:27:39 +02:00
Add in array_to_string helper function.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
from volatility.framework.objects import Array
|
||||
|
||||
|
||||
def array_to_string(array, errors = 'replace'):
|
||||
"""Takes a volatility Array of characters and returns a string"""
|
||||
# TODO: Consider checking the Array's target is a native char
|
||||
if not isinstance(array, Array):
|
||||
raise TypeError("Array_to_string takes an Array of char")
|
||||
return array.cast("string", max_length = array.vol.count, errors = errors)
|
||||
Reference in New Issue
Block a user