zoukankan      html  css  js  c++  java
  • Netcat

    nc的一些小功能集合

    [v1.12 NT http://eternallybored.org/misc/netcat/]
    connect to somewhere:   nc [-options] hostname port[s] [ports] ...
    listen for inbound:     nc -l -p port [options] [hostname] [port]
    options:
            -d              detach from console, background mode
    
            -e prog         inbound program to exec [dangerous!!]
            -g gateway      source-routing hop point[s], up to 8
            -G num          source-routing pointer: 4, 8, 12, ...
            -h              this cruft
            -i secs         delay interval for lines sent, ports scanned
            -l              listen mode, for inbound connects
            -L              listen harder, re-listen on socket close
            -n              numeric-only IP addresses, no DNS
            -o file         hex dump of traffic
            -p port         local port number
            -r              randomize local and remote ports
            -s addr         local source address
            -t              answer TELNET negotiation
            -c              send CRLF instead of just LF
            -u              UDP mode
            -v              verbose [use twice to be more verbose]
            -w secs         timeout for connects and final net reads
            -z              zero-I/O mode [used for scanning]
    port numbers can be individual or ranges: m-n [inclusive]
    所有参数

    1、一个简单的收发消息工具

    Client1和Client2之间,Client1安装了nc,监听8888端口,Client2用telnet Client1的8888端口即可,口令都不需要,直接发送字符就可以聊,Client2打字时,Client1同步显示,Client1打字必须要发送出去后,Client2才收到,

    Client1(ip:2.2.2.2,CentOS):

    nc -l 8888

     

    Client2(Windows 10):

    telnet 2.2.2.2 8888

    暂不支持中文,乱码!

    奶奶问孙子:4+1等于几 孙子说:等于6-1。 奶奶说:你明明知道答案,为什么不说? 孙子说:年轻人不讲5的……..
  • 相关阅读:
    sqlserver数据导入导出问题
    关于数据库冗余设计的思考
    cordova插件开发注意事项
    阿里云旺集成问题
    aspnet webapi 跨域请求 405错误
    跨域无法获取自定义header的问题
    angular input标签只能单向传递数据的问题
    android audio无法自动播放
    jquery mobile 问问多多
    mysql 表表连接的问题。
  • 原文地址:https://www.cnblogs.com/jasy/p/12333303.html
Copyright © 2011-2022 走看看