File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / hping2 / INSTALL
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 22:11:37 2012 UTC (12 years, 3 months ago) by misho
Branches: hping2, MAIN
CVS tags: v2_0_0rc3p7, v2_0_0rc3p5, v2_0_0rc3p4, v2_0_0rc3p0, v2_0_0rc3, HEAD
hping2

You can compile hping2 at least under:

Linux
OpenBSD
FreeBSD
NetBSD
Solaris

With Linux you don't need any libs, nor to be root,
however you need uid 0 to run hping.

Linux
-----

please, follows this steps:

$ ./configure (first try ./configure --help)
$ vi Makefile (optional)
$ make
$ su
# make install

FreeBSD, OpenBSD, NetBSD
------------------------

You will need the libpcap and the gmake utility installed on your system. 

$ ./configure
$ gmake
$ su (or calife)
# gmake install

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: You should take care about your net/bpf.h file installing on
      BSD systems (specially with OpenBSD). If your original bpf.h was
      overwritten with the libpcap one probably hping will not work
      with over some interface.

      For example if you use the libpcap bpf.h on OpenBSD hping will
      not work over PPP interfaces.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Solaris
-------

$ export CC="gcc"
$ ./configure
$ gmake
$ su
# gmake install

ALL
---

If you need to run hping2 by your normal
account (i.e. antirez) try the following commands:

# chown root:antirez /usr/sbin/hping2
# chmod 4750 /usr/sbin/hping2

	WARNING: hping2 is not trusted code, i didn't
	audit for hidden buffers overflow and others
	security related problems. However if (as default)
	LIMITWHENSUID is defined if euid != uid
	it's not possible to use a lot of options
	trivially unsafe.

	suid it at root is not encouraged.

antirez

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>