andrewf / pcap2har

A convertor from .pcap network capture files to HTTP Archive files.
BSD 2-Clause "Simplified" License
237 stars 68 forks source link

Crash: list index out of range in dns.py, self.names[0] #17

Open klepikov opened 12 years ago

klepikov commented 12 years ago

File "pcap2har/pcap.py", line 59, in ParsePcap dispatcher.add(ts, buf, eth) File "pcap2har/packetdispatcher.py", line 37, in add self.udp.add(ts, ip.data) File "pcap2har/udp.py", line 28, in add self.dns.add(dns.Packet(ts, dnspkt)) File "pcap2har/dns.py", line 86, in add new_query = Query(pkt) File "dns.py", line 49, in init self.name = initial_packet.name() File "pcap2har/dns.py", line 27, in name return self.names[0] IndexError: list index out of range

andrewf commented 12 years ago

It looks like there was a DNS packet that didn't have a name in it. I'm not sure what to do with that. Can you give me a pcap that replicates this.