Initiate Wireless Card

Discussion in 'Scripts & Commands' started by Mr. Penguin, 19 Jul 2012.

  1. Mr. Penguin

    Mr. Penguin Administrator
    Staff Member VIP Admin

    Joined:
    18 May 2012
    Messages:
    3,093
    Likes Received:
    1,268
    Occasionally you may get a device busy or your card will not be loaded in BackTrack or Ubuntu. To get around this, I created the following shell script that:

    • Powers down your device
    • Kills all processes associated with your card
    • Powers up your device
    • Places your card in monitor mode
    • Scans for networks
    • Tests to see if injection is working

    Code:
    Select All
    sudo iwconfig wlan1 sudo ifconfig wlan1 down sudo iwconfig wlan1 mode monitor sudo ifconfig wlan1 up sudo iwconfig wlan1 sudo airodump-ng wlan1 sleep 30 dmesg| tail -20 sudo rmmod rtl8187 sudo rfkill block all sudo rfkill unblock all sudo modprobe rtl8187 sudo rfkill unblock all sudo ifconfig wlan1 up sudo airmon-ng start wlan1 sudo airmon-ng sudo airodump-ng mon0 sudo ifconfig wlan1 down sudo iwconfig wlan1 mode monitor sudo ifconfig wlan1 up sudo iwconfig wlan1 sudo aireplay-ng -9 wlan1
    Note that if you download the attachment script that you might need to set permissions as 755 by chmod before you can run it as a script. E.g:

    Code:
    Select All
    sudo chmod 755 '/root/Desktop/Aircrack-ng-SCRIPTS/Device-Busy.sh'
    Also note that this script is for those who have an rtl8187 device, but it can be changed to other cards if required.
     

    Attached Files:

    • Like Like x 2
  2. nafo

    nafo Well-Known Member

    Joined:
    11 Jun 2012
    Messages:
    24
    Likes Received:
    3
    Thankssss!!
     

Share This Page

Loading...