Hello everyone. So in this video we
are going to see how we can save the
output of a nmap scan into a
file very easily and quickly.
Whenever you run a scan using nmap, you can see the
output onto your terminal but you cannot save it
into a file in case you come back and you want
to say see the output.
although nmap has specific options to
do that and to save the output into a
file which we are going to cover in the further sections, but
for now, we will see a quick
And a easy way to save the output into a file.
As you can see on the screen, I have given the command which is
nmap the target IP address that I
want to scan with a fast scan with a pipe and
I'm going to type grep open. So pipe
means
You want to take the output of the First Command that
is this and give it as an input to the second command.
So I'm going to filter.
Open from the output and then
again a pipe and it says cat which
means I'm going to read the output and I'm
going to save the output in results dot
txt file.
So I will hit enter.
And let's wait for the scan to complete.
As you can see it has completed. Let me see if a
file has been created or Not by reading the file. So
I will just type catresults.txt and
you can see I have got the results of the open ports
from the nmap scan
output.
Perfect.
now
what you can do is you can
instead of using get you can also use
T to save the output into
the file.
This time. Can you see instead of using this?
Brackets double I'm using only single
this means to save the output into
a file and this means to append if
you are using them twice. So this time I'm
going to override the output which was
saved already and I'm going to save the new output using
the single bracket.
As you can see the scan has been completed. Let's try
to read this file.
As you can see the output has been overwritten into
this file. Now. I'm going to append again
the output and let's see the results.
Let me see the result and you can see the scan has
been completed two times and we can see the output has
been pasted twice. So we have appended the
output you can always do this when you
are scanning multiple targets and you want to
retain the output of each Target into that
file. So you can just append the output
into any file using this particular.
Symbol twice. Thank you.