PHPackages                             repat/willdurand-nmap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. repat/willdurand-nmap

ActiveLibrary[HTTP &amp; Networking](/categories/http)

repat/willdurand-nmap
=====================

nmap is a PHP wrapper for Nmap, a free security scanner for network exploration. Updated for PHP 7.1

0.9(6y ago)19361MITPHPPHP &gt;=7.1.3

Since Nov 5Pushed 6y ago2 watchersCompare

[ Source](https://github.com/repat/nmap)[ Packagist](https://packagist.org/packages/repat/willdurand-nmap)[ RSS](/packages/repat-willdurand-nmap/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (2)Versions (11)Used By (0)

nmap
====

[](#nmap)

**nmap** is a PHP wrapper for [Nmap](http://nmap.org/), a free security scanner for network exploration.

[![Build Status](https://camo.githubusercontent.com/90f2130eba59619ca1c0e9b500cf1fee7172a6cb4d9cf9febd3118ba005586d1/68747470733a2f2f7472617669732d63692e6f72672f77696c6c647572616e642f6e6d61702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/willdurand/nmap)

> Updated version for symfony/process: ~4.0 | ~5.0 and PHP 7.1+

Usage
-----

[](#usage)

```
$hosts = Nmap::create()->scan([ 'williamdurand.fr' ]);

$ports = $hosts->getOpenPorts();
```

You can specify the ports you want to scan:

```
$nmap = new Nmap();

$nmap->scan([ 'williamdurand.fr' ], [ 21, 22, 80 ]);
```

**OS detection** and **Service Info** are disabled by default, if you want to enable them, use the `enableOsDetection()` and/or `enableServiceInfo()` methods:

```
$nmap
    ->enableOsDetection()
    ->scan([ 'williamdurand.fr' ]);

$nmap
    ->enableServiceInfo()
    ->scan([ 'williamdurand.fr' ]);

// Fluent interface!
$nmap
    ->enableOsDetection()
    ->enableServiceInfo()
    ->scan([ 'williamdurand.fr' ]);
```

Turn the **verbose mode** by using the `enableVerbose()` method:

```
$nmap
    ->enableVerbose()
    ->scan([ 'williamdurand.fr' ]);
```

For some reasons, you might want to disable port scan, that is why **nmap**provides a `disablePortScan()` method:

```
$nmap
    ->disablePortScan()
    ->scan([ 'williamdurand.fr' ]);
```

You can also disable the reverse DNS resolution with `disableReverseDNS()`:

```
$nmap
    ->disableReverseDNS()
    ->scan([ 'williamdurand.fr' ]);
```

You can define the process timeout (default to 60 seconds) with `setTimeout()`:

```
$nmap
    ->setTimeout(120)
    ->scan([ 'williamdurand.fr' ]);
```

Version
-------

[](#version)

0.9

Installation
------------

[](#installation)

The recommended way to install nmap is through [Composer](http://getcomposer.org/):

```
{
    "require": {
        "repat/willdurand-nmap": "^0.8"
    }
}
```

Or:

`composer require repat/willdurand-nmap`

License
-------

[](#license)

nmap is released under the MIT License. See the bundled LICENSE file for details.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~263 days

Recently: every ~291 days

Total

10

Last Release

2196d ago

PHP version history (2 changes)v0.0.1PHP &gt;=5.3.0

0.8.2PHP &gt;=7.1.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/405dab243007488e7e7851422e5864a9312aee36058d60f1e6d623232c4d3131?d=identicon)[repat](/maintainers/repat)

---

Top Contributors

[![willdurand](https://avatars.githubusercontent.com/u/217628?v=4)](https://github.com/willdurand "willdurand (29 commits)")[![repat](https://avatars.githubusercontent.com/u/516807?v=4)](https://github.com/repat "repat (16 commits)")[![Falc](https://avatars.githubusercontent.com/u/246051?v=4)](https://github.com/Falc "Falc (6 commits)")[![matejvelikonja](https://avatars.githubusercontent.com/u/1881087?v=4)](https://github.com/matejvelikonja "matejvelikonja (2 commits)")[![arall](https://avatars.githubusercontent.com/u/1453137?v=4)](https://github.com/arall "arall (1 commits)")[![maidmaid](https://avatars.githubusercontent.com/u/4578773?v=4)](https://github.com/maidmaid "maidmaid (1 commits)")[![mtdavidson](https://avatars.githubusercontent.com/u/201792?v=4)](https://github.com/mtdavidson "mtdavidson (1 commits)")[![Gemorroj](https://avatars.githubusercontent.com/u/885731?v=4)](https://github.com/Gemorroj "Gemorroj (1 commits)")[![clarkstuth](https://avatars.githubusercontent.com/u/1616268?v=4)](https://github.com/clarkstuth "clarkstuth (1 commits)")[![DavidGoodwin](https://avatars.githubusercontent.com/u/203929?v=4)](https://github.com/DavidGoodwin "DavidGoodwin (1 commits)")[![EmmanuelVella](https://avatars.githubusercontent.com/u/663607?v=4)](https://github.com/EmmanuelVella "EmmanuelVella (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/repat-willdurand-nmap/health.svg)

```
[![Health](https://phpackages.com/badges/repat-willdurand-nmap/health.svg)](https://phpackages.com/packages/repat-willdurand-nmap)
```

###  Alternatives

[swoole-bundle/swoole-bundle

Open/Swoole Symfony Bundle

6650.4k](/packages/swoole-bundle-swoole-bundle)[igorw/cgi-http-kernel

Adapter from HttpKernelInterface to CGI.

5912.1k](/packages/igorw-cgi-http-kernel)[pixelfederation/swoole-bundle

Swoole Symfony Bundle

3311.4k](/packages/pixelfederation-swoole-bundle)[abantecart/ups-php

UPS PHP SDK based on OAuth

1815.3k](/packages/abantecart-ups-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
