From 8773e6dba584bc0052507e67a2c24eb2d8f69d37 Mon Sep 17 00:00:00 2001 From: zer0 Date: Sat, 27 Jan 2018 22:02:38 -0500 Subject: [PATCH] Fix Bug on line 801 Fix the following issue ./getsploit.py kernel 4.0.2 Total found exploits: 6 Web-search URL: https://vulners.com/search?query=bulletinFamily%3Aexploit+AND+kernel+4.0.2 Traceback (most recent call last): File "./getsploit.py", line 807, in main() File "./getsploit.py", line 801, in main print(outputTable.draw().decode('ascii', 'ignore')) UnicodeEncodeError: 'ascii' codec can't encode characters in position 2613-2620: ordinal not in range(128) --- getsploit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/getsploit.py b/getsploit.py index 9fcb6c4..b48269d 100755 --- a/getsploit.py +++ b/getsploit.py @@ -798,10 +798,10 @@ def main(): outputTable.add_rows(tableRows) if pythonVersion < 3.0: # Just pass non-ascii - print(outputTable.draw().decode('ascii', 'ignore')) + print(outputTable.draw().encode('ascii', 'ignore')) else: # Any better solution here? print(outputTable.draw().encode('ascii', 'ignore').decode()) if __name__ == '__main__': - main() \ No newline at end of file + main()