the following error info is “<class 'TypeError'> expected LP_c_ubyte instance instead of bytes”, how to use the function ? thanks a lot
h = pcap.findalldevs()
h
['\Device\NPF{0E865733-C420-433F-A842-1CFAF01D0584}', '\Device\NPF{4AC140BE-5CCB-4CEC-A5C6-45EB5670271E}', '\Device\NPF{6AFC5285-5C62-40DF-86C6-075CA7631080}', '\Device\NPF{7D3008E3-2FE8-4871-8063-520F4CC3E1B6}', '\Device\NPF{CB8D1936-C71A-44E3-84B8-0C372898B1C6}', '\Device\NPF{785A38C8-001C-4D02-86D9-6D1051B3C5AB}', '\Device\NPF{3131428A-0B14-410B-9BB1-50C965A1B8CB}']
hd = pcap.pcap('\Device\NPF{4AC140BE-5CCB-4CEC-A5C6-45EB5670271E}')
hd
<pcap._pcap.pcap object at 0x000002496F8F57C0>
listPkt = [0xea,0x00,0x01,0x02,0x03,0xeb,0x00,0x01,0x02,0x03,0x77,0x88]
for i in range(100):
listPkt.append(i)
How to use the function 'sendpacket' ?
the following error info is “<class 'TypeError'> expected LP_c_ubyte instance instead of bytes”, how to use the function ? thanks a lot