#!/usr/bin/perl -w # Copyright (C) Matt McKinley # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # This is a program that is going to add functionality # to the arpoison program. The arpoison program is used # to update the ARP cache on a customer's router. There # are cases where the customer cannot update the router's # ARP cache. This sends out an ARP reply that was not # requested. In some cases this is not going to work. # Some routers have unsolicited ARP replies turned off. # This is a problem in which case this will not work. # You will know if it does not. use strict; # Variables # my( $interface ); my( $dest_IP ); my( $src_IP ); my( $target_MAC ); my( $src_MAC ); # printing the information needed print( "\n\n" ); print( "Here is some of the information you are going to need:\n" ); system( "/sbin/arp -an"); print( "\n\n" ); system( "/sbin/ifconfig" ); print( "\n\n" ); print( "Enter the interface: \n" ); $interface = ; chomp( $interface ); print( "Enter the IP of the router: \n" ); $dest_IP = ; chomp( $dest_IP ); print( "Enter the IP of the machine you wish to update: \n" ); $src_IP = ; chomp( $src_IP ); print( "Enter the MAC address of the router: \n" ); $target_MAC = ; chomp( $target_MAC ); print( "Enter the MAC address of the iSensor interface in question: \n" ); $src_MAC = ; chomp( $src_MAC ); system( "./arpoison -i $interface -d $dest_IP -s $src_IP -t $target_MAC -r $src_MAC" ); print( "Done\n" );