Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the Python-nmap Network scanning and sniffing Toolkit

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article will explain in detail how to use the Python-nmap network scanning and sniffing toolkit. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.

Nmap concept

NMap, also known as the network mapper, was originally a network scanning and sniffing kit under Linux.

Nmap is a network connection scanning software that is used to scan the open network connection end of a network computer. Determine which services are where

Run on these connections and infer which operating system the computer is running on (also known as fingerprint identification). It is a must for network administrators.

One of the software used to evaluate the security of the network system.

Like most tools for network security, nmap is a favorite tool for many hackers and hackers (also known as script boys). System tube

Managers can use nmap to detect unauthorized servers in the work environment, while hackers can use nmap to collect target computers

And plan for attacks.

Nmap is often confused with Nessus software that assesses system vulnerabilities. Nmap avoids secret surveillance of intrusion detection systems

Try not to affect the daily operation of the target system.

Sany uses the Nmap in the matrix, combined with the 32-bit cyclic redundancy detection loophole of SSH1, to invade the power plant energy management system.

Learning is never a personal thing. If you want to have a partner who supervises each other, you need to study python or those who are interested in learning python can reply to Xiaobian "Learning" to get information and study together.

Nmap function

There are three basic functions: first, to detect whether a group of hosts are online; second, to scan the host port to sniff the network services provided; second,

Infer the operating system used by the host. Nmap can be used to scan Lans with only two nodes, up to 500

Multiple nodes. Nmap also allows users to customize scanning techniques. Usually, a simple ping operation using the ICMP protocol is

Can meet general requirements; UDP or TCP ports can also be explored in depth until the operating system used by the host; all test knots

The results can be recorded in different formats for further analysis.

Perform a ping scan and print out the host that responded to the scan without further testing (such as port scan or operating system probe):

Lists only each host on the specified network and does not send any messages to the target host:

Probe the open ports of the target host, specifying a comma-separated list of ports (such as-PS22,23,25,80):

Use UDP ping to probe the host:

The most frequently used scanning option: SYN scan, also known as semi-open scan, which does not open a full TCP connection and executes quickly:

Nmap installation

Take linux Ubuntu16.04 as an example, and finally mainly use python to operate.

Install nmap first

Reinstall python-nmap

After installation, python imports nmap test to verify whether it is successful.

Python operation nmap

1. A simple little case

Create an PortScanner instance and scan ports 20-443 of the IP 114.114.114.114.

The format of the return is as follows:

two。 Built-in method:

You can also print out simple information.

On how to use the Python-nmap network scanning and sniffing toolkit to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 303

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report