#### Beyond Linux® From Scratch (systemd Edition) - Version r13.0-491

### Chapter 16. Networking Utilities

- Prev

  network-manager-applet-1.34.0

- Next

  Traceroute-2.1.6

- Up
- Home

# Nmap-7.99

## Introduction to Nmap

Nmap is a utility for network exploration and security auditing. It supports ping scanning, port scanning and TCP/IP fingerprinting.

### Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

### Package Information

- Download (HTTP): https://nmap.org/dist/nmap-7.99.tar.bz2

- Download MD5 sum: 187db52073c5a1bcbc579e0efbc2c0bd

- Download size: 13 MB

- Estimated disk space required: 190 MB (with tests)

- Estimated build time: 0.5 SBU (Using parallelism=4; with tests)

### Nmap Dependencies

#### Required

build-1.5.0

#### Recommended

### Note

If the PyGObject3 module is not installed, you'd have to skip the command making the build system use the LFS Setuptools installation and then an Internet connection would be needed. The other packages are recommended because if they're not installed, the build process will compile and link against its own (often older) version.

liblinear-250, libpcap-1.10.6, libssh2-1.11.1, Lua-5.4.8, and PyGObject-3.56.2

#### Optional

libdnet and setuptools-gettext (currently useless)

## Installation of Nmap

Make the build system use the Setuptools Python module from LFS instead of downloading a copy from the Internet, and install the Python wheels already created when running the make instead of rebuilding them again on make install:

    sed -ri Makefile.in \
        -e 's#-m build#& --no-isolation#'  \
        -e '/pip install/s#(ZENMAP|NDIFF)DIR\)/#&dist/*.whl#'

Remove a useless dependency on setuptools-gettext:

    sed 's/, "setuptools-gettext"//' -i zenmap/pyproject.toml

fix a packaging error that makes the build fail:

    sed '/py-modules/s/f"/&, "Version"/' -i ndiff/pyproject.toml

Install Nmap by running the following commands:

    ./configure --prefix=/usr &&
    make

If you wish to run the test suite, run the following command:

    sed -e '/import imp/d'                \
        -e 's/^ndiff = .*$/import ndiff/' \
        -i ndiff/ndifftest.py

Tests need a graphical session and to be run as the `root` user. To test the results, issue:

    make check

Now, as the `root` user:

    make install

## Contents

Installed Programs: ncat, ndiff, nmap, nping, zenmap, and 2 symlinks to zenmap: nmapfe and xnmap
Installed Libraries: None
Installed Directories: /usr/lib/python3.14/site-packages/{radialnet,zenmapCore,zenmapGUI,zenmap-7.99.dist-info}, and /usr/share/{ncat,nmap,zenmap}

### Short Descriptions

ncat | is a utility for reading and writing data across networks from the command line
ndiff | is a tool to aid in the comparison of Nmap scans
nmap | is a utility for network exploration and security auditing. It supports ping scanning, port scanning and TCP/IP fingerprinting
nping | is an open-source tool for network packet generation, response analysis and response time measurement
uninstall_ndiff | is a Python script to uninstall ndiff
uninstall_zenmap | is a Python script to uninstall zenmap
zenmap | is a Python based graphical nmap frontend viewer

- Prev

  network-manager-applet-1.34.0

- Next

  Traceroute-2.1.6

- Up
- Home