Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Identify the IP addresses of the other people in the coffee shop. (Easier version of the exercise: Your source IP is 10.3.0.18). You know that

Identify the IP addresses of the other people in the coffee shop. (Easier version of the exercise: Your source IP is 10.3.0.18). You know that all the other machines on the coffee shop's local area network have the same subnet as you; in other words, they share the first three bytes in their IP address as you. Create a new function called findOtherIPs() that finds the other IPs of the people in the coffee shop. Need a hint? Remember that the other IPs have the same subnet as you. In other words their IPs start with 10.3.0. Your function should return the collection of all the IPs of the people in the coffee shop.

from scapy.all import * import sys

def parsePCAP(pkts): for pkt in pkts: print "Source IP: " + pkt[IP].src print "Destination IP: " + pkt[IP].dst print "Source port: " + str(pkt[TCP].sport) print "Destinations port: " + str(pkt[TCP].dport) print "Packet Payload: " + str(pkt[TCP].payload)

if __name__ == "__main__": if len(sys.argv) < 2: print "usage: python lab3.py [pcap]" sys.exit() pcap= rdpcap(sys.argv[1]) pcap = [pkt for pkt in pcap if TCP in pkt] parsePCAP(pcap)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Iv Special Issue On Database Systems For Biomedical Applications Lncs 6990

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Christian Bohm ,Johann Eder ,Claudia Plant

2011th Edition

3642237398, 978-3642237393

More Books

Students also viewed these Databases questions

Question

How would we like to see ourselves?

Answered: 1 week ago