Question
I NEED HELP WITH PART 4 OF THE ASSIGNMENT ; THE CODE BEFORE IS FOR PART 1 OF THE ASSIGNMENT WHICH IS THIS : Directions
I NEED HELP WITH PART 4 OF THE ASSIGNMENT ; THE CODE BEFORE IS FOR PART 1 OF THE ASSIGNMENT WHICH IS THIS :
Directions
Complete the following using Python and your chosen IDE. Take screenshots of the code and its output where specified and paste them into in a well-labeled Word document for submission.
Important Note: For this code to work, you must run Thonny or any other IDE in Administrator Mode or run from the command prompt in Administrator Mode.
Part 1: Capture Network Traffic
Write Python code that captures activity your current computer network and displays the output in non-human readable form (exactly as the output comes from the network traffic monitor). Save the Python code as Non-human_Readable.py.
Take a screenshot of code and its output and paste it into a word document.
CODE USED:
Code to be updated:
Code:
#!/usr/bin/python
import pcapy
devs=pcapy.findalldevs() inf=devs[0]
cap=pcapy.open_live(inf, 65536, 1, 0)
count=1 while count: (header,payload)=cap.next() print count, " ",header," " print payload, " " count+=1
Output:
-------------------------------------------------------------------------------------------------------------------------------------
Part 4: Converting and Logging Network Binary Data to Human Readable Format
Do the following:
- Update the following python code to convert the output to human-readable format.
- Update the code to save the output to a log file called networktraffic.log.
Take a screenshot of the code and its output.
Submit the Word document with screenshots
Activities Terminal Fri 12:19 yeshwanthyeshwanth-Lenovo Ideapad 320-15ISK: File Edit View Search Terminal Help veshwanthaveshwanth - Lenovo Ideapad 320-15ISK-S sudo chmod +x Non-hunan Readable.py sudo password for yeshwanth: yeshwanthyeshwanth-Lenovo-ideapad-320-15ISK:-$ sudo ./Non-human_Readable.py
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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