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 module to scan port scripts

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

Share

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

Editor to share with you how to use the python-nmap module to scan the port script, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

PortScan

Port scan

Project address: https://github.com/sgjr/portScan

Instructions for use

Nmap command and python-nmap module need to be installed before use.

Yum install nmappip install python-nmap usage Usage: portScan.py [Options] Options:-- version show program's version number and exit-h,-- help show this help message and exit-H SCANHOST,-- host=SCANHOST The hosts will be scan-p SCANPORT,-- port=SCANPORT The ports will be scan usage example

1.python portScan.py-H 127.0.0.1-p 3306

-127.0.0.1-127.0.0.1 tcp/3306 open

2.python portScan.py-H 127.0.0.1-p 3306-3308

-127.0.0.1-127.0.0.1 tcp/3306 open127.0.0.1 tcp/3307 open127.0.0.1 tcp/3308 closed

3.python portScan.py-H 127.0.0.1-p 3306p3309

-127.0.0.1-127.0.0.1 tcp/3306 open127.0.0.1 tcp/3309 closed

4.python portScan.py-H 127.0.0.1-2-p 3306-3308

-127.0.0.1-127.0.0.1 tcp/3306 open127.0.0.1 tcp/3307 open127.0.0.1 tcp/3308 closed-127.0.0.2-127.0.0.2 tcp/3306 open127.0.0.2 tcp/3307 open127.0.0.2 tcp/3308 closed and above are all the contents of the chapter "how to scan port scripts using the python-nmap module" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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: 0

*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