From bb87646bf6efecc75ae082dede5f46d9996fa060 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Mar 19 2007 16:10:39 +0000 Subject: Oops. --- diff --git a/ettercap-NG-0.7.3-UI.patch b/ettercap-NG-0.7.3-UI.patch new file mode 100644 index 0000000..4146934 --- /dev/null +++ b/ettercap-NG-0.7.3-UI.patch @@ -0,0 +1,74 @@ +diff -ru ettercap-NG-0.7.3/src/ec_parser.c ettercap-NG-0.7.3.patched/src/ec_parser.c +--- ettercap-NG-0.7.3/src/ec_parser.c 2004-07-20 11:53:53.000000000 +0200 ++++ ettercap-NG-0.7.3.patched/src/ec_parser.c 2007-03-11 23:01:07.000000000 +0100 +@@ -73,12 +73,16 @@ + fprintf(stdout, " -t, --proto sniff only this proto (default is all)\n"); + + fprintf(stdout, "\nUser Interface Type:\n"); +- fprintf(stdout, " -T, --text use text only GUI\n"); ++ fprintf(stdout, " -T, --text use text only UI\n"); + fprintf(stdout, " -q, --quiet do not display packet contents\n"); + fprintf(stdout, " -s, --script issue these commands to the GUI\n"); +- fprintf(stdout, " -C, --curses use curses GUI\n"); ++#ifdef HAVE_NCURSES ++ fprintf(stdout, " -C, --curses use curses UI\n"); ++#endif ++#ifdef HAVE_GTK + fprintf(stdout, " -G, --gtk use GTK+ GUI\n"); +- fprintf(stdout, " -D, --daemon daemonize ettercap (no GUI)\n"); ++#endif ++ fprintf(stdout, " -D, --daemon daemonize ettercap (no UI)\n"); + + fprintf(stdout, "\nLogging options:\n"); + fprintf(stdout, " -w, --write write sniffed data to pcapfile \n"); +@@ -173,6 +177,17 @@ + { 0 , 0 , 0 , 0} + }; + ++#ifdef HAVE_GTK ++ if (strcmp(argv[0], "ettercap-gtk") == 0) ++ select_gtk_interface(); ++#endif ++#ifdef HAVE_CURSES ++ if (strcmp(argv[0], "ettercap-curses") == 0) ++ select_curses_interface(); ++#endif ++ if (strcmp(argv[0], "ettercap-text") == 0) ++ select_text_interface(); ++ + for (c = 0; c < argc; c++) + DEBUG_MSG("parse_options -- [%d] [%s]", c, argv[c]); + +@@ -215,11 +230,20 @@ + break; + + case 'C': ++#ifdef HAVE_NCURSES + select_curses_interface(); ++#else ++ fprintf(stdout, "\nncurses-interface not supported.\n\n"); ++ clean_exit(-1); ++#endif + break; +- + case 'G': ++#ifdef HAVE_GTK + select_gtk_interface(); ++#else ++ fprintf(stdout, "\nGTK-Interface not supported.\n\n"); ++ clean_exit(-1); ++#endif + break; + + case 'D': +@@ -429,8 +453,9 @@ + if (GBL_OPTIONS->read && GBL_OPTIONS->mitm) + FATAL_ERROR("Cannot use mitm attacks while reading from file"); + +- if (GBL_UI->init == NULL) ++ if (GBL_UI->init == NULL) { + FATAL_ERROR("Please select an User Interface"); ++ } + + /* force text interface for only mitm attack */ + if (GBL_OPTIONS->only_mitm) { diff --git a/ettercap-README.fedora b/ettercap-README.fedora new file mode 100644 index 0000000..a650f34 --- /dev/null +++ b/ettercap-README.fedora @@ -0,0 +1,15 @@ +Ettercap has been split into the following 4 packages: + +1. ettercap: Ettercap without GTK support +2. ettercap-gtk: Ettercap with GTK support +3. ettercap-plugins: The plugins provided in the upstream source. +4. ettercan-commons: Files and documentation needed by both ettercap and +ettercap-gtk + +To run the GTK version, simply use the Desktop icon provided. To run the +Text or Curses verions, use the ettercap-tui binary. In any case, you +may still select your UI with command-line flags, -T, -C and -G, or use +ettercap-text and ettercap-curses. + +"alternatives --config ettercap" allows switching between default tui and +default gui if both packages are installed. \ No newline at end of file diff --git a/ettercap.desktop b/ettercap.desktop new file mode 100644 index 0000000..7ef7bf7 --- /dev/null +++ b/ettercap.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Ettercap +Comment=Nework sniffer/analyser +Exec=ettercap-gtk +Icon=ettercap.png +Terminal=false +Type=Application +Categories=Network; diff --git a/ettercap.spec b/ettercap.spec new file mode 100644 index 0000000..fd02a87 --- /dev/null +++ b/ettercap.spec @@ -0,0 +1,216 @@ +Name: ettercap +Version: 0.7.3 +Release: 12%{?dist} +Summary: Network traffic sniffer/analyser, NCURSES interface version +Group: Applications/Internet +License: GPL +URL: http://ettercap.sourceforge.net +Source0: http://downloads.sourceforge.net/ettercap/ettercap-NG-%{version}.tar.gz +Source1: ettercap.desktop +Source2: ettercap-README.fedora +Patch0: ettercap-NG-0.7.3-UI.patch +BuildRoot: %{_tmppath}/%{name}-NG-%{version}-%{release}-root%(%{__id_u} -n) + +BuildRequires: libpcap-devel +BuildRequires: libnet-devel +BuildRequires: desktop-file-utils +BuildRequires: gtk2-devel +BuildRequires: ncurses-devel +BuildRequires: openssl-devel +BuildRequires: pcre-devel +BuildRequires: libtool-ltdl-devel + +Requires: ettercap-common = %{version}-%{release} +Requires(post): %{_sbindir}/alternatives +Requires(preun): %{_sbindir}/alternatives + +%description +Ettercap is a suite for man in the middle attacks on LAN. It features +sniffing of live connections, content filtering on the fly and many other +interesting tricks. It supports active and passive dissection of many +protocols (even ciphered ones) and includes many feature for network and host +analysis. + +This package contains the NCURSES version. + +%package common +Summary: Common files for Ettercap, Network traffic sniffer/analyser +Group: Applications/Internet +Requires: ettercap = %{version}-%{release} + +%description common +Ettercap is a suite for man in the middle attacks on LAN. It features +sniffing of live connections, content filtering on the fly and many other +interesting tricks. It supports active and passive dissection of many +protocols (even ciphered ones) and includes many feature for network and host +analysis. + +This package contains files common to both the GTK and NCURSES versions. + +%package gtk +Summary: Network traffic sniffer/analyser, gtk interface version +Group: Applications/Internet +Requires: ettercap-common = %{version}-%{release} +Requires(post): %{_sbindir}/alternatives +Requires(preun): %{_sbindir}/alternatives +Provides: ettercap = %{version}-%{release} + +%description gtk +Ettercap is a suite for man in the middle attacks on LAN. It features +sniffing of live connections, content filtering on the fly and many other +interesting tricks. It supports active and passive dissection of many +protocols (even ciphered ones) and includes many feature for network and host +analysis. + +This package contains the GTK version. + +%package plugins +Summary: Network traffic sniffer/analyser, gtk interface version +Group: Applications/Internet +Requires: ettercap-common = %{version}-%{release} + +%description plugins +Ettercap is a suite for man in the middle attacks on LAN. It features +sniffing of live connections, content filtering on the fly and many other +interesting tricks. It supports active and passive dissection of many +protocols (even ciphered ones) and includes many feature for network and host +analysis. + +This package contains the available plugins. + +%prep +%setup -q -n ettercap-NG-%{version} + +%patch0 -p1 + +%build +%configure --enable-gtk +make %{?_smp_mflags} +cp src/ettercap src/ettercap-gtk +make clean +%configure --disable-gtk +make %{?_smp_mflags} + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{_bindir} +make install DESTDIR=%{buildroot} +install -c -m 755 src/ettercap-gtk %{buildroot}%{_bindir} +mv %{buildroot}%{_bindir}/ettercap %{buildroot}%{_bindir}/ettercap-tui +rm %{buildroot}%{_libdir}/ettercap/*.la +mkdir -p %{buildroot}%{_docdir} +install -c -m 644 %{SOURCE2} %{buildroot}%{_docdir} + +mkdir -p %{buildroot}%{_datadir}/applications +desktop-file-install --vendor fedora \ + --dir %{buildroot}%{_datadir}/applications \ + %{SOURCE1} + +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps +install -p -m 644 share/ettercap.png \ + %{buildroot}%{_datadir}/icons/hicolor/32x32/apps + +%post +%{_sbindir}/alternatives --install %{_bindir}/ettercap ettercap \ +%{_bindir}/ettercap-tui 30 --slave %{_bindir}/ettercap ettercap \ +%{_bindir}/ettercap-text 40 --slave %{_bindir}/ettercap ettercap \ +%{_bindir}/ettercap-curses 50 + +%preun +if [ "$1" = 0 ]; then + %{_sbindir}/alternatives --remove ettercap %{_bindir}/ettercap-tui + %{_sbindir}/alternatives --remove ettercap %{_bindir}/ettercap-text + %{_sbindir}/alternatives --remove ettercap %{_bindir}/ettercap-curses +fi + +%post gtk +touch --no-create %{_datadir}/icons/hicolor || : +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : +fi + +%{_sbindir}/alternatives --install %{_bindir}/ettercap ettercap \ +%{_bindir}/ettercap-gtk 30 + +%preun gtk +if [ "$1" = 0 ]; then + %{_sbindir}/alternatives --remove ettercap %{_bindir}/ettercap-gtk +fi + +%postun gtk +touch --no-create %{_datadir}/icons/hicolor || : +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : +fi + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%{_bindir}/ettercap-tui +%{_mandir}/man8/ettercap_curses.8.gz + +%files common +%defattr(-,root,root,-) +%doc LICENSE AUTHORS CHANGELOG THANKS TODO* README doc/ +%{_docdir}/ettercap-README.fedora +%config(noreplace) %{_sysconfdir}/etter.conf +%{_bindir}/etterfilter +%{_bindir}/etterlog +%{_datadir}/ettercap +%{_mandir}/man5/etter.conf.5.gz +%{_mandir}/man8/ettercap.8.gz +%{_mandir}/man8/etterfilter.8.gz +%{_mandir}/man8/etterlog.8.gz + +%files gtk +%defattr(-,root,root,-) +%{_bindir}/ettercap-gtk +%{_datadir}/applications/fedora-ettercap.desktop +%{_datadir}/icons/hicolor/32x32/apps/ettercap.png + +%files plugins +%defattr(-,root,root,-) +%{_mandir}/man8/ettercap_plugins.8.gz +%{_libdir}/ettercap + +%changelog +* Fri Mar 16 2007 Jon Ciesla - 0.7.3-13 +- Added -text -curses symlinks +* Thu Mar 15 2007 Jon Ciesla - 0.7.3-12 +- Added ettercap-README.fedora +- Fixed Requires versioning. +* Thu Mar 15 2007 Jon Ciesla - 0.7.3-11 +- Fixed several typos, clarified a few minor things. +* Thu Mar 15 2007 Jon Ciesla - 0.7.3-10 +- Added doc and README. +- Replaced symlinks with alternatives solution. +* Thu Mar 15 2007 Jon Ciesla - 0.7.3-9 +- Removed libtool BR. +- Removed .la files. +- Moved plugins to subpackage. +- Re-added Provides to GTK package. +* Tue Mar 13 2007 Jon Ciesla - 0.7.3-8 +- Added libtool-ltdl-devel BR. +- Removed full path from desktop. +- Dropped provides from gtk package +* Tue Mar 13 2007 Jon Ciesla - 0.7.3-7 +- Fixed .desktop icon path +* Tue Mar 13 2007 Jon Ciesla - 0.7.3-6 +- Moved to consistent buildroot. +- Fixed BR, Rs. +* Tue Mar 13 2007 Jon Ciesla - 0.7.3-5 +- Removed dupes, moved symlinks for t and c to common only +- Moved desktop scriptlets to gtk package. +- Moved curses man page to curses package. +* Tue Mar 13 2007 Jon Ciesla - 0.7.3-4 +- Added Provides +* Tue Mar 13 2007 Jon Ciesla - 0.7.3-3 +- Updated BRs. +- Split out gtk and NCURSES versions from common package. +- Added UI patch from Till Maas, symlinks, .desktop, icon installation. +* Sat Mar 10 2007 Jon Ciesla - 0.7.3-2 +- Corrected Source URL. +* Sat Mar 10 2007 Jon Ciesla - 0.7.3-1 +- Initial packaging.