Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37907408
en ru br
Репозитории ALT
5.1: 2.4-alt0.10.b1
4.1: 2.4-alt0.9.b1.1
4.0: 2.4-alt0.9.b1.1
3.0: 2.4-alt0.6.b1.1
www.altlinux.org/Changes

Группа :: Мониторинг
Пакет: dsniff

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: dsniff-2.4b1-deb-arp.patch
Скачать


## 04_multiple_intf.dpatch by Steve Kemp <skx@debian.org>
##
## DP: Work with multiple interfaces, Closes #242369.
--- dsniff-2.4b1.orig/arp.c	2001-03-15 11:32:58 +0300
+++ dsniff-2.4b1/arp.c	2004-09-05 20:50:40 +0400
@@ -39,7 +39,7 @@
 
 #ifdef BSD
 int
-arp_cache_lookup(in_addr_t ip, struct ether_addr *ether)
+arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char* linf)
 {
 	int mib[6];
 	size_t len;
@@ -91,7 +91,7 @@ arp_cache_lookup(in_addr_t ip, struct et
 #endif
 
 int
-arp_cache_lookup(in_addr_t ip, struct ether_addr *ether)
+arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char* linf)
 {
 	int sock;
 	struct arpreq ar;
@@ -99,7 +99,7 @@ arp_cache_lookup(in_addr_t ip, struct et
 	
 	memset((char *)&ar, 0, sizeof(ar));
 #ifdef __linux__
-	strncpy(ar.arp_dev, "eth0", sizeof(ar.arp_dev));   /* XXX - *sigh* */
+	strncpy(ar.arp_dev, linf, strlen(linf));
 #endif
 	sin = (struct sockaddr_in *)&ar.arp_pa;
 	sin->sin_family = AF_INET;
--- dsniff-2.4b1.orig/arp.h	2001-03-15 11:27:08 +0300
+++ dsniff-2.4b1/arp.h	2004-09-05 20:50:40 +0400
@@ -11,6 +11,6 @@
 #ifndef _ARP_H_
 #define _ARP_H_
 
-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* linf);
 
 #endif /* _ARP_H_ */
--- dsniff-2.4b1.orig/arpspoof.c	2001-03-15 11:32:58 +0300
+++ dsniff-2.4b1/arpspoof.c	2004-09-05 20:50:40 +0400
@@ -113,7 +113,7 @@ arp_find(in_addr_t ip, struct ether_addr
 	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. */
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin