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

py2 to py3 issues #49

Closed MrR3boot closed 2 years ago

MrR3boot commented 3 years ago

I see last commit which changed things from python2 to python3 for better compatibility but when i run the tool it doesn't send any commands to server.

Connection to 0.0.0.0 established
Connection to 0.0.0.0 failed (a bytes-like object is required, not 'str')
Connection closed.

I've fixed pjl.py as below

self.send(cmd_send.encode('utf-8'))

Now it sends first set of status commands to the server but fails parsing the response i believe.

Connection to 0.0.0.0 established
Device:   Connection to 0.0.0.0 failed (can only concatenate str (not "bytes") to str)
Connection closed.

Can you please test it and resolve the further issues ?

dabdine commented 2 years ago

Ran into this issue and resolved it this evening. Check out the MR referenced in the activity stream, pull it if you'd like to test it yourself.