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 MITMExceptionException:
A class to throw if you come across incorrect syntax or other issues"""
def initself value:
self.value value
def strself:
return reprselfvalue
class MITMProjectobject:
def initself:
self.cap pyshark.FileCaptureTCPreflectionfallpcap'
self.classid CS
# TODO: Change this to YOUR Georgia Tech ID
# This is your digit Georgia Tech ID
self.studentid
def getstudenthashself value:
return hashlib.shaselfstudentidencodeUTF self.classid valuehexdigest
# TODO:
# Task : Return n being:
# n Number of packets with only SYNACK flags
def synackself:
n
return n
# TODO:
# Task : Return n being:
# n Number of packets with only RST flag
def rstself:
n
return n
# TODO:
# Task : Return dp being:
# d IP Address of the victim
# p Port being attacked
def victimipportself:
dp
return dp
if namemain:
pcapanalysis MITMProject
ipport pcapanalysis.victimipport
synack pcapanalysis.synack
rst pcapanalysis.rst
printIP and Port: ipport
printNumber of SYNACK Packets : synack
printNumber of RST Packets : rst Task
Modify def synackself: function to return n being n int the number of packets on TCPreflection.pcap file that contains ONLY the SYNACK flags
Points:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
