Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Create a text file and name it as test.txt using fopen library function. 2. Write the following ethreal trace to the text file using

1. Create a text file and name it as test.txt using fopen library function.

2. Write the following ethreal trace to the text file using fprintf library function.

3. Finally, open the terminal and run either grep or wc command using the test.txt and answer the following question:

  1. Which ip address occurs most frequently in that test.txt file? How did you find it?
  2. Which protocol occurs most frequently in that test.txt file? How did you find it?

Please attach the screenshots of your code and explanations of the above 1,2,3 questionsimage text in transcribed

Lab-6 (You can take this lab report starting Thursday, March 4 at 10:00 AM) Lab Report due Thursday, March 4 at 5:00 PM (Included in final grade) You will create a text file and then validate the content of the files by using grep, wc commands. 1. Create a text file and name it as test.txt using fopen library function. Marks 2. Write the following ethreal trace to the text file using fprintf library function. Marks 20 60 Eile Edit View Go Capture Analyze Statistics Help El xes Filter: No.. Time Source 0. QURROU 192.168.1.2 2 0.017427 173. 199. 38. 122 3 0.017515 192.168.1.213 4 0.033649 173.199.38.122 5 0.041488 192.168.1.213 6 0.052573 173.199.38.122 7 0.057528 68.64.25.147 8 0.057529 68.64.25.147 9 0.072850 173.199.38.122 10 0.077788 192.168.1. 213 11 0.081116 68.64.25.147 12 0.093665 173.199.38.122 13 0.102314 192.168.1. 213 14 0.119985 192.168.1. 213 15 0.122071 192.168.1.213 Destination 18.199.35.1222 192.168.1. 213 173.199.38.122 192.168.1. 213 173.199.38.122 192.168.1. 213 192.168.1.213 192.168.1. 213 192.168.1. 213 173.199.38.122 192.168.1. 213 192.168.1. 213 173.199.38.122 173.199.38.122 68. 64.25.147 VS X Expression. Clear Apply Protocol Info LOF Source port: 1978 Destination port: 185 UDP Source port: 1853 Destination port: 59218 UDP Source port: 59218 Destination port: 1853 UDP Source port: 1853 Destination port: 59218 UDP Source port: 59218 Destination port: 1853 UDP Source port: 1853 Destination port: 59218 TCP https > 59418 [ACK] Seq-0 Ack-win-5488 Len- TCP https> 59418 (ACK] Seq-0 Ack-657 win-5488 Len- UDP Source port: 1853 Destination port: 59218 UDP Source port: 59218 Destination port: 1853 SSL Continuation Data UDP Source port: 1853 Destination port: 59218 Source port: 59218 Destination port: 1853 UDP Source port: 59218 Destination port: 1853 TCP 5941R > hrns TACK1 SP0-657 Ack-1 38 win-513 In UDP For example, the test.txt file will store the above information as follows: 1 0.00000 192.168.1.213 173.199.38.122 UDP Source port: 59218 Destination port: 1853 150.122071 192.168.1.213 68.64.25.147 TCP 59418> https [ACK] Seq=657 Ack = 138 3. Finally, open the terminal and run either grep or wc command using the test.txt and answer the following question: Marks 20 a. Which ip address occurs most frequently in that test.txt file? How did you find it? b. Which protocol occurs most frequently in that test.txt file? How did you find it? Please attach the screenshots of your code and explanations of the above 1,2,3 questions and then submit a *.doc or *.pdf file by Thursday March-4-21 5PM

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

what does contract solver allow us to do

Answered: 1 week ago

Question

=+How might these stem from country and regional cultures?

Answered: 1 week ago