Skip to content

Commit ddc5f00

Browse files
committed
Bugfix unicode
1 parent 2b2a6bc commit ddc5f00

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

getsploit.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,12 @@ def main():
796796
maxWidth = max(len(element[2]) for element in tableRows)
797797
outputTable.set_cols_width([20, 30, maxWidth])
798798
outputTable.add_rows(tableRows)
799-
print(outputTable.draw())
799+
if pythonVersion < 3.0:
800+
# Just pass non-ascii
801+
print(outputTable.draw().decode('ascii', 'ignore'))
802+
else:
803+
# Any better solution here?
804+
print(outputTable.draw().encode('ascii', 'ignore').decode())
800805

801806
if __name__ == '__main__':
802807
main()

0 commit comments

Comments
 (0)