Skip to content

Commit

Permalink
Fix Bug on line 801
Browse files Browse the repository at this point in the history
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 <module>
    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)
  • Loading branch information
aquintana1 authored Jan 28, 2018
1 parent ddc5f00 commit 8773e6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions getsploit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
main()

0 comments on commit 8773e6d

Please sign in to comment.