66 lines
1.1 KiB
Bash
Executable File
66 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
# $OpenBSD: nessus-config,v 1.5 2002/05/25 10:38:58 reinhard Exp $
|
|
#
|
|
# Nessus libraries configuration script
|
|
#
|
|
# Original by dug song <dugsong@monkey.org>
|
|
# Enhanced by Matt Behrens <matt@openbsd.org>
|
|
#
|
|
|
|
|
|
VERSION=@@VERS@@
|
|
LIBDIR=@@WRKSRC@@/nessus-libraries
|
|
COREDIR=@@WRKSRC@@/nessus-core
|
|
DEFS="-DSYSTEM_PCAP"
|
|
CIPHER_CFLAGS="-DNESSUS_ON_SSL"
|
|
SSL_CFLAGS="-DHAVE_SSL -I/usr/include/openssl"
|
|
EXTRA="-lutil -lresolv -L/usr/lib -lssl -lcrypto "
|
|
EGDPATH=""
|
|
|
|
|
|
usage()
|
|
{
|
|
echo "Usage : nessus-config [ --cflags | --libs | --version | --egd ]"
|
|
exit $1
|
|
}
|
|
|
|
|
|
test $# -gt 0 || usage 1
|
|
|
|
|
|
# check whether we have echo -n, depending
|
|
# on the current shell, used
|
|
case `echo -n` in
|
|
\-n) Xn= ; Xc='\c' ;;
|
|
*) Xn=-n ; Xc=
|
|
esac
|
|
|
|
while test $# -gt 0; do
|
|
case "$1" in
|
|
--version)
|
|
echo $VERSION
|
|
exit 0
|
|
;;
|
|
--libs)
|
|
|
|
echo $Xn "-lc -L$LIBDIR/libnessus/.libs -lnessus -L$LIBDIR/libhosts_gatherer/.libs -lhosts_gatherer -lpcap $EXTRA $Xc"
|
|
;;
|
|
--cflags)
|
|
echo $Xn "-I$COREDIR/include -I$LIBDIR/include $DEFS $CIPHER_CFLAGS $SSL_CFLAGS $Xc"
|
|
;;
|
|
--egd)
|
|
echo $Xn "$EGDPATH" $Xc
|
|
;;
|
|
--help | -h)
|
|
usage 0
|
|
;;
|
|
*)
|
|
usage 1
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
echo
|
|
|