MCPcopy
hub / github.com/0x727/ShuiZe_0x727 / unpack

Function unpack

Plugins/Vul/CMS/Tomcat_AJP_LFI.py:19–22  ·  view source on GitHub ↗
(stream, fmt)

Source from the content-addressed store, hash-verified

17 l = len(s)
18 return struct.pack(">H%dsb" % l, l, s.encode('utf8'), 0)
19def unpack(stream, fmt):
20 size = struct.calcsize(fmt)
21 buf = stream.read(size)
22 return struct.unpack(fmt, buf)
23def unpack_string(stream):
24 size, = unpack(stream, ">h")
25 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