Jump to content
  • 0
latest-release

New Python3 Nmap binding python3-nmap

Question

Nmap is among the most popular old pentesting tools out there used by many pentesters. It is initially written in C and other scripting languages.

Many scripting languages are used in pentesting and so there is a need to automate a lot of common pentestings tasks for example port scanning

and service detection which nmap offers.  Python being among the pentestings scripting languages out there, it has binding for nmap one which was

python-nmap which is very famous. When we were building and online Pentest site. We needed a simple tool and so we wrote out new python3-nmap
which is very easy to use. for example

 

$ pip3 install python3-nmap

In nmap to scan for top ports you do something like this

nmap nmmapper.com --top-ports 10

But in this python3 script we do something like this

import nmap3
nmap = nmap3.Nmap()
results = nmap.scan_top_ports("192.168.178.1")
# And you would get your results in json

In nmap to perform OS detection you do something like this

nmap -O nmmapper.com

But in this python3 script

import nmap3
nmap = nmap3.Nmap()
os_results = nmap.nmap_os_detection("192.168.178.2") # MOST BE ROOT


There is more to this script. From the beginning we want something very simple to use which could make automating nmap scans in python

very easy. We developed this tool when extending our Online Nmap scan and we decided to make it public.

Hope this tool is help full.

https://pypi.org/project/python3-nmap/

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...