Today, we will talk about the command and control meetings, this command is very useful and powerful
at finding strength in any output file.
Let's take an example on how to use this utility.
I have a file here called Stuff.
This file.
We created the first video.
Let's use the cab command to see the content of this file.
From the content of the file, we see there is a user and password, but what if this file has tons
of information inside and we only want to look for a specific keyword or a string?
Now it's time to use the grep command, followed by any argument, followed by a string you want to
find.
And finally, the location of the file you want to search.
Let's try.
We will use the grid and then password as a string we want to find and then stop.
As you can see, it filtered the output and now we only see the line which contains our strength.
Notice we can add the dash dash color to end to the end of the command to give a nice color on our screen.
Try to again.
But what if we don't know the name of the file and we don't know where to look for in this case, we
use the dash our argument and it tells the system that we want to find a file recursively.
But first, let's try again using this command.
Noticed I put a dot there because they want to tell the system that I want to look for the same string
in our current directory.
It didn't work.
It expected the file name that we gave it to the directory to look for in order to fix this, we need
to add the Dutch are arguing to tell it that we will use a recursive search.
Let's try again.
Nice, I have created another file inside the PSYOPS directory, which it has another username and password,
can we use the recursive search to find that password?
But we really use the recursive command before and nothing came up.
The reason is the password string in the other file is is simply called past, not password.
And then we search for password.
It didn't show up, but now we can search for only pass and it should show us both things in both files.
Let's first navigate into the PSYOPS directory.
If we use a cab command, we see there's another password here.
Let's go back using the card space dot dot.
We're back to our directory.
Let's search again using the past string instead of password.
As you can see, we find both strength in both files, try to practice the great command as it's very
useful and we will use it and use it a lot later and in all the other videos.
Thank you.
See you in the next video.