如何用选项重新编译netcat?

时间:2013-03-12 01:17:53

标签: shell unix netcat

愚蠢的问题,但我不擅长从shell配置。我想在启用-DGAPING_SECURITY_HOLE选项的情况下重新编译我的netcat版本(请参阅section 0x1)。我在我的电脑上下载了源代码,我可以通过运行来正常安装:

$ ./configure
$ make

但是如何在Unix系统上启用此选项?谢谢。 (这也是一个班级项目。实际上并没有试图破解......哈哈)

3 个答案:

答案 0 :(得分:1)

./configure  --enable-DGAPING_SECURITY_HOLE
./make
cd src
./netcat --help

答案 1 :(得分:0)

阅读您链接的manual?它说:

  

- = *编译Netcat * = -

[ Enable -DGAPING_SECURITY_HOLE ]
  While this option makes netcat very powerfull, it is also a huge risk in the wrong hands.. 
   Damn hackers.

[ Enable -DTELNET ]
  Without this option netcat will be unable to connect to a telnet server. Telnet servers &
   there clients auto negotiate there options before the login prompt is displayed. Enabling 
   this option allows netcat to support this functionality.

  # DFLAGS = -DTEST -DDEBUG
  DFLAGS = -DGAPING_SECURITY_HOLE -DTELNET
  CFLAGS = -O

因此,编辑makefile并调整DFLAGS的设置。它还暗示可能是默认值。

答案 2 :(得分:0)

尝试这样做:

./configure -DGAPING_SECURITY_HOLE
make Linux