#!/bin/sh echo "Don't forget to update this script with the change-log! Press ENTER to start..." read NAME="ettercap" VERSION="NG-0.7.3" SOURCE="http://sourceforge.net/projects/ettercap/files/ettercap/$VERSION/ettercap-$VERSION.tar.gz" CONFIGURE="--prefix=/usr/local --enable-static=zlib:libpthreads --enable-plugins --disable-gtk --mandir=/usr/local/share/man --with-libpcap=/usr/local/ --with-libnet=/usr/local --with-libncurses=/usr/local --with-libpcre=/usr/local --with-openssl=/usr/local" DATE=`date '+%Y/%m/%d'` export CFLAGS="-march=i486 -mtune=i686 -Os -pipe" export CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe" export LDFLAGS="-Wl,-O1" echo "Downloading essential packages..." tce-load -wi compiletc squashfs-tools-4.x openssl-0.9.8 libiconv libiconv-dev openssl-0.9.8-dev libpcap libpcap-dev libnet libnet-dev libtool libtool-dev pcre pcre-dev ncurses ncurses-dev cd /tmp/ wget $SOURCE sudo rm -rf $NAME-$VERSION 2>/dev/null sudo rm /tmp/$NAME.tcz /tmp/$NAME.tcz.list /tmp/$NAME.tcz.md5.txt /tmp/$NAME.tcz.dep 2>/dev/null sudo rm -rf /tmp/$NAME 2>/dev/null sudo rm /tmp/$NAME-doc.tcz /tmp/$NAME-doc.tcz.list /tmp/$NAME-doc.tcz.md5.txt /tmp/$NAME-doc.tcz.dep 2>/dev/null sudo rm -rf /tmp/$NAME-doc 2>/dev/null tar xvfz $NAME-$VERSION.tar.gz cd $NAME-$VERSION echo " Starting ./configure $CONFIGURE" ./configure $CONFIGURE echo "Press ENTER to continue... " read make -j3 echo " Starting make install to: /tmp/$NAME" sudo make DESTDIR=/tmp/$NAME install-strip cd /tmp/$NAME sudo find . | xargs file | grep "executable" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null sudo find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip -g 2> /dev/null mkdir -p /tmp/$NAME-doc/usr/local/share cd /tmp/$NAME/usr/local/share sudo mv man /tmp/$NAME-doc/usr/local/share/ echo "Creating package..." cd /tmp/ sudo mksquashfs $NAME $NAME.tcz sudo md5sum $NAME.tcz > $NAME.tcz.md5.txt cd $NAME sudo find usr -not -type d > ../$NAME.tcz.list cd /tmp/ SIZE="`du -k $NAME.tcz|cut -f1`k" sudo echo "Title: $NAME.tcz Description: Ettercap Version: $VERSION Author: Alberto Ornaghi, Marco Valleri Original-site: http://ettercap.sourceforge.net/ Copying-policy: GPLv2 Size: $SIZE Extension_by: andriscom Comments: 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. For man entries you can install the ettercap-doc.tcz package or visit: http://linux.die.net/man/8/ettercap Usage: #List plugins ettercap -T -P list #List interfaces ettercap -T -I #Check who is arp poisoning on my network (arp_cop plugin) ettercap -T -i eth0 -P arp_cop // #Search for an unused IP address in the subnet (find_ip plugin) ettercap -T -i eth0 -P find_ip // #Start ncurses based interface ettercap -C Built with CFLAGS: -march=i486 -mtune=i686 -Os -pipe Built with CXXFLAGS: -march=i486 -mtune=i686 -Os -pipe Built with LDFLAGS: -Wl,-O1 Built with the following options: ./configure $CONFIGURE Source: $SOURCE Change-log: $DATE Version: $VERSION Current: $DATE Version: $VERSION " > $NAME.tcz.info sudo echo "openssl-0.9.8.tcz libiconv.tcz libpcap.tcz libnet.tcz libtool.tcz pcre.tcz ncurses.tcz " > $NAME.tcz.dep echo "Creating doc package..." cd /tmp/ sudo mksquashfs $NAME-doc $NAME-doc.tcz sudo md5sum $NAME-doc.tcz > $NAME-doc.tcz.md5.txt cd $NAME-doc sudo find usr -not -type d > ../$NAME-doc.tcz.list cd /tmp/ SIZE="`du -k $NAME-doc.tcz|cut -f1`k" sudo echo "Title: $NAME-doc.tcz Description: Ettercap man pages Version: $VERSION Author: Alberto Ornaghi, Marco Valleri Original-site: http://ettercap.sourceforge.net/ Copying-policy: GPLv2 Size: $SIZE Extension_by: andriscom Comments: Manual entry files for ettercap $VERSION. The man pages can be viewed from the help menu in the ncurses based interface. Source: $SOURCE Change-log: $DATE Version: $VERSION Current: $DATE Version: $VERSION " > $NAME-doc.tcz.info sudo echo "$NAME.tcz " > $NAME-doc.tcz.dep cd /tmp/ mkdir packages 2>/dev/null sudo rm packages/$NAME.tar.gz 2>/dev/null tar zcf packages/$NAME.tar.gz $NAME.tcz* sudo rm packages/$NAME-doc.tar.gz 2>/dev/null tar zcf packages/$NAME-doc.tar.gz $NAME-doc.tcz* echo " Run bcrypt on /tmp/packages/*.tar.gz... give password: tinycore" echo "Run the extension_audit.sh and reboot a clean system to try the packages!" echo "Send it to: tcesubmit@gmail.com"