top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How I can make scapy read MGCP packets from a .pcap file?

+1 vote
358 views

I use scapy for MGCP. I started off with reading a .pcap file with MGCP packets.

For example:

from scapy.all import *
from scapy.utils import *
from scapy.layers.mgcp import *

mgcp_pkts = rdpcap("my-mgcp-capture.pcap")

However, rdpcap() is returning all MGCP packets as UDP packets. The output is something like:

All 262 UDP packets are actually MGCP packets. 

I would have thought rdpcap() will understand MGCP packet format.

Would appreciate help on how I can make scapy read MGCP packets from a .pcap file.

posted Jun 30, 2015 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

How to read/load the cmake file in python and access its elements. I have a scenario, where i need to load the make file and access its elements. I have tried reading the make file as text file and parsing it,but its not the ideal solution. Please let me know how to load the .mk file and access its elements in python.

+2 votes

Is there a better way to do that:

def Read_CSV_File(filename):
 file = open(filename, "r")
 reader = csv.DictReader(file)
 line = 1
 for row in reader:
 if line < 6:
 reader.next()
 line++
# process the CSV
...