You have learned how to find devices over the network so to do this let's create a new file
to.
It would be called Capturing packets.
Let's create them in function.
Okay so the start of this program will be the same.
So I'm going to copy this file and paste it here.
So now we have a list of devices that we can work with.
The next thing we need to do is we need to check if this device is present or not.
So to do this what we can do is we can trade over this list.
So let's keep it to a loop so we can say for the moment ignore the index device equals two range devices.
So now we are going to trade or the devices.
The next thing we need to do is we need to check if the device is actually the interface that you want
to capture it on.
So to do this we have to do is let's create a constant here
variable and then create an interface.
So let's call it we want to capture over the interface called EDI edge.
You do.
So now this is the interface that we want to use to capture packets the next variable we will define
these guarded device phone calls to files.
So if no device is found we can say that this is false this very well and by default we are setting
it as follows.
So here we will check if this device name is equal to the same device that we haven't declared earlier.
So let's say if device the name equals equals to interface we can say that device has been found.
So we can set this device found we're able to through new eyes found equals to true.
So if our program finds the interface which is the same interface as ADHD you know we can say that we
have successfully found a device.
Once we have this device found we can proceed further.
And then we can check if the device found.
Sorry if not device found.
So if we don't find any device we can simply exit our program with a log that panic
and then we can print and others have said that.
Let's say device smartphone
device is not found.
Instead of bending Kellen we can use bending F and then we can set the device name as well.
So it will be sent us and just remove this errors just see interface.
So now we have checked the port data is checking in here.
So in next lecture we will proceed further.