logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Tracy BartramEnglish
(5/5)

745 Answers

Hire Me
expert
Barbara ElseMathematics
(5/5)

785 Answers

Hire Me
expert
Sohail AliScience
(5/5)

842 Answers

Hire Me
expert
Rex HuntGeneral article writing
(5/5)

886 Answers

Hire Me
Python Programming
(5/5)

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:

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

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

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

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

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme