精华内容
下载资源
问答
  • python调用nmap扫描局域网存活主机和端口 文章目录python调用nmap扫描局域网存活主机和端口操作环境运行代码关键代码1. nm.scan(ip,port,args)2. 字典的解析运行结果参考文章 操作环境 python2 sudo apt install ...

    python调用nmap扫描局域网存活主机和端口

    操作环境

    python2

    sudo apt install nmap

    pip install nmap json

    运行代码

    sudo python2 scan.py

    代码经过调试,使用root可直接运行

    #!python2 
    # scan.py must be sudo to run
    import nmap
    import json
    
    nm = nmap.PortScanner()
    iprange = raw_input("input ip range(eg:192.168.224.0/24)>")
    port = raw_input("input target port(eg:8888)>")
    if not port:
    	port = 8888
    if not iprange:
        iprange = "192.168.224.0/24"
    print("scan ip range " + iprange)
    a = nm.scan(iprange, str(port), '-sS -O')
    a = a.get("scan")
    
    target = 0
    for key, value in a.items():
        if value.get("tcp").get(port).get("state") == "open":
            print "target ip maybe :" + key
            print "some information"
            print value
            target = target + 1
    
    if target == 0:
        print "no target machine detectd...."
    

    关键代码

    1. nm.scan(ip,port,args)

    请查阅参考文档一,有详细的解释

    返回的结果a形式如下:a是个字典

    {'nmap': {'scanstats': {'uphosts': '4', 'timestr': 'Sat Jun 27 13:29:19 2020', 'downhosts': '252', 'totalhosts': '256', 'elapsed': '9.86'}, 'scaninfo': {'tcp': {'services': '8888', 'method': 'syn'}}, 'command_line': 'nmap -oX - -p 8888 -sS -O 192.168.224.0/24'}, 'scan': {'192.168.224.132': {'status': {'state': 'up', 'reason': 'localhost-response'}, 'uptime': {'seconds': '1999559', 'lastboot': 'Thu Jun  4 10:03:20 2020'}, 'vendor': {}, 'addresses': {'ipv4': '192.168.224.132'}, 'tcp': {8888: {'product': '', 'state': 'open', 'version': '', 'name': 'sun-answerbook', 'conf': '3', 'extrainfo': '', 'reason': 'syn-ack', 'cpe': ''}}, 'hostnames': [{'type': '', 'name': ''}], 'osmatch': [{'osclass': [{'osfamily': 'Linux', 'vendor': 'Linux', 'cpe': ['cpe:/o:linux:linux_kernel:2.6.32'], 'type': 'general purpose', 'osgen': '2.6.X', 'accuracy': '100'}], 'line': '50174', 'name': 'Linux 2.6.32', 'accuracy': '100'}], 'portused': [{'state': 'open', 'portid': '8888', 'proto': 'tcp'}, {'state': 'closed', 'portid': '34334', 'proto': 'udp'}]}, '192.168.224.1': {'status': {'state': 'up', 'reason': 'arp-response'}, 'vendor': {'00:50:56:C0:00:08': 'VMware'}, 'addresses': {'mac': '00:50:56:C0:00:08', 'ipv4': '192.168.224.1'}, 'tcp': {8888: {'product': '', 'state': 'filtered', 'version': '', 'name': 'sun-answerbook', 'conf': '3', 'extrainfo': '', 'reason': 'no-response', 'cpe': ''}}, 'hostnames': [{'type': '', 'name': ''}], 'osmatch': [], 'portused': []}, '192.168.224.2': {'status': {'state': 'up', 'reason': 'arp-response'}, 'vendor': {'00:50:56:E8:9C:1A': 'VMware'}, 'addresses': {'mac': '00:50:56:E8:9C:1A', 'ipv4': '192.168.224.2'}, 'tcp': {8888: {'product': '', 'state': 'closed', 'version': '', 'name': 'sun-answerbook', 'conf': '3', 'extrainfo': '', 'reason': 'reset', 'cpe': ''}}, 'hostnames': [{'type': '', 'name': ''}], 'osmatch': [{'osclass': [{'osfamily': 'embedded', 'vendor': 'Aethra', 'cpe': ['cpe:/h:aethra:starvoice_1042'], 'type': 'broadband router', 'osgen': None, 'accuracy': '91'}], 'line': '1615', 'name': 'Aethra Starvoice 1042 ADSL router', 'accuracy': '91'}, {'osclass': [{'osfamily': 'AOS', 'vendor': 'APC', 'cpe': ['cpe:/o:apc:aos:5'], 'type': 'power-device', 'osgen': '5.X', 'accuracy': '91'}], 'line': '2920', 'name': 'APC AOS 5', 'accuracy': '91'}, {'osclass': [{'osfamily': 'SuperDOS', 'vendor': 'Bluebird', 'cpe': ['cpe:/o:bluebird:superdos'], 'type': 'general purpose', 'osgen': None, 'accuracy': '91'}], 'line': '9384', 'name': 'Bluebird SuperDOS', 'accuracy': '91'}, {'osclass': [{'osfamily': 'embedded', 'vendor': 'Brother', 'cpe': ['cpe:/h:brother:nc-130h'], 'type': 'print server', 'osgen': None, 'accuracy': '91'}], 'line': '9587', 'name': 'Brother NC-130h print server', 'accuracy': '91'}, {'osclass': [{'osfamily': 'embedded', 'vendor': 'Brother', 'cpe': ['cpe:/h:brother:hl-1870n'], 'type': 'printer', 'osgen': None, 'accuracy': '91'}], 'line': '9767', 'name': 'Brother HL-1870N printer', 'accuracy': '91'}, {'osclass': [{'osfamily': 'embedded', 'vendor': 'Brother', 'cpe': ['cpe:/h:brother:hl-2070n', 'cpe:/h:brother:mfc-5460cn'], 'type': 'printer', 'osgen': None, 'accuracy': '91'}], 'line': '9786', 'name': 'Brother HL-2070N or MFC-5460CN printer', 'accuracy': '91'}, {'osclass': [{'osfamily': 'embedded', 'vendor': 'Brother', 'cpe': ['cpe:/h:brother:hl-2070n'], 'type': 'printer', 'osgen': None, 'accuracy': '91'}], 'line': '9805', 'name': 'Brother HL-2070N printer', 'accuracy': '91'}, {'osclass': [{'osfamily': 'embedded', 'vendor': 'Brother', 'cpe': ['cpe:/h:brother:hl-5070n'], 'type': 'printer', 'osgen': None, 'accuracy': '91'}], 'line': '10112', 'name': 'Brother HL-5070N printer', 'accuracy': '91'}, {'osclass': [{'osfamily': 'embedded', 'vendor': 'Brother', 'cpe': ['cpe:/h:brother:mfc-7820n'], 'type': 'printer', 'osgen': None, 'accuracy': '91'}], 'line': '10480', 'name': 'Brother MFC-7820N printer', 'accuracy': '91'}, {'osclass': [{'osfamily': 'embedded', 'vendor': 'Brother', 'cpe': ['cpe:/h:brother:mfc-9420cn'], 'type': 'printer', 'osgen': None, 'accuracy': '91'}], 'line': '10595', 'name': 'Brother MFC-9420CN printer', 'accuracy': '91'}], 'portused': [{'state': 'closed', 'portid': '8888', 'proto': 'tcp'}]}, '192.168.224.254': {'status': {'state': 'up', 'reason': 'arp-response'}, 'vendor': {'00:50:56:F5:F1:1D': 'VMware'}, 'addresses': {'mac': '00:50:56:F5:F1:1D', 'ipv4': '192.168.224.254'}, 'tcp': {8888: {'product': '', 'state': 'filtered', 'version': '', 'name': 'sun-answerbook', 'conf': '3', 'extrainfo': '', 'reason': 'no-response', 'cpe': ''}}, 'hostnames': [{'type': '', 'name': ''}], 'osmatch': [], 'portused': []}}}
    

    2. 字典的解析

    为了更好地测试,最好使用jupyter或控制台去单步执行,去使用dict的get方法去逐步解析,防止错误

    for key, value in a.items():
        if value.get("tcp").get(port).get("state") == "open":
            print "target ip maybe :" + key
            print "some information"
            print value
            target = target + 1
    

    运行结果

    zhao@zhao:~/Desktop/project$ sudo python scan.py
    [sudo] password for zhao:
    input ip range(eg:192.168.224.0/24)>
    input target port(eg:8888)>
    scan ip range 192.168.224.0/24
    target ip maybe :192.168.224.132
    some information
    {'status': {'state': 'up', 'reason': 'localhost-response'}, 'uptime': {'seconds': '2001774', 'lastboot': 'Thu Jun  4 10:03:22 2020'}, 'vendor': {}, 'addresses': {'ipv4': '192.168.224.132'}, 'tcp': {8888: {'product': '', 'state': 'open', 'version': '', 'name': 'sun-answerbook', 'conf': '3', 'extrainfo': '', 'reason': 'syn-ack', 'cpe': ''}}, 'hostnames': [{'type': '', 'name': ''}], 'osmatch': [{'osclass': [{'osfamily': 'Linux', 'vendor': 'Linux', 'cpe': ['cpe:/o:linux:linux_kernel:2.6.32'], 'type': 'general purpose', 'osgen': '2.6.X', 'accuracy': '100'}], 'line': '50174', 'name': 'Linux 2.6.32', 'accuracy': '100'}], 'portused': [{'state': 'open', 'portid': '8888', 'proto': 'tcp'}, {'state': 'closed', 'portid': '30317', 'proto': 'udp'}]}
    
    

    参考文章

    1. Python中python-nmap模块的使用

    2. nmap命令扫描存活主机

    展开全文
  • 使用环境:Raspberry 3b+ +netifaces+python-nmap+nmap 调用netifaces自动获取ip地址: def get_gateways(): return netifaces.gateways()['default'][netifaces.AF_INET][0] 将ip地址生成一个网段中所有ip...

    使用环境:Raspberry 3b+ +netifaces+python-nmap+nmap

    调用netifaces自动获取ip地址:

    def get_gateways():
        return netifaces.gateways()['default'][netifaces.AF_INET][0]

    将ip地址生成一个网段中所有ip地址的列表:

    def get_ip_lists(ip):
        ip_lists = []
        for i in range(1, 256):
            ip_lists.append('{}{}'.format(ip[:-1], i))
        return ip_lists

    主要实现代码及数据分割:

    def main(ip=None):
        ip=get_gateways()
        ip_lists=get_ip_lists(ip)
        nmScan,temp_ip_lists,hosts = nmap.PortScanner(),[],ip[:-1]+'0/24'
        ret = nmScan.scan(hosts=hosts, arguments='-sP')
        print('扫描时间:'+ret['nmap']['scanstats']['timestr']+'\n命令参数:'+ret['nmap']['command_line'])
        for ip in ip_lists:
            print('ip地址:'+ip+'')
            if ip not in ret['scan']:
                temp_ip_lists.append(ip)
                print('扫描超时')
            else:print('已扫描到主机,主机名:'+ret['scan'][ip]['hostnames'][0]['name'])
        print(str(hosts) +' 网络中的存活主机:')
        for ip in temp_ip_lists:ip_lists.remove(ip)
        for ip in ip_lists:print(ip)

    完整代码:

    #!/usr/bin/python
    #_*_ coding:utf8 _*_
    import netifaces,nmap
    
    def get_gateways():
        return netifaces.gateways()['default'][netifaces.AF_INET][0]
    
    def get_ip_lists(ip):
        ip_lists = []
        for i in range(1, 256):
            ip_lists.append('{}{}'.format(ip[:-1], i))
        return ip_lists
    
    def main(ip=None):
        ip=get_gateways()
        ip_lists=get_ip_lists(ip)
        nmScan,temp_ip_lists,hosts = nmap.PortScanner(),[],ip[:-1]+'0/24'
        ret = nmScan.scan(hosts=hosts, arguments='-sP')
        print('扫描时间:'+ret['nmap']['scanstats']['timestr']+'\n命令参数:'+ret['nmap']['command_line'])
        for ip in ip_lists:
            print('ip地址:'+ip+'')
            if ip not in ret['scan']:
                temp_ip_lists.append(ip)
                print('扫描超时')
            else:print('已扫描到主机,主机名:'+ret['scan'][ip]['hostnames'][0]['name'])
        print(str(hosts) +' 网络中的存活主机:')
        for ip in temp_ip_lists:ip_lists.remove(ip)
        for ip in ip_lists:print(ip)
    
    if __name__ == '__main__':
        main()

    实验截图:

    转载于:https://www.cnblogs.com/canmeng/p/9681729.html

    展开全文
  • nmap查看局域网存活的主机

    千次阅读 2019-10-03 21:06:16
    nmap是一个非常强大的扫描工具一个著名的扫描大王 用nmap进行局域网扫描 先用查看一下ip段 ifconfig 然后用 nmap -sP 192.168.43.0/24 -sP是ping扫描,24是扫描到255 ...

    nmap是一个非常强大的扫描工具一个著名的扫描大王
    用nmap进行局域网扫描
    先用查看一下ip段

    ifconfig
    

    在这里插入图片描述
    然后用

    nmap -sP 192.168.43.0/24
    

    -sP是ping扫描,24是扫描到255
    在这里插入图片描述

    展开全文
  • Kali Linux 使用nmap进行局域网扫描

    万次阅读 2017-07-21 11:52:58
    ping扫描扫描192.168.0.0/24网段上有哪些主机是存活的;   [root@laolinux ~]# nmap -sP 192.168.0.0/24 Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2009-04-25 06:59 CST Host laolinux ...
    ping扫描:扫描192.168.0.0/24网段上有哪些主机是存活的;
    
     
    [root@laolinux ~]# nmap -sP 192.168.0.0/24
    Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2009-04-25 06:59 CST
    Host laolinux (192.168.0.3) appears to be up.
    Host 192.168.0.20 appears to be up.
    MAC Address: 00:1E:4F:CD:C6:0E (Unknown)
    Host 192.168.0.108 appears to be up.
    MAC Address: 00:E3:74:27:05:B7 (Unknown)
    Host 192.168.0.109 appears to be up.
    MAC Address: 00:E0:E4:A6:14:6F (Fanuc Robotics North America)
    Host 192.168.0.111 appears to be up.
    MAC Address: 00:E0:E4:A6:1C:91 (Fanuc Robotics North America)
    Host 192.168.0.114 appears to be up.
    MAC Address: 00:11:1A:35:38:65 (Motorola BCS)
    Host 192.168.0.118 appears to be up.
    MAC Address: 00:E0:2A:51:AC:5B (Tandberg Television AS)
    Host 192.168.0.119 appears to be up.
    MAC Address: 00:EA:E5:C1:21:D6 (Unknown)
    Host 192.168.0.124 appears to be up.
    MAC Address: 00:E0:4C:39:05:81 (Realtek Semiconductor)
    Host 192.168.0.127 appears to be up.
    MAC Address: 00:11:1A:35:38:62 (Motorola BCS)
    Host 192.168.0.128 appears to be up.
    MAC Address: 00:E0:E4:A6:1C:96 (Fanuc Robotics North America)
    Host 192.168.0.134 appears to be up.
    MAC Address: 00:E0:2A:51:AC:5F (Tandberg Television AS)
    Host 192.168.0.135 appears to be up.
    MAC Address: 00:11:1A:35:38:60 (Motorola BCS)
    Host 192.168.0.137 appears to be up.
    MAC Address: 00:1F:06:D6:3E:BA (Unknown)
    Host 192.168.0.139 appears to be up.
    MAC Address: 00:E0:E4:A6:1C:92 (Fanuc Robotics North America)
    Host 192.168.0.140 appears to be up.
    MAC Address: 00:1F:1A:39:1B:8D (Unknown)
    Host 192.168.0.155 appears to be up.
    MAC Address: 00:1C:23:4C:DB:A0 (Unknown)
    Host 192.168.0.211 appears to be up.
    MAC Address: 00:1D:72:98:A2:8C (Unknown)
    Host 192.168.0.220 appears to be up.
    MAC Address: 00:40:45:20:8C:93 (Twinhead)
    Host 192.168.0.221 appears to be up.
    MAC Address: 00:09:6B:50:71:26 (IBM)
    Nmap finished: 256 IP addresses (20 hosts up) scanned in 3.818 seconds
     
    2、端口扫描:扫描192.168.0.3这台主机开放了哪些端口;
     
    [root@laolinux ~]# nmap -sT 192.168.0.3
    Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2009-04-25 07:02 CST
    Interesting ports on laolinux (192.168.0.3):
    Not shown: 1667 closed ports
    PORT      STATE SERVICE
    21/tcp    open  ftp
    22/tcp    open  ssh
    25/tcp    open  smtp
    53/tcp    open  domain
    80/tcp    open  http
    110/tcp   open  pop3
    111/tcp   open  rpcbind
    143/tcp   open  imap
    964/tcp   open  unknown
    993/tcp   open  imaps
    995/tcp   open  pop3s
    3306/tcp  open  mysql
    10000/tcp open  snet-sensor-mgmt
    Nmap finished: 1 IP address (1 host up) scanned in 4.755 seconds
    3、隐藏扫描,只在目标主机上留下很少的日志信息:隐藏扫描192.168.0.220
     
    [root@laolinux ~]# nmap -sS 192.168.0.127
    Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2009-04-25 07:08 CST
    Interesting ports on 192.168.0.127:
    Not shown: 1675 closed ports
    PORT    STATE SERVICE
    21/tcp  open  ftp
    135/tcp open  msrpc
    139/tcp open  netbios-ssn
    445/tcp open  microsoft-ds
    912/tcp open  unknown
    MAC Address: 00:11:1A:35:38:62 (Motorola BCS)
    Nmap finished: 1 IP address (1 host up) scanned in 3.121 seconds
    4、UDP端口扫描:扫描192.168.0.127开放了哪些UDP端口;
     
    [root@laolinux ~]# nmap -sU 192.168.0.127
    Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2009-04-25 07:08 CST
    Interesting ports on 192.168.0.127:
    Not shown: 1480 closed ports
    PORT     STATE         SERVICE
    123/udp  open|filtered ntp
    137/udp  open|filtered netbios-ns
    138/udp  open|filtered netbios-dgm
    445/udp  open|filtered microsoft-ds
    500/udp  open|filtered isakmp
    1900/udp open|filtered UPnP
    4500/udp open|filtered sae-urn
    MAC Address: 00:11:1A:35:38:62 (Motorola BCS)
    Nmap finished: 1 IP address (1 host up) scanned in 2.947 seconds
    5、操作系统识别:
     
    [root@laolinux ~]# nmap -sS -O  192.168.0.127
    Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2009-04-25 07:09 CST
    Interesting ports on 192.168.0.127:
    Not shown: 1675 closed ports
    PORT    STATE SERVICE
    21/tcp  open  ftp
    135/tcp open  msrpc
    139/tcp open  netbios-ssn
    445/tcp open  microsoft-ds
    912/tcp open  unknown
    MAC Address: 00:11:1A:35:38:62 (Motorola BCS)
    Device type: general purpose
    Running: Microsoft Windows 2003/.NET|NT/2K/XP
    OS details: Microsoft Windows 2003 Server or XP SP2
    Nmap finished: 1 IP address (1 host up) scanned in 5.687 seconds
    ****************************************************
    **    by :     laolinux
    **    my blog: http://laolinux.cublog.cn
    ****************************************************
    目标来源--------------------》博客

    http://www.cnblogs.com/zhangjianghua/p/6639291.html


    展开全文
  • 最近,拿到一台内网机器, 苦于无法使用nmap扫描主机的内网, 所以才有此文  在跳板机子获取一定权限后,需要积极的向内网主机权限发展,获取指定的目标信息,探查系统漏洞,借助msf已经得到的meterpreter后门,...
  • 该软件会建立一个动态的图形网站,显示NMAP扫描的结果。 该工具具有集成的网络服务器,可显示该网站的主机名,IP地址和选定的开放端口。 这是一般说明,以获取更多详细信息,请在此处阅读: 想法和意图 扫描局域网 ...
  • 使用nmap查找局域网中的jenkins服务器 sudo nmap -sS -P0 -n --open --min-parallelism 1024 -T4 -p8080 10.0.16.0/20 \ | grep 'Nmap scan report for' | cut -f 5 -d ' ' \ | xargs -i -t curl -s -N ...
  • nmap:linux使用nmap 对局域网扫描,查看arp缓存表就可以知道局域内主机ip和mac了,方法如下:...扫描之后查看arp缓存表获取局域网主机IP地址 cat /proc/net/arp一般操作系统ping返回默认TTL:windows 128 win7 64 l...
  • 扫描局域网中的主机

    2011-07-22 12:44:52
    扫描局域网中的主机NMap,也就是Network Mapper,是Linux下的网络扫描和嗅探工具包。http://baike.baidu.com/view/77455.htm
  • 然后用nmap看看局域网里都有谁 https://blog.csdn.net/xy913741894/article/details/77254805 再然后自己写了个tcp连接的扫描端口的代码 https://blog.csdn.net/Mad_Geek/article/details/7892393...
  • linux 扫描局域网内所有主机

    千次阅读 2020-05-12 09:29:53
    yum install nmap nmap -sL 192.168.31.0/24
  • Kali 使用nmap命令进行局域网扫描

    千次阅读 2020-09-22 15:37:04
    1.内网IP地址扫描 sudo -i namp -sP 192.168.1.0/24 (P一定要大写,192.168.1.0是自己内网的...3.隐藏扫描端口(不容易被主机发现) nmap -sS 192.168.1.102 4.UDP端口扫描 nmap -sU 192.168.1.109 5.操作系统识别 nma
  • Python 局域网扫描存活主机开放端口

    千次阅读 2019-01-07 14:19:08
    ''' Python 局域网扫描存活主机开放端口 by 郑...3、nmap扫描存活主机开放端口 #注: 若在Linux系统下 ping -n 改为 ping -c 若在windows系统下 ping -n 不变 ''' import nmap import socket import os import t...
  • python—项目5-TCP扫描器与多线程TCP扫描器,单一主机的各种端口,并返回banner信息一、TCP扫描器单线程TCP全连接扫描、抓取应用的Banner1、环境与源码 root@kali:~# cd /root/python/anquangongji/ root@kali:~/...
  • 20145335郝昊《网络攻防》Exp 4 利用nmap扫描 实验原理 使用msf辅助模块,nmap来扫描发现局域网中的主机ip 实验步骤 首先使用命令创建一个msf所需的数据库 service postgresql start msfdb start 之后使用...
  • 0x00 ARP概述中文名: 地址解析协议(英语:Address Resolution Protocol,缩写:ARP)是通过解析网络层地址(IPv4,IPv6)来寻找...0x01 基本功能在以太网协议中规定,同一局域网中的一台主机A要和另一台主机B进行直接通...
  • 1、扫描局域网内的主机列表: nmap -v -sP 192.168.1.0/24 2、查看某个IP的操作系统(最好在联网情况下相当好用) nmap -sS -O 192.168.1.101 3.Mac地址查询 可以使用前面两个命令查询Mac地址,也可已使用下面命令...
  • 步骤如下:1,进行ping扫描,打印出对扫描做出响应的主机: $ nmap -sP192.168.1.0/24 2,仅列出指定网络上的每台主机,不发送任何报文到目标主机: $ nmap -sL192.168.1.0/24 3,探测目标主机开放的端口,可以...
  • 用namp对局域网扫描一遍,然后查看arp缓存表就可以知道局域内ip对应的mac了。namp比较强大也可以直接扫描mac地址和端口。执行扫描之后就可以 cat /proc/net/arp查看arp缓存表了。 进行ping扫描,打印出对扫描做出...
  • 端口扫描nmap

    2020-09-29 11:09:48
    端口扫描NMAP nmap是一个网络端口扫描软件,用来扫描网上电脑开放的网络连接端口,确定哪些服务运行在哪些端口,并且推断计算机运行哪个os。...扫描网络上的存活主机,此处以扫描我自家的局域网为例:nmap 192
  • 例如,仅仅需要确定局域网内哪些IP在线,那么可用“主机发现”功能扫描所有机器,枚举出在线主机即可,而没有必要进行端口扫描、服务侦测、OS侦测等更加详细的操作。 1简单回顾 命令行参数 Nmap提供的主机发现...
  • Linux 下查看局域网内所有主机IP和MAC

    千次阅读 2019-07-29 13:39:42
    nmap局域网扫描一遍,然后查看arp缓存表就可以知道局域内ip对应的mac了。nmap比较强大也可以直接扫描mac地址和端口。执行扫描之后就可以cat/proc/net/arp查看arp缓存表了。 进行ping扫描,打印出对扫描做出...
  • NMap,也就是Network Mapper,是Linux下的网络扫描和嗅探工 具包,其基本功能有三个, 一是探测一组主机是否在线; 其次是扫描主机端口,嗅探所提供的网络服务; 还可以推断主机所用的操作系统 。 Nmap可用于...
  • 网络扫描工具nmap

    千次阅读 2020-08-09 15:18:56
    nmap一般就用来扫描主机是否在线(特别是扫描局域网内存活的机器)、开放了哪些端口。其他的功能用的比较少,做渗透的人可能要了解的多些。 1.1 选项说明 nmap需要自行安装。 shell> yum -y install nmap 使用nmap ...
  • Linux用nmap局域网扫描,查看arp缓存表就可以知道局域内主机ip和mac了CentOs 为例: 使用nmap前需要先安装nmapyum install nmap然后输入指令:nmap -sP 192.168.245.0/24 进行ping扫描,打印出对扫描做出响应的...

空空如也

空空如也

1 2 3 4 5 ... 9
收藏数 175
精华内容 70
关键字:

nmap扫描局域网主机