下载源码包:http://netcat.sourceforge.net/download.php

# tar -xzvf netcat-0.7..tar.gz
[root@znode02 netcat-0.7.]# ls
ABOUT-NLS config.guess configure INSTALL Makefile.am NEWS TODO
aclocal.m4 config.h.in configure.ac install-sh Makefile.in po
AUTHORS config.rpath COPYING lib missing README
ChangeLog config.sub doc m4 mkinstalldirs src
# mkdir /apps
# ./configure --prefix=/apps/nc
[root@znode02 netcat-0.7.]# ls
ABOUT-NLS config.h config.sub INSTALL Makefile.am po
aclocal.m4 config.h.in configure install-sh Makefile.in README
AUTHORS config.log configure.ac lib missing src
ChangeLog config.rpath COPYING m4 mkinstalldirs stamp-h1
config.guess config.status doc Makefile NEWS TODO
]# make && make install
# tree /apps/nc
/apps/nc
├── bin
│   ├── nc -> netcat
│   └── netcat
├── info
│   ├── dir
│   └── netcat.info
├── man
│   └── man1
│   └── netcat.
└── share
└── locale
├── it
│   └── LC_MESSAGES
│   └── netcat.mo
└── sk
└── LC_MESSAGES
└── netcat.mo directories, files

增加环境变量:

# cat /root/.bash_profile
# .bash_profile # Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi # User specific environment and startup programs PATH=$PATH:$HOME/bin
NC=/apps/nc
PATH=$PATH:$NC/bin
export PATH
# source ~/.bash_profile

验证:

# nc -h
GNU netcat 0.7., a rewrite of the famous networking tool.
Basic usages:
connect to somewhere: nc [options] hostname port [port] ...
listen for inbound: nc -l -p port [options] [hostname] [port] ...
tunnel to somewhere: nc -L hostname:port -p port [options] Mandatory arguments to long options are mandatory for short options too.
Options:
-c, --close close connection on EOF from stdin
-e, --exec=PROGRAM program to exec after connect
-g, --gateway=LIST source-routing hop point[s], up to
-G, --pointer=NUM source-routing pointer: , , , ...
-h, --help display this help and exit
-i, --interval=SECS delay interval for lines sent, ports scanned
-l, --listen listen mode, for inbound connects
-L, --tunnel=ADDRESS:PORT forward local port to remote address
-n, --dont-resolve numeric-only IP addresses, no DNS
-o, --output=FILE output hexdump traffic to FILE (implies -x)
-p, --local-port=NUM local port number
-r, --randomize randomize local and remote ports
-s, --source=ADDRESS local source address (ip or hostname)
-t, --tcp TCP mode (default)
-T, --telnet answer using TELNET negotiation
-u, --udp UDP mode
-v, --verbose verbose (use twice to be more verbose)
-V, --version output version information and exit
-x, --hexdump hexdump incoming and outgoing traffic
-w, --wait=SECS timeout for connects and final net reads
-z, --zero zero-I/O mode (used for scanning) Remote port number can also be specified as range. Example: '1-1024'

最新文章

  1. 独立开发 一个社交 APP 的架构分享 (已实现)
  2. 9.JAVA之GUI编程列出指定目录内容
  3. Xcode导航栏不显示模拟器选择框ToolBar
  4. Python--常见问题解决方案
  5. 鼠标滑过弹出jquery在线客服
  6. Criteria查询数据
  7. makefile学习笔记(多目录嵌套调用、变量使用)
  8. 视图View
  9. effective c++ 条款8 prevent exception from leaving destructor
  10. [置顶] EasyMock的简单使用
  11. ubuntu17.10 安装firefox的flash
  12. Apex 中 PageReference 的使用
  13. Android中验证输入是否为汉字、手机号及邮箱
  14. AsyncStorage和Promise配合使用
  15. laravel(一)
  16. Java从零开始学三十二(正则表达式)
  17. linux下安装gcc详解
  18. 一些Redis面试题
  19. 手脱nSPack 2.2
  20. java创建二叉树并实现非递归中序遍历二叉树

热门文章

  1. 如何:在 DHTML 代码和客户端应用程序代码之间实现双向通信
  2. javaScriptObject转String
  3. 如何通过from语句调用模块的变量名?
  4. C# 的Timer 在javascript中的实现--基于Typescript
  5. 富文本处理NSMutableAttributedString
  6. PHP-Open Flash Chart学习一(swfobject知识)
  7. JS如何利用定时器实现长按事件
  8. HDUOJ----Ignatius and the Princess III
  9. Python websocket
  10. 如何判断Android手机当前是否联网?