Hello,
I am trying to write my own script that will pass user input to the macchanger program(I tire of typing ifconfig <interface> up and down over and over).
So I want to call a script that will close and open the interface for me, but accept user input for a specific mac address and pass it through to the macchanger program.
This is what I have attempted so far.
#1
Code:
#!/bin/bash
ifconfig wlan0 down
read -p "Enter Mac Address: " MACaddress
macchanger -m $MACaddress
ifconfig wlan0 up
#2
Code:
#!/bin/bash
ifconfig wlan0 down
echo "Enter Mac Address:
read MACaddress
macchanger -m $MACaddress
ifconfig wlan0 up
#3
Code:
#!/bin/bash
ifconfig wlan0 down
echo "Enter Mac Address:
read MACaddress
macchanger --mac=$MACaddress
ifconfig wlan0 up
I get this as a response for everything.
Code:
GNU MAC Changer
Usage: macchanger [options] device
Try `macchanger --help' for more options.
So there is obviously something I am missing. Either if the shell is just plain wrong, or maybe it has to due with the type of data that is being passed?
Could someone point me to a good resource that will help me figure this out?
Thank-you
anova