RUB-NDS / PRET

Printer Exploitation Toolkit - The tool that made dumpster diving obsolete.
http://hacking-printers.net
GNU General Public License v2.0
3.88k stars 607 forks source link

Unicode Error Caused by Decoration. #65

Closed Schlagbul closed 2 years ago

Schlagbul commented 2 years ago

$ ./pret.py IP ps


_/_______________/|

/____///|| PRET | Printer Exploitation Toolkit v0.40 |=== |----| || by Jens Mueller jens.a.mueller@rub.de | | ▒| || |___| ▒| ||

Traceback (most recent call last): File "C:\Users\Utilizador\OneDrive\Ambiente de Trabalho\Pentest\Pret\pret\pret.py", line 65, in main() File "C:\Users\Utilizador\OneDrive\Ambiente de Trabalho\Pentest\Pret\pret\pret.py", line 53, in main intro(args.quiet) # show asciitainment # File "C:\Users\Utilizador\OneDrive\Ambiente de Trabalho\Pentest\Pret\pret\pret.py", line 41, in intro print(" | ||/.▒---.|| | || \u300c pentesting tool that made ") File "C:\Python310\lib\site-packages\colorama\ansitowin32.py", line 41, in write self.__convertor.write(text) File "C:\Python310\lib\site-packages\colorama\ansitowin32.py", line 162, in write self.write_and_convert(text) File "C:\Python310\lib\site-packages\colorama\ansitowin32.py", line 190, in write_and_convert self.write_plain_text(text, cursor, len(text)) File "C:\Python310\lib\site-packages\colorama\ansitowin32.py", line 195, in write_plain_text self.wrapped.write(text[start:end]) File "C:\Python310\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u300c' in position 29: character maps to

Using with Windows 10 Downloaded PRET with git python 3.10.4 pip version 22.0.4

Schlagbul commented 2 years ago

I found the solution.

So just open the pret.py file and find the unicode art at the start of the program.

Then remove these 2 characters from there: 「 and ‥ (the 2 dots are 1 single unicode charcter)