Total Pageviews

Saturday 16 April 2016

编译Nemesis

Download Nemesis source code.

http://nemesis.sourceforge.net/index.html

# tar xzvf nemesis-1.4.tar.gz
# cd nemesis-1.4/


I face an error. There’s no libnet library.
# ./configure
checking for libnet_build_ip in -lnet... no

  ERROR!  Libnet library not found, go get it from
  http://www.packetfactory.net/projects/libnet/
  or use the --with-libnet-* options, if you have it installed
  in unusual place


- Before installing Nemsis , install libnet at first.

download n’ iinstall libnet-1.1.2.1.tar.gz ( google it out to get libnet )

# tar xzvf libnet-1.1.2.1.tar.gz
# cd libnet/
# ./configure ; make ; make install


# whereis libnet
libnet: /usr/lib/libnet.a /usr/include/libnet /usr/include/libnet.h

# ls /usr/include/libnet*
/usr/include/libnet.h

/usr/include/libnet:
libnet-asn1.h       libnet-headers.h  libnet-structures.h
libnet-functions.h  libnet-macros.h   libnet-types.h


- install Nemesis again

# tar xzvf nemesis-1.4.tar.gz
# cd nemesis-1.4/


Unn, see an error.
# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... none
checking for gcc option to accept ANSI C... none needed
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) none
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking whether gcc needs -traditional... no
Unknown option: -
Unknown option: e
Unknown option: f
Unknown option: -
Unknown option: f
Unknown option: l
Unknown option: a
Unknown option: g
Unknown option: s


- install libnet 1.0.2a instead of libnet 1.1.2.1

 244  tar xzvf libnet-1.0.2a.tar.gz
 245  cd Libnet-1.0.2a/
 246  ./configure
 247  make
 248  make install


- install Nemesis again

 250  cd nemesis-1.4/
 252  ./configure --with-libnet-includes=/usr/include/ --with-libnet-libraries=/usr/lib
 253  make
 254  make install

# which nemesis
/usr/local/bin/nemesis


get things done.

You can also install nemesis on Ubuntu 10.04 w/ the above procedures.