Description:
Create a program called extractIP.py which will read from a file called wireShark.txt and extract all the IP addresses which can be of the format:
1,2 or 3 digits. 1, 2 or 3 digits.1, 2, or 3 digits. 1,2,3 digits Here are some examples of valid IPv4 addresses:
10.0.0.1, 12.123.123.123, 126.255.255.254, 191.255.255.254,
192.168.1.1, 239.255.255.255
And you will output them to another file called IPAddresses.txt , one per line, listing source and destination.
Example:
Source Destination
12.123.123.123 123.123.123.123
Requirements:
• You will read from a file called wireShark.txt which will be located in the same directory as your code
• You will write to a file called IPAddresses.txt which will be located in the same directory as your code
• All files will be opened and closed correctly.
• You will not use regex to parse the file. Instead, you will check the characters individually
• Your loops will be structured correctly.
• You will use one or more functions which will take a parameter or more, and return a value
• You will use lists
• You will use the split function
• You will write a function called CheckLine(currentLine) which will check if currentline is of the format:
No. Time Source Destination Protocol Length Info
Once you have identified this particular line, you will know that the following line has the IP addresses for source and destination in the second and third elements.
1 0.000000 192.168.1.180 239.255.255.250 SSDP 372 NOTIFY * HTTP/1.1
• Your functions and main code will be in separate sections of your program.
• Your IP addresses will be formatted in IPv4 format, i.e. 1, 2 or 3 digits .1, 2 or 3 digits.1,2 or 3 digits. 1,2,3 digits
• It is ok to reuse the code you wrote for past homework including homework 4.
Example:
File wireShark.txt was opened. File IPAddress.txt was opened. File IPAddress.txt was closed. File wireShark.txt was closed.
wireShark.txt should contain the following IP Addresses:
Source Destination
192.168.1.180 239.255.255.250
192.168.1.51 146.20.112.65
192.168.1.51 146.20.112.65
146.20.112.65 192.168.1.51
146.20.112.65 192.168.1.51
146.20.112.65 192.168.1.51
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme