Sushant Hiray
2014-09-28 21:16:14 UTC
Hi all,
I'm attaching a small tcpdump pcap file. I'm sending a SIP REGISTER request
from a client and trying to parse it with scapy.
Here is what I've done till now.
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/scapy/packet.py", line 261,
in __str__
return self.build()
File "/usr/local/lib/python2.7/dist-packages/scapy/packet.py", line 319,
in build
p = self.do_build()
File "/usr/local/lib/python2.7/dist-packages/scapy/packet.py", line 307,
in do_build
self = self.__iter__().next()
StopIteration
Can anyone suggest what the issue might be? Since I'm not able to convert
it to string, I'm not able to parse the internal fields such as username.
Or is there any better way to do the same?
Thanks,
Sushant Hiray,
Senior Undergrad CSE,
IIT Bombay
I'm attaching a small tcpdump pcap file. I'm sending a SIP REGISTER request
from a client and trying to parse it with scapy.
Here is what I've done till now.
pkts = rdpcap('one.pcap')
type(pkts[0][3])
<class 'sip.SIP'>type(pkts[0][3])
str(pkts[0][3])
Traceback (most recent call last):File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/scapy/packet.py", line 261,
in __str__
return self.build()
File "/usr/local/lib/python2.7/dist-packages/scapy/packet.py", line 319,
in build
p = self.do_build()
File "/usr/local/lib/python2.7/dist-packages/scapy/packet.py", line 307,
in do_build
self = self.__iter__().next()
StopIteration
Can anyone suggest what the issue might be? Since I'm not able to convert
it to string, I'm not able to parse the internal fields such as username.
Or is there any better way to do the same?
Thanks,
Sushant Hiray,
Senior Undergrad CSE,
IIT Bombay