Permalink
Browse files

only use own hw address by default for arpspoof

  • Loading branch information...
wertarbyte committed Nov 30, 2011
1 parent 44a0015 commit 86b5485ed0403b99504a83c87071f6e3aa611b70
Showing with 14 additions and 10 deletions.
  1. +4 −1 arpspoof.8
  2. +10 −9 arpspoof.c
View
@@ -26,7 +26,10 @@ Specify the interface to use.
.IP "\fB-c \fIown|host|both\fR"
Specify which hardware address t use when restoring the arp configuration;
while cleaning up, packets can be send with the own address as well as with
-the address of the host.
+the address of the host. Sending packets with a fake hw address can disrupt
+connectivity with certain switch/ap/bridge configurations, however it works
+more reliably than using the own address, which is the default way arpspoof
+cleans up afterwards.
.IP "\fB-t \fItarget\fR"
Specify a particular host to ARP poison (if not specified, all hosts
on the LAN). Repeat to specify multiple hosts.
View
@@ -239,25 +239,26 @@ main(int argc, char *argv[])
usage();
}
- if (!cleanup_src || strcmp(cleanup_src, "host")==0) { /* default! */
- /* only use the target hw address when cleaning up;
- * this can screw up some bridges and scramble access
- * for our own host.
- */
- cleanup_src_own = 0;
- cleanup_src_host = 1;
- } else if (strcmp(cleanup_src, "own")==0) {
+ if (!cleanup_src || strcmp(cleanup_src, "own")==0) { /* default! */
/* only use our own hw address when cleaning up,
* not jeopardizing any bridges on the way to our
* target
*/
cleanup_src_own = 1;
cleanup_src_host = 0;
+ } else if (strcmp(cleanup_src, "host")==0) {
+ /* only use the target hw address when cleaning up;
+ * this can screw up some bridges and scramble access
+ * for our own host, however it resets the arp table
+ * more reliably
+ */
+ cleanup_src_own = 0;
+ cleanup_src_host = 1;
} else if (strcmp(cleanup_src, "both")==0) {
cleanup_src_own = 1;
cleanup_src_host = 1;
} else {
- errx(1, "Invalid parameter to -c: use 'own', 'host' or 'both'.");
+ errx(1, "Invalid parameter to -c: use 'own' (default), 'host' or 'both'.");
usage();
}

0 comments on commit 86b5485

Please sign in to comment.