My SQL server discovery on LAN by listening port (Inno Setup)

前端 未结 2 1753
春和景丽
春和景丽 2021-01-07 07:31

I need to search for an IP address with Listening Port to look up for others PC on LAN (try to discovery MySQL server) and get the results I

2条回答
  •  灰色年华
    2021-01-07 08:01

    My go-to for checking open ports is the Nmap program.

    An example command to probe address 192.168.200.133 on TCP port 3306 would be this:

    nmap -sT -sV -Pn -n -p 3306 192.168.200.133
    

    You can also scan an entire subnet by giving a CIDR range instead of an IP. As example, to scan for MySQL instances (TCP port 3306) on 192.168.200.1 - 192.168.200.254, you could do:

    nmap -sT -sV -Pn -n -p 3306 192.168.200.0/24
    

    ^^ These examples were taken straight from https://securityblog.gr/1549/discover-open-mysql-ports/

    Nmap is very commonly used on Unix/Linux, but has been ported to Windows, first in year 2000, currently supported on Win 7 or newer (including Server 2008). See https://nmap.org/book/inst-windows.html

提交回复
热议问题