sdk/python/Deserialization/PyPickletools
Deserialization

PyPickletools

Python stdlib module — pickletools. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.decode_long()Neutral
#
Signature
decode_long(data)

Decode a long from a two's complement little-endian binary string.

.dis()Neutral
#
Signature
dis(pickle, out, memo, indentlevel, annotate)

Produce a symbolic disassembly of a pickle.

.genops()Neutral
#
Signature
genops(pickle)

Generate all the opcodes in a pickle.

.optimize()Neutral
#
Signature
optimize(p)

Optimize a pickle string by removing unused PUT opcodes

.read_bytearray8()Neutral
#
Signature
read_bytearray8(f)

>>> import io, struct, sys

.read_bytes1()Neutral
#
Signature
read_bytes1(f)

>>> import io

.read_bytes4()Neutral
#
Signature
read_bytes4(f)

>>> import io

.read_bytes8()Neutral
#
Signature
read_bytes8(f)

>>> import io, struct, sys

.read_decimalnl_long()Neutral
#
Signature
read_decimalnl_long(f)

>>> import io

.read_decimalnl_short()Neutral
#
Signature
read_decimalnl_short(f)

>>> import io

Fully-Qualified Names

FQNField
pickletoolsfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

rule.py
import pickletools