zoukankan      html  css  js  c++  java
  • netcat nc

    http://pan.baidu.com/s/1bo2IH9X#netcat  云盘下载
    
    [root@bass ~]# tar -xjvf netcat-0.7.1.tar.bz2
    
    [root@bass ~]# cd netcat-0.7.1
    [root@bass ~]# ./configure --prefix=/usr/local/netcat
    [root@bass ~]# make && make install
    [root@bass ~]# tree /usr/local/netcat/
    /usr/local/netcat/
    ├── bin
    │   ├── nc -> netcat
    │   └── netcat
    ├── info
    │   ├── dir
    │   └── netcat.info
    ├── man
    │   └── man1
    │       └── netcat.1
    └── share
        └── locale
            ├── it
            │   └── LC_MESSAGES
            │       └── netcat.mo
            └── sk
                └── LC_MESSAGES
                    └── netcat.mo
    
    10 directories, 7 files
    [root@bass ~]# nc -h
    usage: nc [-46DdhklnrStUuvzC] [-i interval] [-p source_port]
    	  [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_version]
    	  [-x proxy_address[:port]] [hostname] [port[s]]
    	Command Summary:
    		-4		Use IPv4
    		-6		Use IPv6
    		-D		Enable the debug socket option
    		-d		Detach from stdin
    		-h		This help text
    		-i secs		Delay interval for lines sent, ports scanned
    		-k		Keep inbound sockets open for multiple connects
    		-l		Listen mode, for inbound connects
    		-n		Suppress name/port resolutions
    		-p port		Specify local port for remote connects
    		-r		Randomize remote ports
     		-S		Enable the TCP MD5 signature option
    		-s addr		Local source address
    		-T ToS		Set IP Type of Service
    		-C		Send CRLF as line-ending
    		-t		Answer TELNET negotiation
    		-U		Use UNIX domain socket
    		-u		UDP mode
    		-v		Verbose
    		-w secs		Timeout for connects and final net reads
    		-X proto	Proxy protocol: "4", "5" (SOCKS) or "connect"
    		-x addr[:port]	Specify proxy address and port
    		-z		Zero-I/O mode [used for scanning]
    	Port numbers can be individual or ranges: lo-hi [inclusive]
    

     扫描21-9000端口TCP:

    [root@bass ~]# nc -v -w 2 192.168.1.35 -z 21-9000
    

     -v 详细输出 -w secs timeout的时间 -z 端口的范围

    扫描21-80端口UDP

    [root@bass ~]# nc -z -v -u -n 122.56.183.103 21-80
    Connection to 122.56.183.103 27 port [udp/*] succeeded!
    Connection to 122.56.183.103 37 port [udp/*] succeeded!
    Connection to 122.56.183.103 41 port [udp/*] succeeded!
    Connection to 122.56.183.103 44 port [udp/*] succeeded!
    Connection to 122.56.183.103 50 port [udp/*] succeeded!
    Connection to 122.56.183.103 62 port [udp/*] succeeded!
    Connection to 122.56.183.103 65 port [udp/*] succeeded!
    Connection to 122.56.183.103 69 port [udp/*] succeeded!
    Connection to 122.56.183.103 80 port [udp/*] succeeded!
    

     扫描21-80端口TCP

    [root@bass ~]# nc -z -v -n 122.56.183.103 21-80
    Connection to 122.56.183.103 21 port [tcp/*] succeeded!
    Connection to 122.56.183.103 22 port [tcp/*] succeeded!
    nc: connect to 122.56.183.103 port 23 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 24 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 25 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 26 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 27 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 28 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 29 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 30 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 31 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 32 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 33 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 34 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 35 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 36 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 37 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 38 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 39 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 40 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 41 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 42 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 43 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 44 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 45 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 46 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 47 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 48 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 49 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 50 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 51 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 52 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 53 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 54 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 55 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 56 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 57 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 58 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 59 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 60 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 61 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 62 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 63 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 64 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 65 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 66 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 67 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 68 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 69 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 70 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 71 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 72 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 73 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 74 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 75 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 76 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 77 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 78 (tcp) failed: Connection refused
    nc: connect to 122.56.183.103 port 79 (tcp) failed: Connection refused
    Connection to 122.56.183.103 80 port [tcp/*] succeeded!
    
  • 相关阅读:
    3.10_eclipse的使用和Object类型
    团队项目推荐:礼物推荐 —— by Xizhou
    团队项目推荐:不一样的旅游——by Lijun
    团队项目推荐:自动化卡通人脸生成——by Feng Nie
    团队项目推荐:手机社交照片管理软件——by Zhaofan
    Team Project Proposal:App:等车时间预测(重写) -- by DengPan
    对MSRA-USTC 2011的 meng-meng(萌萌) 的team project的学习和评价
    Team Project Proposal: All-in-one多信息源整合的移动应用[Revised in 8th Oct]——by Yuchan
    Team Project Proposal:App:等车时间预测 -- by DengPan
    Team Project Proposal:手机音频美化APP——by Kun Qian
  • 原文地址:https://www.cnblogs.com/bass6/p/5565772.html
Copyright © 2011-2022 走看看