Book Image

NMAP Essentials

By : David Shaw
Book Image

NMAP Essentials

By: David Shaw

Overview of this book

Table of Contents (17 chapters)
Nmap Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Building Nmap from source


To install Nmap from source, three steps must be taken:

  1. Download the source code.

  2. Compile the code.

  3. Install the compiled tool.

Downloading the code with a tool such as wget is very simple; all we need to do is type wget http://nmap.org/dist/nmap-6.47.tar.bz2 (or whatever is the current version of Nmap).

Once the tool is downloaded, it must be removed from its tarball—or compressed—state. This is done using the tar command by typing tar xvf nmap-6.47.tar.bz2.

At this stage, we now have a new directory filled with Nmap source code. If we change the directory by typing cd nmap-6.47, we are then able to compile this code. For those users that are familiar with installing tools on Linux, the next step will be familiar. We need to ./configure make and sudo make install in order to install Nmap on our system.

The "Nmap dragon" is a famous piece of ASCII art that is displayed during the ./configure step of Nmap source code compilation.

Once Nmap is successfully installed, you can verify that it works—and see which options it was compiled with—by typing nmap -V. We'll cover the different flags that you can pass to Nmap in the subsequent chapters.