#  Nmap-API | Uses Python3.10, Debian, python-Nmap, And Flask Framework To Create A Nmap API

**URL:** <https://onehack.st/t/nmap-api-uses-python3-10-debian-python-nmap-and-flask-framework-to-create-a-nmap-api/238738>\
**Category:** Tools & Scripts\
**Tags:** tools, freebies, tips-tricks\
**Created:** [April 21, 2023, 12:11am UTC](https://onehack.st/t/nmap-api-uses-python3-10-debian-python-nmap-and-flask-framework-to-create-a-nmap-api/238738 "2023-04-21T00:11:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WhiteHat](https://onehack.st/user_avatar/onehack.st/whitehat/32/162514_2.png) [@WhiteHat](https://onehack.st/u/WhiteHat)\
**Post date:** [April 21, 2023, 12:11am UTC](https://onehack.st/t/nmap-api-uses-python3-10-debian-python-nmap-and-flask-framework-to-create-a-nmap-api/238738/1 "2023-04-21T00:11:42Z")

</div>

![image](https://onehack.st/uploads/default/original/3X/0/1/01f73d194ff1c43941e5e58af0162363d69e3280.jpeg)

# Nmap API

Uses python3.10, Debian, python-Nmap, and flask framework to create a Nmap API that can do scans with a good speed online and is easy to deploy.

This is a implementation for our college PCL project which is still under development and constantly updating.

## API Reference

#### Get all items

GET /api/p1/{username}:{password}/{target} GET /api/p2/{username}:{password}/{target} GET /api/p3/{username}:{password}/{target} GET /api/p4/{username}:{password}/{target} GET /api/p5/{username}:{password}/{target}

| Parameter | Type | Description |
| --- | --- | --- |
| `username` | `string` | **Required**. username of the current user |
| `password` | `string` | **Required**. current user password |
| `target` | `string` | **Required**. The target Hostname and IP |

#### Get item

GET /api/p1/ GET /api/p2/ GET /api/p3/ GET /api/p4/ GET /api/p5/

| Parameter | Return data | Description | Nmap Command |
| --- | --- | --- | --- |
| `p1` | `json` | Effective Scan | `-Pn -sV -T4 -O -F` |
| `p2` | `json` | Simple Scan | `-Pn -T4 -A -v` |
| `p3` | `json` | Low Power Scan | `-Pn -sS -sU -T4 -A -v` |
| `p4` | `json` | Partial Intense Scan | `-Pn -p- -T4 -A -v` |
| `p5` | `json` | Complete Intense Scan | `-Pn -sS -sU -T4 -A -PE -PP -PS80,443 -PA3389 -PU40125 -PY -g 53 --script=vuln` |

#### Auth and User management

POST /adduser/{admin-username}:{admin-passwd}/{id}/{username}/{passwd} POST /deluser/{admin-username}:{admin-passwd}/{t-username}/{t-userpass} POST /altusername/{admin-username}:{admin-passwd}/{t-user-id}/{new-t-username} POST /altuserid/{admin-username}:{admin-passwd}/{new-t-user-id}/{t-username} POST /altpassword/{admin-username}:{admin-passwd}/{t-username}/{new-t-userpass}

- make sure you use the ADMIN CREDS MENTIONED BELOW

| Parameter | Type | Description |
| --- | --- | --- |
| `admin-username` | `String` | Admin username |
| `admin-passwd` | `String` | Admin password |
| `id` | `String` | Id for newly added user |
| `username` | `String` | Username of the newly added user |
| `passwd` | `String` | Password of the newly added user |
| `t-username` | `String` | Target username |
| `t-user-id` | `String` | Target userID |
| `t-userpass` | `String` | Target users password |
| `new-t-username` | `String` | New username for the target |
| `new-t-user-id` | `String` | New userID for the target |
| `new-t-userpass` | `String` | New password for the target |

**DEFAULT**  **CREDENTIALS**

`ADMINISTRATOR : zAp6_oO~t428)@,`

## GitHub:

> **[GitHub - morpheuslord/Nmap-API: Uses python3.10, Debian, python-Nmap, OpenaAI, and...](https://github.com/morpheuslord/Nmap-API)**
>
> Uses python3.10, Debian, python-Nmap, OpenaAI, and flask framework to create a Nmap API that can do scans with a good speed online and is easy to deploy. This is a implementation for our college PCL project which is still under development and constantly updating.
