MCPcopy
hub / github.com/zhzyker/exphub / unpack

Function unpack

tomcat/cve-2020-1938_exp.py:13–16  ·  view source on GitHub ↗
(stream, fmt)

Source from the content-addressed store, hash-verified

11 l = len(s)
12 return struct.pack(">H%dsb" % l, l, s.encode('utf8'), 0)
13def unpack(stream, fmt):
14 size = struct.calcsize(fmt)
15 buf = stream.read(size)
16 return struct.unpack(fmt, buf)
17def unpack_string(stream):
18 size, = unpack(stream, ">h")
19 if size == -1: # null string

Callers 7

unpack_stringFunction · 0.85
parseMethod · 0.85
parseMethod · 0.85
parse_send_headersMethod · 0.85
parse_send_body_chunkMethod · 0.85
parse_end_responseMethod · 0.85
parse_get_body_chunkMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected