Skip to content

Commit

Permalink
ui formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ariakis committed Dec 11, 2019
1 parent e6a87f1 commit 170b646
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
15 changes: 9 additions & 6 deletions modules/change_mac
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,34 @@ then
interface=$2
interfacemon="${interface}mon"

echo ""

ifconfig $interface down
dhclient -r $interface &> /dev/null # release ip

if [ "$1" = "reset" ]; then
echo resetting
echo 'Resetting MAC address...'
echo
macchanger -p $interface

elif [ "$1" = "random" ]; then
echo randomising
echo 'Randomising MAC address...'
macchanger -r $interface

else
macchanger -m $1 $interface # change current device mac to input mac

fi

ifconfig $interface up
dhclient $interface &> /dev/null # get a new ip

echo "New mac: $1"
ifconfig $interface | grep inet
echo ""
else

echo ""
echo "Incorrect number of arguments!"
echo ""
echo "Useage:"
echo "$0 {mac address} {interface}"
echo ""

fi
6 changes: 4 additions & 2 deletions modules/check_macs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ then
pwd
#for i in {1..number of macs}
i=1

echo "Starting! Testing $maccount macs..."

while [ $i -le $maccount ]; do
echo "Starting! Testing $maccount macs..."
echo ""

# Get next mac address
curmac=$(head -n $i $1 | tail -n 1)

# change mac address
echo -n "Changing MAC... "
sudo modules/change_mac $curmac $interface
sudo modules/change_mac $curmac $interface &> /dev/null
echo "Done."

# Tell the user whats happening
Expand Down

0 comments on commit 170b646

Please sign in to comment.