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

Function unpack_string

tomcat/cve-2020-1938_exp.py:17–23  ·  view source on GitHub ↗
(stream)

Source from the content-addressed store, hash-verified

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
20 return None
21 res, = unpack(stream, "%ds" % size)
22 stream.read(1) # \0
23 return res
24class NotFoundException(Exception):
25 pass
26class AjpBodyRequest(object):

Callers 2

parseMethod · 0.85
parse_send_headersMethod · 0.85

Calls 1

unpackFunction · 0.85

Tested by

no test coverage detected