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

Function unpack_string

Plugins/Vul/CMS/Tomcat_AJP_LFI.py:23–29  ·  view source on GitHub ↗
(stream)

Source from the content-addressed store, hash-verified

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
26 return None
27 res, = unpack(stream, "%ds" % size)
28 stream.read(1) # \0
29 return res
30class NotFoundException(Exception):
31 pass
32class AjpBodyRequest(object):

Callers 2

parseMethod · 0.85
parse_send_headersMethod · 0.85

Calls 1

unpackFunction · 0.85

Tested by

no test coverage detected