Okay so the network is setup.
Now let's use this python script.
Basically what this python script does is it imports pi shock.
So I'm gonna run Python 3 run a script that imports pi shock creates a variable called Capture that
calls this a life capture option in PI shock and captures traffic directly from Ethan at zero.
Now there's actually a fantastic application that you can use through your console when checking things
in Python.
And that's a python I Python is a nice interactive shell for Python rather than having to use an IDC
or integrated development environment on a gooey.
You can do something similar directly through the console.
Now I'm going to connect the boon to client back to the ether switch so that this installs properly
so as a three install Python
and that's if I can spell right looks right
so that's installed.
So let's see what we get when we run a Python 3.
Notice we are running Python three top five.
I made a mistake earlier of installing Python for Python 2 not 4.
So I want to run I Python 3 because I want to use Python 3 here not Python 2.
So I Python 3 runs Python 3 to find the T and gives us a nice interactive enhanced Python interface.
So what I'll do actually is move this connection back to the aether switch.
This is just a problem in Jena 3 if I try and download software through the net cloud via the Cisco
switch.
It's extremely slow so I want to connect directly to the ether switch module ingenious three.
Okay so going back to our script import pi shock.
Notice that works and then I can say capture equals pi shock and notice what happens when I press tab
I get a lot of options here.
Capture config file capture life capture t shock packet etc..
So if I say live and press tab.
Notice all the options were available to me and now I can specify my interface something like that and
then I could write code or simply paste it in notice it's nice and color coded so let's say if I was
P.F. and package
print the 0 SPF password and I'll press enter again.
Now that's actually running.
So it should pick up any 0 SPF passwords.
Notice the 0 SPF password is 0 SPF pos if I go on to the router and I change the password at the moment
it's configured as 0 SPF POS on this interface but I could change that so once again on the interface
ip SPF authentication key Cisco.
We should see that the password changes to Cisco dynamically in our script and there you go.
Notice it's done that here.
Now this is through an interactive shell.
You may not want to do it that way.
Now this is again an issue with PI shock.
I'm not going to worry too much about it.
But notice I'm back in Ubuntu now basically in the boot to Shell you name all shows us that we're running
Linux Ubuntu here what I'm gonna do is copy this entire script some to say nano 0 SPF P Y and paste
my script in.
So rather than doing it interactively I've created a script and what that will allow me to do is use
Python 3 0 SPF pi and run the script.
So you could schedule the script to run rather than printing the output to the screen you could save
it to a file as an example.
So back on my rota I'll change the password will clear the OSP off process so it happens quicker so
process yes we should see the output on the on our script unless I've done something wrong.
Let me go onto the interface type IP o SPF authentication key.
Who is P.F. pass clear IPO SPF process.
Okay so some things going wrong there
let me run T short and make sure that we actually seeing captures sometimes in June 3 things can go
wrong.
So notice at the moment we're not seeing any traffic that's a problem so I paying the broadcast address
no traffic is being seen.
That's probably an issue on genus 3.
It's not a script issue it's a problem in my genus 3 network.
That's one of the problems using genus 3 rather than say physical equipment for this.
Okay so I'm still having problems what I'll do is stop my network and start it up again and let's see
if that solves the problem.