marshal
– Python marshal loader¶
This module contains functions to load and unserialize data (including .pyc
files) serialized using the marshal
module on most version of python.
-
pwnypack.marshal.
marshal_load
(fp, origin=None)[source]¶ Unserialize data serialized with
marshal.dump()
. This function works across python versions. Marshalled code objects are returned as instances ofCodeObject
.Parameters: - fp (file) – A file or file-like object that contains the serialized data.
- origin (dict) – The opcode specification of the python version that
generated the data. If you provide
None
, the specs for the currently running python version will be used.
Returns: The unserialized data.
-
pwnypack.marshal.
marshal_loads
(data, origin=None)[source]¶ Load data serialized with
marshal.dump()
from a bytestring.Parameters: - data (bytes) – The marshalled data.
- origin (dict) – The opcode specification of the python version that
generated the data. If you provide
None
, the specs for the currently running python version will be used.
Returns: The unserialized data.