MCPcopy Create free account
hub / github.com/secdev/scapy / Bind

Class Bind

scapy/contrib/postgres.py:388–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386
387
388class Bind(_ZeroPadding):
389 name = "Bind Request"
390 fields_desc = [
391 ByteTagField(b"?"),
392 FieldLenField(
393 "len", None, fmt="I", length_of="body", adjust=lambda pkt, x: len(pkt) - 1
394 ),
395 StrNullField("destination", ""),
396 StrNullField("statement", ""),
397 FieldLenField("codes_count", 0, fmt="H", count_of="codes"),
398 FieldListField(
399 "codes", [], ShortField("", 0), count_from=lambda pkt: pkt.codes_count
400 ),
401 FieldLenField("values_count", 0, fmt="H", count_of="values"),
402 PacketListField(
403 "values", [], SignedIntStrPair, count_from=lambda pkt: pkt.values_count
404 ),
405 FieldLenField("results_count", 0, fmt="H", count_of="results"),
406 FieldListField(
407 "results", [], ShortField("", 0), count_from=lambda pkt: pkt.results_count
408 ),
409 ]
410
411
412class BindComplete(_ZeroPadding):

Callers

nothing calls this directly

Calls 6

FieldLenFieldClass · 0.90
StrNullFieldClass · 0.90
FieldListFieldClass · 0.90
ShortFieldClass · 0.90
PacketListFieldClass · 0.90
ByteTagFieldClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…