RUB-NDS / PRET

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

'utf-8' codec can't decode byte 0x8f in position 0: invalid start byte #58

Open 0xCGonzalo opened 2 years ago

0xCGonzalo commented 2 years ago

Hi, I have a problem when I want to download a file from my server:

1

Am I right if I assume that the tool can only download only some file extensions?

ghost commented 1 year ago

Try this one:

edit the script that will send commands in the language of your printer (pjl.py, pcl.py or postscript.py) Add this: import sys reload(sys) sys.setdefaultencoding('iso-8859-1') i hope this helps you

0xCGonzalo commented 1 year ago

Thank you very much!

HughHood commented 5 months ago

ghost,

I can't thank you enough for that. It helps much with certain files containing 8-bit characters.

Between using your solution, running PRET under python 2.7 and using the 'traversal' command instead of the 'cd' command, I'm able to interact as easily as I've ever been with the hard drive storage on our LaserJets.

That includes reading/writing font files (after conversion by Web JetAdmin) and updating my pclResourceFile.

Good work.