diff -urN dsniff-2.4.orig/configure.in dsniff-2.4/configure.in
--- dsniff-2.4.orig/configure.in 2007-01-29 21:23:50.134521506 +0000
+++ dsniff-2.4/configure.in 2007-01-29 21:29:21.093381775 +0000
@@ -86,77 +86,9 @@
fi
dnl Checks for Berkeley DB
-AC_MSG_CHECKING(for Berkeley DB with 1.85 compatibility)
-AC_ARG_WITH(db,
-[ --with-db=DIR use Berkeley DB (with --enable-compat185) in DIR],
-[ case "$withval" in
- yes|no)
- AC_MSG_RESULT(no)
- ;;
- *)
- AC_MSG_RESULT($withval)
- if test -f $withval/build_unix/db_185.h -a \
- -f $withval/build_unix/libdb.a; then
- owd=`pwd`
- if cd $withval; then withval=`pwd`; cd $owd; fi
- AC_DEFINE(HAVE_DB_185_H)
- DBINC="-I$withval/build_unix"
- DBLIB="-L$withval/build_unix -ldb"
- elif test -f $withval/dist/db_185.h -a \
- -f $withval/dist/libdb.a; then
- owd=`pwd`
- if cd $withval; then withval=`pwd`; cd $owd; fi
- AC_DEFINE(HAVE_DB_185_H)
- DBINC="-I$withval/dist"
- DBLIB="-L$withval/dist -ldb"
- elif test -f $withval/include/db_185.h -a \
- -f $withval/lib/libdb.a; then
- owd=`pwd`
- if cd $withval; then withval=`pwd`; cd $owd; fi
- AC_DEFINE(HAVE_DB_185_H)
- DBINC="-I$withval/include"
- DBLIB="-L$withval/lib -ldb"
- else
- AC_ERROR(db_185.h or libdb.a not found in $withval or not configured with --enable-compat185)
- fi
- ;;
- esac ],
-[ for dir in ${prefix}/BerkeleyDB.3.1 ${prefix}/BerkeleyDB.3.0 \
- ${prefix}/BerkeleyDB ${prefix}/db ${prefix}; do
- if test -f ${dir}/include/db_185.h; then
- AC_DEFINE(HAVE_DB_185_H)
- DBINC="-I${dir}/include"
- DBLIB="-L${dir}/lib -ldb"
- have_db=yes
- break
- elif test -f ${dir}/include/db.h; then
- AC_DEFINE(HAVE_DB_H)
- DBINC="-I${dir}/include"
- DBLIB="-L${dir}/lib -ldb"
- have_db=yes
- break
- fi
- done
- if test "x$have_db" = "x"; then
- if test -f /usr/include/db2/db_185.h; then
- AC_DEFINE(HAVE_DB_185_H)
- DBINC="-I/usr/include/db2"
- DBLIB="-ldb2"
- have_db=yes
- elif test -f /usr/include/db_185.h; then
- AC_DEFINE(HAVE_DB_185_H)
- DBLIB="-ldb"
- have_db=yes
- elif test -f /usr/include/db.h; then
- AC_DEFINE(HAVE_DB_H)
- have_db=yes
- fi
- fi
- if test "x$have_db" = "x"; then
- AC_ERROR(Berkeley DB with 1.85 compatibility not found)
- fi
- AC_MSG_RESULT(yes) ]
-)
+AC_DEFINE(HAVE_DB_185_H)
+DBINC="-I/usr/include/db3"
+DBLIB="-ldb-3.1"
AC_SUBST(DBINC)
AC_SUBST(DBLIB)
diff -urN dsniff-2.4.orig/Makefile.in dsniff-2.4/Makefile.in
--- dsniff-2.4.orig/Makefile.in 2007-01-29 21:23:50.126521050 +0000
+++ dsniff-2.4/Makefile.in 2007-01-29 21:24:18.632145493 +0000
@@ -29,7 +29,7 @@
NIDSLIB = @NIDSLIB@
DBINC = @DBINC@
-DBLIB = @DBLIB@
+DBLIB = @DBLIB@ -lpthread
SSLINC = @SSLINC@
SSLLIB = @SSLLIB@
diff -urN dsniff-2.4.orig/sshcrypto.c dsniff-2.4/sshcrypto.c
--- dsniff-2.4.orig/sshcrypto.c 2007-01-29 21:23:50.158522874 +0000
+++ dsniff-2.4/sshcrypto.c 2007-01-29 21:24:18.640145952 +0000
@@ -14,6 +14,8 @@
#include <sys/types.h>
#include <openssl/ssl.h>
+#include <openssl/blowfish.h>
+#include <openssl/des.h>
#include <err.h>
#include <stdio.h>
diff -urN dsniff-2.4.orig/sshow.c dsniff-2.4/sshow.c
--- dsniff-2.4.orig/sshow.c 2007-01-29 21:23:50.186524470 +0000
+++ dsniff-2.4/sshow.c 2007-01-29 21:24:18.648146402 +0000
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#include <ctype.h>
#include <unistd.h>
#include <signal.h>
@@ -222,7 +223,7 @@
if (debug)
printf("- %s -> %s: DATA (%s bytes, %.2f seconds)\n",
s_saddr(ts), s_daddr(ts), s_range(plain_range),
- (float)delay / CLK_TCK);
+ (float)delay / CLOCKS_PER_SEC);
if (debug > 1)
print_data(&ts->server, cipher_size);
@@ -270,7 +271,7 @@
if (debug)
printf("- %s <- %s: DATA (%s bytes, %.2f seconds)\n",
s_saddr(ts), s_daddr(ts), s_range(plain_range),
- (float)delay / CLK_TCK);
+ (float)delay / CLOCKS_PER_SEC);
if (debug > 1)
print_data(&ts->client, cipher_size);
@@ -299,7 +300,7 @@
if (session->state == 1 &&
#ifdef USE_TIMING
- now - get_history(session, 2)->timestamp >= CLK_TCK &&
+ now - get_history(session, 2)->timestamp >= CLOCKS_PER_SEC &&
#endif
session->protocol == 1 &&
(session->history.directions & 7) == 5 &&