summaryrefslogtreecommitdiffstats
path: root/openwrt/package/dsniff
diff options
context:
space:
mode:
authorwbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-06-11 15:19:17 +0000
committerwbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-06-11 15:19:17 +0000
commite12528e55ddb074487a37c757623d2f5e18223f8 (patch)
tree837b2b74134f76d8d0aee9ffbd8d01c0df8f2165 /openwrt/package/dsniff
parent18bd15a91ce1c0023d317f253011b2e60fc533c6 (diff)
fix dsniff read -r
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1201 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/package/dsniff')
-rw-r--r--openwrt/package/dsniff/patches/gdbm.patch43
-rw-r--r--openwrt/package/dsniff/patches/noyp.patch15
2 files changed, 38 insertions, 20 deletions
diff --git a/openwrt/package/dsniff/patches/gdbm.patch b/openwrt/package/dsniff/patches/gdbm.patch
index 06f92d92c..30190abc9 100644
--- a/openwrt/package/dsniff/patches/gdbm.patch
+++ b/openwrt/package/dsniff/patches/gdbm.patch
@@ -1,6 +1,6 @@
diff -Nur dsniff-2.3/configure dsniff-2.3.patched/configure
---- dsniff-2.3/configure 2005-06-11 16:38:47.000000000 +0200
-+++ dsniff-2.3.patched/configure 2005-06-11 16:39:26.000000000 +0200
+--- dsniff-2.3/configure 2005-06-11 18:13:59.000000000 +0200
++++ dsniff-2.3.patched/configure 2005-06-11 18:14:37.000000000 +0200
@@ -16,6 +16,8 @@
ac_help="$ac_help
--with-db=DIR use Berkeley DB (with --enable-compat185) in DIR"
@@ -53,7 +53,7 @@ diff -Nur dsniff-2.3/configure dsniff-2.3.patched/configure
echo $ac_n "checking for libnet""... $ac_c" 1>&6
diff -Nur dsniff-2.3/record.c dsniff-2.3.patched/record.c
--- dsniff-2.3/record.c 2000-11-14 16:51:02.000000000 +0100
-+++ dsniff-2.3.patched/record.c 2005-06-11 16:39:49.000000000 +0200
++++ dsniff-2.3.patched/record.c 2005-06-11 18:14:56.000000000 +0200
@@ -13,12 +13,7 @@
#include <stdio.h>
#include <time.h>
@@ -77,7 +77,15 @@ diff -Nur dsniff-2.3/record.c dsniff-2.3.patched/record.c
static int
xdr_rec(XDR *xdrs, struct rec *rec)
-@@ -86,10 +81,10 @@
+@@ -61,7 +56,6 @@
+
+ tm = localtime(&rec->time);
+ strftime(tstr, sizeof(tstr), "%x %X", tm);
+-
+ srcp = libnet_host_lookup(rec->src, Opt_dns);
+ dstp = libnet_host_lookup(rec->dst, Opt_dns);
+
+@@ -86,10 +80,10 @@
fflush(stdout);
}
@@ -90,7 +98,7 @@ diff -Nur dsniff-2.3/record.c dsniff-2.3.patched/record.c
static u_char hash[16];
MD5_CTX ctx;
-@@ -102,16 +97,16 @@
+@@ -102,16 +96,16 @@
MD5Update(&ctx, rec->data.n_bytes, rec->data.n_len);
MD5Final(hash, &ctx);
@@ -111,7 +119,7 @@ diff -Nur dsniff-2.3/record.c dsniff-2.3.patched/record.c
XDR xdrs;
u_char buf[2048];
-@@ -120,15 +115,15 @@
+@@ -120,15 +114,15 @@
if (!xdr_rec(&xdrs, rec))
return (0);
@@ -131,33 +139,34 @@ diff -Nur dsniff-2.3/record.c dsniff-2.3.patched/record.c
return (1);
}
-@@ -136,18 +131,22 @@
+@@ -136,18 +130,22 @@
void
record_dump(void)
{
- DBT key, data;
-+ datum nextkey, data;
++ datum nextkey, key, content;
XDR xdrs;
struct rec rec;
- while (db->seq(db, &key, &data, R_NEXT) == 0) {
-+ data = gdbm_firstkey ( dbf );
-+ while (data.dptr) {
-+ nextkey = gdbm_nextkey ( dbf, data );
++ key = gdbm_firstkey(dbf);
++ while (key.dptr) {
++ nextkey = gdbm_nextkey(dbf, key);
++ content = gdbm_fetch(dbf, key);
memset(&rec, 0, sizeof(rec));
- xdrmem_create(&xdrs, data.data, data.size, XDR_DECODE);
-+ xdrmem_create(&xdrs, data.dptr, data.dsize, XDR_DECODE);
-
+-
++ xdrmem_create(&xdrs, content.dptr, content.dsize, XDR_DECODE);
if (xdr_rec(&xdrs, &rec)) {
record_print(&rec);
}
xdr_destroy(&xdrs);
-+ free(data.dptr);
-+ data = nextkey;
++ free(key.dptr);
++ key = nextkey;
}
}
-@@ -155,16 +154,23 @@
+@@ -155,16 +153,23 @@
record_init(char *file)
{
int flags, mode;
@@ -185,7 +194,7 @@ diff -Nur dsniff-2.3/record.c dsniff-2.3.patched/record.c
return (0);
return (1);
-@@ -203,6 +209,6 @@
+@@ -203,6 +208,6 @@
void
record_close(void)
{
diff --git a/openwrt/package/dsniff/patches/noyp.patch b/openwrt/package/dsniff/patches/noyp.patch
index 47dda9515..48393e20a 100644
--- a/openwrt/package/dsniff/patches/noyp.patch
+++ b/openwrt/package/dsniff/patches/noyp.patch
@@ -1,6 +1,6 @@
diff -Nur dsniff-2.3/decode.c dsniff-2.3.patched/decode.c
--- dsniff-2.3/decode.c 2000-12-15 21:03:26.000000000 +0100
-+++ dsniff-2.3.patched/decode.c 2005-06-09 15:20:16.000000000 +0200
++++ dsniff-2.3.patched/decode.c 2005-06-11 18:17:48.000000000 +0200
@@ -49,8 +49,6 @@
extern int decode_portmap(u_char *, int, u_char *, int);
extern int decode_mountd(u_char *, int, u_char *, int);
@@ -19,9 +19,18 @@ diff -Nur dsniff-2.3/decode.c dsniff-2.3.patched/decode.c
{ NULL }
};
+diff -Nur dsniff-2.3/dsniff.services dsniff-2.3.patched/dsniff.services
+--- dsniff-2.3/dsniff.services 2000-12-15 21:10:58.000000000 +0100
++++ dsniff-2.3.patched/dsniff.services 2005-06-11 18:19:27.000000000 +0200
+@@ -66,5 +66,3 @@
+ aim 9898/tcp
+ pcanywhere 65301/tcp
+ mountd 100005/rpc
+-ypserv 100004/rpc
+-yppasswd 100009/rpc
diff -Nur dsniff-2.3/Makefile.in dsniff-2.3.patched/Makefile.in
---- dsniff-2.3/Makefile.in 2005-06-09 15:20:41.000000000 +0200
-+++ dsniff-2.3.patched/Makefile.in 2005-06-09 15:18:51.000000000 +0200
+--- dsniff-2.3/Makefile.in 2005-06-11 18:17:20.000000000 +0200
++++ dsniff-2.3.patched/Makefile.in 2005-06-11 18:17:48.000000000 +0200
@@ -60,7 +60,7 @@
decode_pop.c decode_portmap.c decode_postgresql.c decode_pptp.c \
decode_rip.c decode_rlogin.c decode_smb.c decode_smtp.c \