aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--network/amap/README4
-rw-r--r--network/amap/amap.SlackBuild82
-rw-r--r--network/amap/amap.info8
-rw-r--r--network/amap/slack-desc19
-rw-r--r--network/amap/slackware.patch128
5 files changed, 241 insertions, 0 deletions
diff --git a/network/amap/README b/network/amap/README
new file mode 100644
index 0000000000000..1e9d43e02d05b
--- /dev/null
+++ b/network/amap/README
@@ -0,0 +1,4 @@
+Amap is a next-generation scanning tool for pentesters. It attempts to identify
+applications even if they are running on a different port than normal.
+It also identifies non-ascii based applications. This is achieved by sending
+trigger packets, and looking up the responses in a list of response strings.
diff --git a/network/amap/amap.SlackBuild b/network/amap/amap.SlackBuild
new file mode 100644
index 0000000000000..7c6d2cf64efc8
--- /dev/null
+++ b/network/amap/amap.SlackBuild
@@ -0,0 +1,82 @@
+#!/bin/sh
+
+# Slackware build script for Amap (Application Mapper)
+#
+# Copyright 2009-2010 Marco Bonetti <sid77@slackware.it>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PRGNAM=amap
+VERSION=${VERSION:-5.2}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+DOCS="LICENCE.AMAP LICENSE.GNU README"
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Add DESTDIR support and fix up a few other things
+patch -p1 < $CWD/slackware.patch
+
+./configure --prefix=/usr
+
+make
+make install DESTDIR=$PKG
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/network/amap/amap.info b/network/amap/amap.info
new file mode 100644
index 0000000000000..2126eda05db6b
--- /dev/null
+++ b/network/amap/amap.info
@@ -0,0 +1,8 @@
+PRGNAM="amap"
+VERSION="5.2"
+HOMEPAGE="http://freeworld.thc.org/thc-amap/"
+DOWNLOAD="http://freeworld.thc.org/releases/amap-5.2.tar.gz"
+MD5SUM="e3b1f5ebd24aac03aacb38ec183eb426"
+MAINTAINER="Marco Bonetti"
+EMAIL="sid77@slackware.it"
+APPROVED="rworkman"
diff --git a/network/amap/slack-desc b/network/amap/slack-desc
new file mode 100644
index 0000000000000..e5feee0104f39
--- /dev/null
+++ b/network/amap/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler---------------------------------------------------------|
+amap: Amap (Application Mapper)
+amap:
+amap: Amap is a next-generation tool for assisting network penetration
+amap: testing. It performs fast and reliable application protocol detection,
+amap: independant on the TCP/UDP port they are being bound to.
+amap:
+amap:
+amap:
+amap:
+amap:
+amap:
diff --git a/network/amap/slackware.patch b/network/amap/slackware.patch
new file mode 100644
index 0000000000000..dc3fa3c449600
--- /dev/null
+++ b/network/amap/slackware.patch
@@ -0,0 +1,128 @@
+diff -Naur amap-5.2.orig/Makefile.am amap-5.2/Makefile.am
+--- amap-5.2.orig/Makefile.am 2005-09-22 17:39:18.000000000 +0200
++++ amap-5.2/Makefile.am 2009-03-03 13:48:56.000000000 +0100
+@@ -1,13 +1,13 @@
+ CC=gcc
+-LIB=-lpcre -L./pcre-3.9/ -I./pcre-3.9/
+-OPT=-O2
++LIB=-lpcre
++OPT=-O2 -march=i386 -mtune=i686
+ OPT_DEBUG=-ggdb -Wall -lefence
+ BINDIR=/bin
+-DATADIR=/etc
++DATADIR=/lib/amap
+ MANDIR=/man/man1
+ SCRIPTS=appdefs.trig appdefs.resp appdefs.rpc
+ MANPAGE=amap.1
+-all: pcre strip
++all: strip
+
+ pcre:
+ cd pcre-3.9 && make
+@@ -34,15 +34,15 @@
+ $(CC) $(OPT_DEBUG) -o amapcrap amapcrap.c $(XLIBS) $(XLIBPATHS) $(XIPATHS) $(XDEFINES)
+
+ install: all
+- @echo Installing to $(PREFIX), change this by running ./configure --prefix=path
+- -mkdir -vp $(PREFIX)$(BINDIR) 2> /dev/null
+- -mkdir -vp $(PREFIX)$(DATADIR) 2> /dev/null
+- -mkdir -vp $(PREFIX)$(MANDIR) 2> /dev/null
+- -test -e amap.exe || cp -f amap amap6 amapcrap $(PREFIX)$(BINDIR)
+- -test -e amap.exe && cp -f amap.exe amapcrap.exe $(PREFIX)$(BINDIR) || echo
+- -cp -f $(SCRIPTS) $(PREFIX)$(DATADIR)
+- -cp -f $(MANPAGE) $(PREFIX)$(MANDIR)
+- -test $(PREFIX)$(BINDIR)/amap6 || cd $(PREFIX)$(BINDIR) && ln -s amap amap6
++ @echo Installing to $(DESTDIR)$(PREFIX), change this by running ./configure --prefix=path
++ -mkdir -vp $(DESTDIR)$(PREFIX)$(BINDIR) 2> /dev/null
++ -mkdir -vp $(DESTDIR)$(PREFIX)$(DATADIR) 2> /dev/null
++ -mkdir -vp $(DESTDIR)$(PREFIX)$(MANDIR) 2> /dev/null
++ -test -e amap.exe || cp -f amap amap6 amapcrap $(DESTDIR)$(PREFIX)$(BINDIR)
++ -test -e amap.exe && cp -f amap.exe amapcrap.exe $(DESTDIR)$(PREFIX)$(BINDIR) || echo
++ -cp -f $(SCRIPTS) $(DESTDIR)$(PREFIX)$(DATADIR)
++ -cp -f $(MANPAGE) $(DESTDIR)$(PREFIX)$(MANDIR)
++ -test $(DESTDIR)$(PREFIX)$(BINDIR)/amap6 || cd $(DESTDIR)$(PREFIX)$(BINDIR) && ln -s amap amap6 || true
+
+ clean:
+ cd pcre-3.9 && make clean
+diff -Naur amap-5.2.orig/amap-inc.h amap-5.2/amap-inc.h
+--- amap-5.2.orig/amap-inc.h 2003-10-29 23:37:41.000000000 +0100
++++ amap-5.2/amap-inc.h 2009-03-03 13:49:14.000000000 +0100
+@@ -20,7 +20,7 @@
+ #include <errno.h>
+ #include <sys/resource.h>
+ #include <sys/wait.h>
+-#include "pcre-3.9/pcre.h"
++#include <pcre.h>
+ #ifdef OPENSSL
+ #include <openssl/ssl.h>
+ #include <openssl/err.h>
+diff -Naur amap-5.2.orig/amap-lib.c amap-5.2/amap-lib.c
+--- amap-5.2.orig/amap-lib.c 2005-09-07 23:22:24.000000000 +0200
++++ amap-5.2/amap-lib.c 2009-03-03 13:49:17.000000000 +0100
+@@ -306,7 +306,7 @@
+ strcpy(file_name, AMAP_PREFIX);
+ if (file_name[strlen(file_name) - 1] != '/')
+ strcat(file_name, "/");
+- strcat(file_name, "etc/");
++ strcat(file_name, "lib/amap/");
+ strcat(file_name, AMAP_DEFAULT_FILENAME);
+ strcat(file_name, extension);
+ f = fopen(file_name, "r");
+@@ -2032,9 +2032,9 @@
+ if (opt->update) {
+ printf("Running Online Update for fingerprints, connecting to %s\n", AMAP_RESOURCE);
+ if (opt->filename == NULL) {
+- opt->filename = malloc(strlen(AMAP_PREFIX) + 5 + strlen(AMAP_DEFAULT_FILENAME) + 2);
++ opt->filename = malloc(strlen(AMAP_PREFIX) + 10 + strlen(AMAP_DEFAULT_FILENAME) + 2);
+ strcpy(opt->filename, AMAP_PREFIX);
+- strcat(opt->filename, "/etc/");
++ strcat(opt->filename, "/lib/amap/");
+ strcat(opt->filename, AMAP_DEFAULT_FILENAME);
+ }
+ opt->file_log = malloc(strlen(opt->filename) + 6);
+diff -Naur amap-5.2.orig/amap.h amap-5.2/amap.h
+--- amap-5.2.orig/amap.h 2005-09-08 00:08:57.000000000 +0200
++++ amap-5.2/amap.h 2009-03-03 13:49:06.000000000 +0100
+@@ -22,7 +22,7 @@
+ #define AMAP_YEAR "2005"
+ #define AMAP_AUTHOR "van Hauser"
+ #define AMAP_EMAIL "amap-dev@thc.org"
+-#define AMAP_RESOURCE "www.thc.org/thc-amap"
++#define AMAP_RESOURCE "freeworld.thc.org/thc-amap"
+
+ #ifndef AMAP_PREFIX
+ #ifdef PREFIX
+diff -Naur amap-5.2.orig/configure amap-5.2/configure
+--- amap-5.2.orig/configure 2005-06-03 15:34:19.000000000 +0200
++++ amap-5.2/configure 2009-03-03 13:49:22.000000000 +0100
+@@ -152,17 +152,6 @@
+ XLIBS="$XLIBS -lresolv"
+ fi
+
+-for i in /usr/man /usr/share/man /usr/local/man /usr/local/share/man ; do
+- if [ -d $i ]; then
+- MANDIR=$i
+- fi
+-done
+-if [ "X" = "X$MANDIR" ]; then
+- MANDIR="/usr/local/man"
+-fi
+-echo "Manual page will be install to: $MANDIR"
+-echo
+-
+ if [ -d /usr/kerberos/include ]; then
+ XIPATHS="$XIPATHS -I/usr/kerberos/include"
+ fi
+@@ -172,7 +161,11 @@
+ else
+ PREFIX="/usr/local"
+ fi
+-echo "Amap will be installed into .../bin and .../etc of: $PREFIX"
++
++# fix mandir
++MANDIR=$PREFIX/man
++
++echo "Amap will be installed into $PREFIX/bin $PREFIX/lib/amap and $PREFIX/man"
+ echo " (change this by running ./configure --prefix=path)"
+ echo
+