Sapito icon indicating copy to clipboard operation
Sapito copied to clipboard

Error parsing output of device utf-8

Open verovaleros opened this issue 2 years ago • 2 comments

SrcMAC: redacted (Samsung Electronics), SrcIP: redacted . Name: unknown . #Questions: 0. #Additional Records 5. #Answers: 1
	Answers:
		Answer Type: DNS Resource Record. Rdata to process: Samsung M267x 287x Series (SEC842519711A42)._ipp._tcp.local.
	Additional Records:
		Type: DNS Resource Record. Rdata Bytes: [b'txtvers=1', b'note=', b'ty=Samsung M267x 287x Series', b'rp=ipp/print', b'note=', b'qtotal=1', b'priority=51', b'ty=Samsung M267x 287x Series', b'product=(Samsung M267x 287x Series)', b'pdl=application/octet-stream,application/PCL,application/vnd.hp-PCL,application/vnd.hp-PCLXL,application/x-QPDL,text/plain,image/urf,application/PCLm', b'adminurl=http://SEC842519711A42.local./sws/index.html?link=/sws/app/settings/network/AirPrint/AirPrint.html', b'usb_MFG=Samsung', b'usb_MDL=M267x 287x Series', b'usb_CMD=MFG:Samsung;CMD:PCL6,URF,FWV,PIC,SPDS,EXT;MDL:M267x 287x Series;CLS:PRINTER;CID:SA_PCL6_BW;MODE:SCN,SPL3,R000105,SCP;', b'MFG=Samsung', b'MDL=M267x 287x Series', b'UUID=redacted', b'print_wfds=T', b'URF=W8,RS600,IS1,CP1,IFU0,PQ4,OB10,DM1,V1.2', b'Bind=F', b'Collate=F', b'Color=F', b'Copies=T', b'Duplex=T', b'PaperCustom=T', b'P\x01\x00\x00\x00\xa8\xbd', b'\x00L\xc9\xeb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\xce\xeb\x00\x04=\x0c\x00\x01\x00P=\x94\x11', b'', b'', b'\x00\x1c\x00z\xaf\x1bd \x08\xd8\x98\x00\x00\x00\x00']
			Name: txtvers. Value: 1
			Name: note. Value:
			Name: ty. Value: Samsung M267x 287x Series
			Name: rp. Value: ipp/print
			Name: note. Value:
			Name: qtotal. Value: 1
			Name: priority. Value: 51
			Name: ty. Value: Samsung M267x 287x Series
			Name: product. Value: (Samsung M267x 287x Series)
			Name: pdl. Value: application/octet-stream,application/PCL,application/vnd.hp-PCL,application/vnd.hp-PCLXL,application/x-QPDL,text/plain,image/urf,application/PCLm
			Name: adminurl. Value: http://SEC842519711A42.local./sws/index.html?
			Name: link. Value: /sws/app/settings/network/AirPrint/AirPrint.html
			Name: usb_MFG. Value: Samsung
			Name: usb_MDL. Value: M267x 287x Series
			Name: usb_CMD. Value: MFG:Samsung;CMD:PCL6,URF,FWV,PIC,SPDS,EXT;MDL:M267x 287x Series;CLS:PRINTER;CID:SA_PCL6_BW;MODE:SCN,SPL3,R000105,SCP;
			Name: MFG. Value: Samsung
			Name: MDL. Value: M267x 287x Series
			Name: UUID. Value: 16a65700-007c-1000-bb49-842519711a42
			Name: print_wfds. Value: T
			Name: URF. Value: W8,RS600,IS1,CP1,IFU0,PQ4,OB10,DM1,V1.2
			Name: Bind. Value: F
			Name: Collate. Value: F
			Name: Color. Value: F
			Name: Copies. Value: T
			Name: Duplex. Value: T
			Name: PaperCustom. Value: T
Traceback (most recent call last):
  File "/sapito/sapito.py", line 517, in <module>
    sniff(iface=args.interface,prn=do,store=0, filter=args.filter)
  File "/usr/local/lib/python3.9/site-packages/scapy/sendrecv.py", line 1263, in sniff
    sniffer._run(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/scapy/sendrecv.py", line 1210, in _run
    session.on_packet_received(p)
  File "/usr/local/lib/python3.9/site-packages/scapy/sessions.py", line 108, in on_packet_received
    result = self.prn(pkt)
  File "/sapito/sapito.py", line 473, in do
    list_data = list_data.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa8 in position 5: invalid start byte

verovaleros avatar Oct 01 '22 21:10 verovaleros

@eldraco, @verovaleros: Any progress on it?

Neustradamus avatar Aug 28 '24 04:08 Neustradamus

Not for now, but in queque

eldraco avatar Aug 29 '24 09:08 eldraco