You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.
This eventually is printed as a table by terminaltables, but crashes when the decoded base64 text contains raw bytes which correspond with newline characters (\r, \n, \f, maybe some others). As a result viper-web does not output anything and returns the following error: We were unable to complete the command surface . Error: list index out of range
When scanning an Office document using the office module with
--vba
option, one of the sections olevba returns is the "Base64 strings":https://github.com/viper-framework/viper-modules/blob/master/office.py#L405
This eventually is printed as a table by
terminaltables
, but crashes when the decoded base64 text contains raw bytes which correspond with newline characters (\r, \n, \f
, maybe some others). As a resultviper-web
does not output anything and returns the following error:We were unable to complete the command surface . Error: list index out of range
This is what happens in olevba first:
Later on those decoded strings are sent to the
viper/common/out.py:table(header, rows)
function, which uses anAsciiTable
to print them:https://github.com/viper-framework/viper/blob/master/viper/common/out.py#L58
Example:
This code fails because
terminaltables
tries to interpret the input to format multiline strings:https://github.com/Robpol86/terminaltables/blob/master/terminaltables/width_and_alignment.py#L58
and eventually crashes on this line because some columns now contain more lines than others:
https://github.com/Robpol86/terminaltables/blob/master/terminaltables/build.py#L140
The easiest solution seems to escape all special characters in the table() function, so the input is no longer split into multiple lines.
Example output with this solution:
The text was updated successfully, but these errors were encountered: