2006-03-03 03:03:38 +02:00
|
|
|
diff -urN dsniff.old/arp.c dsniff.dev/arp.c
|
|
|
|
--- dsniff.old/arp.c 2001-03-15 09:32:58.000000000 +0100
|
|
|
|
+++ dsniff.dev/arp.c 2006-03-03 01:41:10.000000000 +0100
|
|
|
|
@@ -39,7 +39,7 @@
|
2005-09-12 17:58:34 +03:00
|
|
|
|
2006-03-03 03:03:38 +02:00
|
|
|
#ifdef BSD
|
2005-09-12 17:58:34 +03:00
|
|
|
int
|
|
|
|
-arp_cache_lookup(in_addr_t ip, struct ether_addr *ether)
|
2006-03-03 03:03:38 +02:00
|
|
|
+arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char *lif)
|
2005-09-12 17:58:34 +03:00
|
|
|
{
|
|
|
|
int mib[6];
|
|
|
|
size_t len;
|
2006-03-03 03:03:38 +02:00
|
|
|
@@ -91,7 +91,7 @@
|
2005-09-12 17:58:34 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
int
|
|
|
|
-arp_cache_lookup(in_addr_t ip, struct ether_addr *ether)
|
2006-03-03 03:03:38 +02:00
|
|
|
+arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char *lif)
|
2005-09-12 17:58:34 +03:00
|
|
|
{
|
|
|
|
int sock;
|
|
|
|
struct arpreq ar;
|
2006-03-03 03:03:38 +02:00
|
|
|
@@ -99,7 +99,7 @@
|
2005-09-12 17:58:34 +03:00
|
|
|
|
|
|
|
memset((char *)&ar, 0, sizeof(ar));
|
|
|
|
#ifdef __linux__
|
|
|
|
- strncpy(ar.arp_dev, "eth0", sizeof(ar.arp_dev)); /* XXX - *sigh* */
|
|
|
|
+ strncpy(ar.arp_dev, lif, strlen(lif));
|
|
|
|
#endif
|
|
|
|
sin = (struct sockaddr_in *)&ar.arp_pa;
|
|
|
|
sin->sin_family = AF_INET;
|
2006-03-03 03:03:38 +02:00
|
|
|
diff -urN dsniff.old/arp.h dsniff.dev/arp.h
|
|
|
|
--- dsniff.old/arp.h 2001-03-15 09:27:08.000000000 +0100
|
|
|
|
+++ dsniff.dev/arp.h 2006-03-03 01:42:23.000000000 +0100
|
|
|
|
@@ -11,6 +11,6 @@
|
|
|
|
#ifndef _ARP_H_
|
|
|
|
#define _ARP_H_
|
2005-09-12 17:58:34 +03:00
|
|
|
|
2006-03-03 03:03:38 +02:00
|
|
|
-int arp_cache_lookup(in_addr_t ip, struct ether_addr *ether);
|
|
|
|
+int arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char *lif);
|
2005-09-12 17:58:34 +03:00
|
|
|
|
2006-03-03 03:03:38 +02:00
|
|
|
#endif /* _ARP_H_ */
|
|
|
|
diff -urN dsniff.old/arpspoof.c dsniff.dev/arpspoof.c
|
|
|
|
--- dsniff.old/arpspoof.c 2001-03-15 09:32:58.000000000 +0100
|
|
|
|
+++ dsniff.dev/arpspoof.c 2006-03-03 01:42:00.000000000 +0100
|
|
|
|
@@ -113,7 +113,7 @@
|
2005-09-12 17:58:34 +03:00
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
do {
|
|
|
|
- if (arp_cache_lookup(ip, mac) == 0)
|
|
|
|
+ if (arp_cache_lookup(ip, mac, intf) == 0)
|
|
|
|
return (1);
|
|
|
|
#ifdef __linux__
|
|
|
|
/* XXX - force the kernel to arp. feh. */
|