MCPcopy Index your code
hub / github.com/secdev/scapy / _ParseStringArray

Function _ParseStringArray

scapy/layers/msrpce/msdcom.py:643–656  ·  view source on GitHub ↗

Process aStringArray in a DUALSTRINGARRAY to extract string bindings and security bindings.

(
    dual: DUALSTRINGARRAY,
)

Source from the content-addressed store, hash-verified

641
642
643def _ParseStringArray(
644 dual: DUALSTRINGARRAY,
645) -> Tuple[List[STRINGBINDING], List[SECURITYBINDING]]:
646 """
647 Process aStringArray in a DUALSTRINGARRAY to extract string bindings and
648 security bindings.
649 """
650 str_fld = PacketListField("", [], STRINGBINDING)
651 sec_fld = PacketListField("", [], SECURITYBINDING)
652 string = str_fld.getfield(dual, dual.aStringArray[: dual.wSecurityOffset * 2])[1]
653 secs = sec_fld.getfield(dual, dual.aStringArray[dual.wSecurityOffset * 2 :])[1]
654 if string[-1].wTowerId != 0 or secs[-1].wAuthnSvc != 0:
655 raise ValueError("Invalid DUALSTRINGARRAY !")
656 return string[:-1], secs[:-1]
657
658
659def _HashStringBinding(strings: List[STRINGBINDING]):

Callers 5

_UnmarshallObjrefMethod · 0.85
_UpdateTablesMethod · 0.85
ResolveOxid2Method · 0.85
ServerAlive2Function · 0.85

Calls 2

getfieldMethod · 0.95
PacketListFieldClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…