You are not logged in.

#1 2009-02-02 09:32:20

Bola
Member
From: Italia
Registered: 2007-02-16
Posts: 118

Ettercap-ng 0.7.3 problems

Hi people, i have some problems using this sniffing tool. In fact when i scan for host it closes with a segmentation fault so i tryed to recompile it with the flag --enable-debug but it give me the following errors and no compile.

cc1: warnings being treated as errors
ec_text.c: In function 'text_stats':
ec_text.c:468: error: format '%llu' expects type 'long long unsigned int', but argument 3 has type 'u_int64'
ec_text.c:468: error: format '%llu' expects type 'long long unsigned int', but argument 4 has type 'u_int64'
ec_text.c:468: error: format '%llu' expects type 'long long unsigned int', but argument 5 has type 'u_int64'
ec_text.c:482: error: format '%8lld' expects type 'long long int', but argument 3 has type 'u_int64'
ec_text.c:484: error: format '%8lld' expects type 'long long int', but argument 3 has type 'u_int64'
ec_text.c:485: error: format '%8lld' expects type 'long long int', but argument 3 has type 'u_int64'
ec_text.c:485: error: format '%8lld' expects type 'long long int', but argument 4 has type 'u_int64'
ec_text.c:491: error: format '%8lld' expects type 'long long int', but argument 3 has type 'u_int64'
ec_text.c:491: error: format '%8lld' expects type 'long long int', but argument 4 has type 'u_int64'
ec_text.c:493: error: format '%8lld' expects type 'long long int', but argument 3 has type 'u_int64'
ec_text.c:493: error: format '%8lld' expects type 'long long int', but argument 4 has type 'u_int64'
make[3]: *** [libec_text_a-ec_text.o] Error 1
make[3]: Leaving directory `/home/riccardo/Desktop/ettercap/src/ettercap-NG-0.7.3/src/interfaces/text'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/riccardo/Desktop/ettercap/src/ettercap-NG-0.7.3/src/interfaces'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/riccardo/Desktop/ettercap/src/ettercap-NG-0.7.3/src'
make: *** [all-recursive] Error 1
==> ERROR: Build Failed.
    Aborting...

Someone have an idea of what can i do? ^^

Thanks, Riccardo.

EDIT: i forgot to post my PKGBUILD

pkgname=ettercap
pkgver=NG_0.7.3
_origver=NG-0.7.3
pkgrel=11
pkgdesc="A network sniffer/interceptor/logger for ethernet LANs - console"
arch=(i686 x86_64)
url="http://ettercap.sourceforge.net/"
license=('GPL')
depends=('ncurses' 'openssl' 'libpcap>=1.0.0' 'zlib' 'pcre' 'libtool>=2.2.4')
makedepends=('libnet')
options=(!libtool)
source=($pkgname-$_origver.tar.gz)
md5sums=('28fb15cd024162c55249888fe1b97820')

build() {
  cd $startdir/src/$pkgname-$_origver
  ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --enable-plugins \
      --enable-https --disable-gtk --enable-debug
  make || return 1
  make DESTDIR=$startdir/pkg install || return 1
  cd plug-ins
  make || return 1
  make DESTDIR=$startdir/pkg install || return 1
  chmod 755 $startdir/pkg/usr/lib/ettercap/*
  chmod 755 $startdir/pkg/usr/bin/ettercap
}

Last edited by Bola (2009-02-02 09:34:48)

Offline

#2 2009-02-02 16:30:50

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Ettercap-ng 0.7.3 problems

Hmmm - guess you have to edit the source code ...

'long long' is 64 bits both in i686 and x86_64
'long' is 32 bits in i686 and 64 bits in x86_64
int/uint is 32 bits in both cases

[edit] I'm surprised they appear as an error rather than a warning, but as it will affect how values are popped off a stack, I guess an 'error' is in place ...

Last edited by perbh (2009-02-02 16:33:02)

Offline

#3 2009-02-12 00:41:31

burgulgoth
Member
From: Croatia
Registered: 2009-01-15
Posts: 17
Website

Re: Ettercap-ng 0.7.3 problems

I also had same segmentation fault error with ettercap. I found patch in getnoo ebuild, so I patched ettercap source, since then I managed to compile ettercap without error.

ettercap-0.7.3-as-needed.patch

diff -uNr ettercap-NG-0.7.3.orig/src/Makefile.am ettercap-NG-0.7.3/src/Makefile.am
--- ettercap-NG-0.7.3.orig/src/Makefile.am      2006-04-03 19:33:36.000000000 +0100
+++ ettercap-NG-0.7.3/src/Makefile.am   2006-04-03 19:35:09.000000000 +0100
@@ -140,7 +140,9 @@
 ettercap_LDADD += interfaces/gtk/libec_gtk.a
 endif

-ettercap_LDFLAGS = -export-dynamic @EC_LIBS@ 
+ettercap_LDADD += @EC_LIBS@
+
+ettercap_LDFLAGS = -export-dynamic

 CLEANFILES = *.log *.out core* missing/*.o *~

PKGBUILD:

# $Id: PKGBUILD 20314 2008-12-02 12:50:29Z tom $
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
# Maintainer: Kevin Piche <kevin@archlinux.org>

pkgname=ettercap
pkgver=NG_0.7.3
_origver=NG-0.7.3
pkgrel=11
pkgdesc="A network sniffer/interceptor/logger for ethernet LANs - console"
arch=(i686 x86_64)
url="http://ettercap.sourceforge.net/"
license=('GPL')
depends=('ncurses' 'openssl' 'libpcap>=1.0.0' 'zlib' 'pcre' 'libtool>=2.2.4' 'libnet')
makedepends=('libnet')
options=(!libtool)
source=(http://dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$_origver.tar.gz
        ettercap-0.7.3-as-needed.patch)
md5sums=('28fb15cd024162c55249888fe1b97820' 'e3bf174f8719e24db5331413940a06ef')

build() {
  patch $startdir/src/$pkgname-$_origver/src/Makefile.am ettercap-0.7.3-as-needed.patch
  cd $startdir/src/$pkgname-$_origver
  ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --enable-plugins \
      --enable-https --disable-gtk
  make || return 1
  make DESTDIR=$startdir/pkg install || return 1
  cd plug-ins
  make || return 1
  make DESTDIR=$startdir/pkg install || return 1
  chmod 755 $startdir/pkg/usr/lib/ettercap/*
  chmod 755 $startdir/pkg/usr/bin/ettercap
}

Please, notice me if it works for you so I can put it in AUR (for now, it only works for me).

Last edited by burgulgoth (2009-02-12 00:42:26)


ArchLinux x86_64 | scripts | .configs | cyber space | Last.FM | deviantART

Offline

#4 2009-12-06 12:54:14

dazzy
Member
Registered: 2009-02-05
Posts: 5

Re: Ettercap-ng 0.7.3 problems

For me it worked too, but with another patch I found on
http://bugs.gentoo.org/show_bug.cgi?id=258382

diff -Naur ettercap-NG-0.7.3-orig/src/ec_log.c ettercap-NG-0.7.3-patch/src/ec_log.c
--- ettercap-NG-0.7.3-orig/src/ec_log.c    2004-09-30 16:01:45.000000000 +0000
+++ ettercap-NG-0.7.3-patch/src/ec_log.c    2009-02-16 13:04:23.000000000 +0000
@@ -190,7 +190,7 @@
       if (fd->cfd == NULL)
          SEMIFATAL_ERROR("%s", gzerror(fd->cfd, &zerr));
    } else {
-      fd->fd = open(filename, O_CREAT | O_TRUNC | O_RDWR | O_BINARY);
+      fd->fd = open(filename, O_CREAT | O_TRUNC | O_RDWR | O_BINARY, S_IRUSR | S_IWUSR);
       if (fd->fd == -1)
          SEMIFATAL_ERROR("Can't create %s: %s", filename, strerror(errno));
    }

So I changed the content of the existing patch file to get this to work.
Also I had to change the source for the package to be downloaded from
sourceforge. My PKGBUILD looks like this and for me it works fine.

# $Id: PKGBUILD 20314 2008-12-02 12:50:29Z tom $
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
# Maintainer: Kevin Piche <kevin@archlinux.org>
# modified by: Dazzy

pkgname=ettercap
pkgver=NG_0.7.3
_origver=NG-0.7.3
pkgrel=11
pkgdesc="A network sniffer/interceptor/logger for ethernet LANs - console"
arch=(i686 x86_64)
url="http://ettercap.sourceforge.net/"
license=('GPL')
depends=('ncurses' 'openssl' 'libpcap>=1.0.0' 'zlib' 'pcre' 'libtool>=2.2.4' 'libnet')
makedepends=('libnet')
options=(!libtool)
source=(http://downloads.sourceforge.net/project/ettercap/ettercap/NG-0.7.3/ettercap-NG-0.7.3.tar.gz
        ettercap-0.7.3-as-needed.patch)
md5sums=('28fb15cd024162c55249888fe1b97820' '14e75d0e17dc87b591c8cf5ee245d7aa')

build() {
  patch $startdir/src/$pkgname-$_origver/src/Makefile.am ettercap-0.7.3-as-needed.patch
  cd $startdir/src/$pkgname-$_origver
  ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --enable-plugins \
      --enable-https --enable-gtk
  make || return 1
  make DESTDIR=$startdir/pkg install || return 1
  cd plug-ins
  make || return 1
  make DESTDIR=$startdir/pkg install || return 1
  chmod 755 $startdir/pkg/usr/lib/ettercap/*
  chmod 755 $startdir/pkg/usr/bin/ettercap
}

Last edited by dazzy (2009-12-06 12:55:32)

Offline

Board footer

Powered by FluxBB