Language Features

PyStruct

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

Other Methods

.calcsize()Neutral
#
Signature
calcsize(format)

Return size in bytes of the struct described by the format string.

.iter_unpack()Neutral
#
Signature
iter_unpack(format, buffer)

Return an iterator yielding tuples unpacked from the given bytes.

.pack()Neutral
#
Signature
pack()

pack(format, v1, v2, ...) -> bytes

.pack_into()Neutral
#
Signature
pack_into()

pack_into(format, buffer, offset, v1, v2, ...)

.unpack()Neutral
#
Signature
unpack(format, buffer)

Return a tuple containing values unpacked according to the format string.

.unpack_from()Neutral
#
Signature
unpack_from(format, buffer, offset)

Return a tuple containing values unpacked according to the format string.

.Struct()Neutral
#
Signature
Struct(...)

Struct(fmt) --> compiled struct object

.error()Neutral
#
Signature
error(...)

error class.

Fully-Qualified Names

FQNField
structfqns[0]

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

Import

rule.py
import struct