Question: # You may NOT alter the import list!!!! import pyshark import hashlib class MITMException ( Exception ) : A class to throw

# You may NOT alter the import list!!!!
import pyshark
import hashlib
class MITMException(Exception):
"""A class to throw if you come across incorrect syntax or other issues"""
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
class MITMProject(object):
def __init__(self):
self.cap = pyshark.FileCapture('TCP.reflection_fall2023.pcap')
self.class_id ="CS60353257"
# TODO: Change this to YOUR Georgia Tech ID!!!
# This is your 9-digit Georgia Tech ID
self.student_id ='903861572'
def get_student_hash(self, value):
return hashlib.sha256(self.student_id.encode('UTF-8')+ self.class_id + value).hexdigest()
# TODO:
# Task 1: Return n being:
# n = Number of packets with only SYN+ACK flags
def syn_ack(self):
n =0
return n
# TODO:
# Task 2: Return n being:
# n = Number of packets with only RST flag
def rst(self):
n =0
return n
# TODO:
# Task 3: Return d,p, being:
# d = IP Address of the victim
# p = Port being attacked
def victim_ip_port(self):
d,p =0,0
return d,p
if __name__=='__main__':
pcap_analysis = MITMProject()
ip,port = pcap_analysis.victim_ip_port()
synack = pcap_analysis.syn_ack()
rst = pcap_analysis.rst()
print("IP and Port: ",ip,port)
print("Number of SYN+ACK Packets : ", synack)
print("Number of RST Packets : ", rst)....... Task 6.1
Modify def syn_ack(self): function to return n, being n (int) the number of packets on TCP.reflection.pcap file that contains ONLY the SYN+ACK flags
Points: 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!