Answered step by step
Verified Expert Solution
Question
1 Approved Answer
# 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:
# 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
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started