Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Added dsniff-devel (2.4b1) #6999

Closed
wants to merge 1 commit into from
Closed

Conversation

SteveClement
Copy link
Contributor

The patches are the same as the ones from the MacPorts. They can be integrated more elegantly and I will do that next.

libnids needs to be installed with --disable-glib haven't found a way to check for this in the currently installed package.

I saw the ARGV.include? if statements and wondered if there is something like:

libnids.options? = --disable-glib

To test if the installed libnids has that option set.

I Also failed to understand how to install a dependency with an option. I will complete the wiki once I figure this out.

…the MacPorts.

libnids needs to be installed with --disable-glib haven't found a way to check for this in the currently installed package.
@adamv
Copy link
Contributor

adamv commented Aug 14, 2011

Homebrew does not currently support installing deps with options.

@SteveClement
Copy link
Contributor Author

That is a real shame :( but I think I could hack some perl or the like around it.

I will enhance this commit a bit more and then hopefully the #InfoSec community can benefit from my efforts.

@adamv
Copy link
Contributor

adamv commented Sep 1, 2011

See also: #3759

@ynadji
Copy link

ynadji commented Sep 1, 2011

This is the same version from my original commit.

@xavierds
Copy link

I want to install this package and I'm using homebrew.

Reading this I saw than I need libnids with disable-glib and we can't do that for the moment with homebrew for the moment if I understood it correctly, so do I need to install libnids by hand to in order to install dsniff ? Do I need something else ?

Thanks for your help.

@SteveClement
Copy link
Contributor Author

On Oct 20, 2011, at 4:54 AM, xavierds wrote:

I want to install this package and I'm using homebrew.

Reading this I saw than I need libnids with disable-glib and we can't do that for the moment with homebrew for the moment if I understood it correctly, so do I need to install libnids by hand to in order to install dsniff ? Do I need something else ?

Not really, you can do the following:

brew install libnids --disable-libglib

cheers,

Steve

The Hackerspace in Luxembourg!
SYN2cat Hackerspace.lu A.S.B.L.
11, rue du Cimetière | L-8018 Strassen
http://www.hacker.lu
xmpp:SteveClement@jabber.hackerspaces.org
mailto:steve@localhost.lu
https://www.twitter.com/SteveClement
.lu: +352 20 333 55 65

@SteveClement
Copy link
Contributor Author

brew install libnids --disable-libglib

@xavierds
Copy link

Thanks for your help, I've tried to install it without success.

When I'm doing the configure I'm receiving complains
about, net/if_tun.h, xdr_fhstatus in -lrpcsvc, socket in -lsocket
and gethostbyname in -lnsl.

And when I'm trying to compile I'm receiving errors as ./arpspoof.c:51:
error: too many arguments to function ‘libnet_get_hwaddr’

If you had sometime to help me I'm adding to this all the logs, maybe I need
to indicate the direction of the homebrew libraries ?

Regards,

LittleBoy:dsniff-2.4 xavierds$ ./configure
creating cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for a BSD compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for X... no
checking for ANSI C header files... yes
checking for err.h... yes
checking for fcntl.h... yes
checking for sys/ioctl.h... yes
checking for sys/queue.h... yes
checking for unistd.h... yes
checking for libgen.h... yes
checking for net/if_tun.h... no
checking for MIN and MAX in sys/param.h... yes
checking for working const... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for u_int32_t... yes
checking for u_int64_t... yes
checking for in_addr_t... yes
checking whether gcc needs -traditional... no
checking for 8-bit clean memcmp... yes
checking return type of signal handlers... void
checking for strftime... yes
checking for gethostname... yes
checking for socket... yes
checking for strdup... yes
checking for strstr... yes
checking for xdr_fhstatus in -lrpcsvc... no
checking for socket in -lsocket... no
checking for gethostbyname in -lnsl... no
checking for dn_expand in -lresolv... yes
checking for dirname... yes
checking for strlcpy... yes
checking for strlcat... yes
checking for strsep... yes
checking for MD5Update... no
checking for warnx... yes
checking for ether_ntoa... yes
checking for Berkeley DB with 1.85 compatibility... yes
checking for libpcap... yes
checking for libnet... yes
checking for libnids... yes
checking whether libnids version is good... yes
checking for OpenSSL... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating config.h

LittleBoy:dsniff-2.4 xavierds$ make
gcc -g -O2 -D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/lib/" -I. -I/usr/local/include
-I/usr/include/pcap -I/usr/local/include -I/usr/local/include -I./missing
-c ./missing/dummy.c
gcc -g -O2 -D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/lib/" -I. -I/usr/local/include
-I/usr/include/pcap -I/usr/local/include -I/usr/local/include -I./missing
-c ./missing/md5.c
ar -cr libmissing.a dummy.o md5.o
/usr/bin/ranlib: file: libmissing.a(dummy.o) has no symbols
ranlib libmissing.a
ranlib: file: libmissing.a(dummy.o) has no symbols
gcc -g -O2 -D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/lib/" -I. -I/usr/local/include
-I/usr/include/pcap -I/usr/local/include -I/usr/local/include -I./missing
-c ./arpspoof.c
In file included from ./arpspoof.c:25:
./arp.h:14: warning: ‘struct ether_addr’ declared inside parameter list
./arp.h:14: warning: its scope is only this definition or declaration, which
is probably not what you want
./arpspoof.c:28: warning: ‘struct ether_addr’ declared inside parameter list
./arpspoof.c: In function ‘arp_send’:
./arpspoof.c:51: warning: passing argument 1 of ‘libnet_get_hwaddr’ from
incompatible pointer type
./arpspoof.c:51: error: too many arguments to function ‘libnet_get_hwaddr’
./arpspoof.c:62: warning: passing argument 6 of ‘libnet_build_ethernet’ from
incompatible pointer type
./arpspoof.c:62: error: too few arguments to function
‘libnet_build_ethernet’
./arpspoof.c:66: error: ‘ETH_H’ undeclared (first use in this function)
./arpspoof.c:66: error: (Each undeclared identifier is reported only once
./arpspoof.c:66: error: for each function it appears in.)
./arpspoof.c:66: error: too few arguments to function ‘libnet_build_arp’
./arpspoof.c:69: warning: passing argument 1 of ‘ether_ntoa’ from
incompatible pointer type
./arpspoof.c:73: warning: passing argument 1 of ‘ether_ntoa’ from
incompatible pointer type
./arpspoof.c:75: warning: format ‘%s’ expects type ‘char ’, but argument 4
has type ‘int’
./arpspoof.c:75: warning: format ‘%s’ expects type ‘char *’, but argument 5
has type ‘int’
./arpspoof.c:75: warning: format ‘%s’ expects type ‘char *’, but argument 4
has type ‘int’
./arpspoof.c:75: warning: format ‘%s’ expects type ‘char *’, but argument 5
has type ‘int’
./arpspoof.c:79: warning: passing argument 1 of ‘ether_ntoa’ from
incompatible pointer type
./arpspoof.c:80: warning: format ‘%s’ expects type ‘char *’, but argument 4
has type ‘int’
./arpspoof.c:80: warning: format ‘%s’ expects type ‘char *’, but argument 4
has type ‘int’
./arpspoof.c:82: warning: passing argument 1 of ‘ether_ntoa’ from
incompatible pointer type
./arpspoof.c: In function ‘arp_find’:
./arpspoof.c:116: warning: passing argument 2 of ‘arp_cache_lookup’ from
incompatible pointer type
./arpspoof.c: In function ‘main’:
./arpspoof.c:185: warning: assignment makes pointer from integer without a
cast
make: *
* [arpspoof.o] Error 1

Xavier Delcour Sauvage

On 21 October 2011 17:13, steve <
reply@reply.github.com>wrote:

brew install libnids --disable-libglib

Reply to this email directly or view it on GitHub:
#6999 (comment)

@ynadji
Copy link

ynadji commented Oct 22, 2011

Are you applying the necessary patches?

@xavierds
Copy link

I was doing it directly with the sources, now I've downloaded
the dsniff-devel.rb and I've put it on my Formula directory but it also
fails with the installation on the homebrew way.

Thanks for your help

==> ./configure --disable-debug
--prefix=/usr/local/Cellar/dsniff-devel/2.4b1
--with-libnet=/usr/local/Cellar/libnet/1.1/
--with-libnids=/usr/local/Cellar/libnids/1.24/
==> make
/usr/bin/llvm-gcc -O3 -march=core2 -msse4.1 -w -pipe -DBIND_8_COMPAT
-D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/Cellar/dsniff-devel/2.4b1/lib/" -I.
-I/usr/local/Cellar/libnids/1.24/include -I/usr/include/pcap
-I/usr/local/Cellar/libnet/1.1/include -I./missing -c ./missing/dummy.c
/usr/bin/llvm-gcc -O3 -march=core2 -msse4.1 -w -pipe -DBIND_8_COMPAT
-D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/Cellar/dsniff-devel/2.4b1/lib/" -I.
-I/usr/local/Cellar/libnids/1.24/include -I/usr/include/pcap
-I/usr/local/Cellar/libnet/1.1/include -I./missing -c ./missing/md5.c
/usr/bin/llvm-gcc -O3 -march=core2 -msse4.1 -w -pipe -DBIND_8_COMPAT
-D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/Cellar/dsniff-devel/2.4b1/lib/" -I.
-I/usr/local/Cellar/libnids/1.24/include -I/usr/include/pcap
-I/usr/local/Cellar/libnet/1.1/include -I./missing -c ./arpspoof.c
/usr/bin/llvm-gcc -O3 -march=core2 -msse4.1 -w -pipe -DBIND_8_COMPAT
-D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/Cellar/dsniff-devel/2.4b1/lib/" -I.
-I/usr/local/Cellar/libnids/1.24/include -I/usr/include/pcap
-I/usr/local/Cellar/libnet/1.1/include -I./missing -c ./arp.c
/usr/bin/llvm-gcc -O3 -march=core2 -msse4.1 -w -pipe -DBIND_8_COMPAT
-D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/Cellar/dsniff-devel/2.4b1/lib/" -I.
-I/usr/local/Cellar/libnids/1.24/include -I/usr/include/pcap
-I/usr/local/Cellar/libnet/1.1/include -I./missing -c ./dnsspoof.c
/usr/bin/llvm-gcc -O3 -march=core2 -msse4.1 -w -pipe -DBIND_8_COMPAT
-D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/Cellar/dsniff-devel/2.4b1/lib/" -I.
-I/usr/local/Cellar/libnids/1.24/include -I/usr/include/pcap
-I/usr/local/Cellar/libnet/1.1/include -I./missing -c ./pcaputil.c
rpcgen -h mount.x -o mount.h
/usr/bin/llvm-gcc -O3 -march=core2 -msse4.1 -w -pipe -DBIND_8_COMPAT
-D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/Cellar/dsniff-devel/2.4b1/lib/" -I.
-I/usr/local/Cellar/libnids/1.24/include -I/usr/include/pcap
-I/usr/local/Cellar/libnet/1.1/include -I./missing -c ./asn1.c
/usr/bin/llvm-gcc -O3 -march=core2 -msse4.1 -w -pipe -DBIND_8_COMPAT
-D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/Cellar/dsniff-devel/2.4b1/lib/" -I.
-I/usr/local/Cellar/libnids/1.24/include -I/usr/include/pcap
-I/usr/local/Cellar/libnet/1.1/include -I./missing -c ./base64.c
/usr/bin/llvm-gcc -O3 -march=core2 -msse4.1 -w -pipe -DBIND_8_COMPAT
-D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/Cellar/dsniff-devel/2.4b1/lib/" -I.
-I/usr/local/Cellar/libnids/1.24/include -I/usr/include/pcap
-I/usr/local/Cellar/libnet/1.1/include -I./missing -c ./buf.c
/usr/bin/llvm-gcc -O3 -march=core2 -msse4.1 -w -pipe -DBIND_8_COMPAT
-D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/Cellar/dsniff-devel/2.4b1/lib/" -I.
-I/usr/local/Cellar/libnids/1.24/include -I/usr/include/pcap
-I/usr/local/Cellar/libnet/1.1/include -I./missing -c ./hex.c
/usr/bin/llvm-gcc -O3 -march=core2 -msse4.1 -w -pipe -DBIND_8_COMPAT
-D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/Cellar/dsniff-devel/2.4b1/lib/" -I.
-I/usr/local/Cellar/libnids/1.24/include -I/usr/include/pcap
-I/usr/local/Cellar/libnet/1.1/include -I./missing -c ./magic.c
/usr/bin/llvm-gcc -O3 -march=core2 -msse4.1 -w -pipe -DBIND_8_COMPAT
-D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/Cellar/dsniff-devel/2.4b1/lib/" -I.
-I/usr/local/Cellar/libnids/1.24/include -I/usr/include/pcap
-I/usr/local/Cellar/libnet/1.1/include -I./missing -c ./rpc.c
rpcgen -c mount.x -o mount.c
/usr/bin/llvm-gcc -O3 -march=core2 -msse4.1 -w -pipe -DBIND_8_COMPAT
-D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/Cellar/dsniff-devel/2.4b1/lib/" -I.
-I/usr/local/Cellar/libnids/1.24/include -I/usr/include/pcap
-I/usr/local/Cellar/libnet/1.1/include -I./missing -c ./tcp_raw.c
/usr/bin/llvm-gcc -O3 -march=core2 -msse4.1 -w -pipe -DBIND_8_COMPAT
-D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/Cellar/dsniff-devel/2.4b1/lib/" -I.
-I/usr/local/Cellar/libnids/1.24/include -I/usr/include/pcap
-I/usr/local/Cellar/libnet/1.1/include -I./missing -c ./trigger.c
/usr/bin/llvm-gcc -O3 -march=core2 -msse4.1 -w -pipe -DBIND_8_COMPAT
-D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN
-DDSNIFF_LIBDIR="/usr/local/Cellar/dsniff-devel/2.4b1/lib/" -I.
-I/usr/local/Cellar/libnids/1.24/include -I/usr/include/pcap
-I/usr/local/Cellar/libnet/1.1/include -I./missing -c ./record.c
./record.c: In function ‘record_save’:
./record.c:133: error: ‘R_NOOVERWRITE’ undeclared (first use in this
function)
./record.c:133: error: (Each undeclared identifier is reported only once
./record.c:133: error: for each function it appears in.)
./record.c:133: error: too few arguments to function ‘db->put’
./record.c: In function ‘record_dump’:
./record.c:146: error: ‘DB’ has no member named ‘seq’
./record.c:146: error: ‘R_NEXT’ undeclared (first use in this function)
./record.c: In function ‘record_close’:
./record.c:209: error: too few arguments to function ‘db->close’
make: *** [record.o] Error 1
make: *** Waiting for unfinished jobs....
==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/dsniff-devel.rb#L36
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: e316a8a
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: dual-core 64-bit penryn
OS X: 10.7.2
Kernel Architecture: x86_64
Ruby: 1.8.7-249
/usr/bin/ruby =>
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 4.2
GCC-4.0: N/A
GCC-4.2: build 5666
LLVM: build 2336
MacPorts or Fink? false
X11 installed? true
==> Build Flags
CC: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CXX: /usr/bin/llvm-g++ => /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
LD: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe -DBIND_8_COMPAT
CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
CPPFLAGS: -I/usr/local/Cellar/libiconv/1.14/include
-I/usr/local/Cellar/gettext/0.18.1.1/include
LDFLAGS: -L/usr/local/Cellar/libiconv/1.14/lib -L/usr/local/Cellar/gettext/
0.18.1.1/lib
MAKEFLAGS: -j2
PKG_CONFIG_PATH:
/usr/local/Cellar/libiconv/1.14/lib/pkgconfig:/usr/local/Cellar/gettext/
0.18.1.1/lib/pkgconfig

Xavier Delcour Sauvage

On 22 October 2011 10:33, Yacin Nadji <
reply@reply.github.com>wrote:

Are you applying the necessary patches?

Reply to this email directly or view it on GitHub:
#6999 (comment)

@xavierds
Copy link

I've been looking into a solution to resolve this, could it be than I've update the XCode and one of the compiler is not compatible anymore with one of the patches ?

Thanks for your help.

@younes200
Copy link

I'm facing the same problem to build dsnif, it's seems that --disable-libglib works fine for libnids byt still having the same issue for dsnif, it a patch planned to fix this for osx lion ?
Thanks for you help

@adamv
Copy link
Contributor

adamv commented Mar 18, 2012

I get a build error when I try to build this: https://gist.github.com/2079505

I'm building off of this version: https://github.com/adamv/homebrew/compare/dsniff

@adamv
Copy link
Contributor

adamv commented Mar 18, 2012

Solved my problems; added as 77d0b18. Sorry about the delay.

@adamv adamv closed this Mar 18, 2012
@mzdaemon
Copy link

Hi,

please anyone may know the solution for this error ?
screen shot 2014-08-23 at 7 14 11 pm

@Homebrew Homebrew locked and limited conversation to collaborators Aug 23, 2014
@mistydemeo
Copy link
Member

Please open a new issue and follow the troubleshooting guide if you need help with this, thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants