mirror of https://github.com/snare/voltron.git
get formatter in a discrete step for easier debugging
This commit is contained in:
parent
88b6816909
commit
7030c7f486
|
@ -50,9 +50,10 @@ class DisasmView(TerminalView):
|
|||
try:
|
||||
host = 'capstone' if self.args.use_capstone else res.host
|
||||
lexer = get_lexer_by_name('{}_{}'.format(host, res.flavor))
|
||||
disasm = pygments.highlight(disasm, lexer, pygments.formatters.get_formatter_by_name(
|
||||
self.config.format.pygments_formatter,
|
||||
style=self.config.format.pygments_style))
|
||||
formatter = pygments.formatters.get_formatter_by_name(
|
||||
self.config.format.pygments_formatter,
|
||||
style=self.config.format.pygments_style)
|
||||
disasm = pygments.highlight(disasm, lexer, formatter)
|
||||
except Exception as e:
|
||||
log.warning('Failed to highlight disasm: ' + str(e))
|
||||
log.info(self.config.format)
|
||||
|
|
Loading…
Reference in New Issue