MCPcopy
hub / github.com/mandiant/flare-floss / render_stackstrings

Function render_stackstrings

floss/render/default.py:204–229  ·  view source on GitHub ↗
(
    strings: Union[List[StackString], List[TightString]], console, verbose: bool, disable_headers: bool
)

Source from the content-addressed store, hash-verified

202
203
204def render_stackstrings(
205 strings: Union[List[StackString], List[TightString]], console, verbose: bool, disable_headers: bool
206):
207 if verbose == Verbosity.DEFAULT:
208 for s in strings:
209 console.print(sanitize(s.string), markup=False)
210 else:
211 if strings:
212 table = Table(
213 "Function",
214 "Function Offset",
215 "Frame Offset",
216 "String",
217 show_header=not (disable_headers),
218 box=box.ASCII2,
219 show_edge=False,
220 )
221 for s in strings:
222 table.add_row(
223 util.hex(s.function),
224 util.hex(s.program_counter),
225 util.hex(s.frame_offset),
226 string_style(sanitize(s.string)),
227 )
228
229 console.print(table)
230
231
232def render_decoded_strings(decoded_strings: List[DecodedString], console, verbose, disable_headers):

Callers 1

renderFunction · 0.85

Calls 2

sanitizeFunction · 0.90
string_styleFunction · 0.85

Tested by

no test coverage detected