Initiate Wireless Card

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

  1. Mr. Penguin

    Mr. Penguin Administrator
    Staff Member Admin Moderator VIP

    Joined:
    18 May 2012
    Messages:
    3,087
    Likes Received:
    1,187
    Trophy Points:
    351
    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:

    • Device-Busy.sh
      File size:
      356 bytes
      Views:
      110
      MD5:
      b51325346f176baefa7aa1401299aff7
    • Like Like x 2
  2. nafo

    nafo Well-Known Member

    Joined:
    11 Jun 2012
    Messages:
    24
    Likes Received:
    3
    Trophy Points:
    63
    Thankssss!!
     
Loading...
  • About Us

    We are a community mixed with professionals and beginners with an interest in wireless security, auditing and pentesting. Feel free to check out and upload resources.


    You can also find us on: Twitter and Facebook

  • Donate to Us

    Did you find our forums useful? Feel free to donate Bitcoin to us using the form below. Those who donate the equivlent of $10 USD or more will be upgraded to VIP membership. Don't have Bitcoin? Use your credit card to GO VIP here. Don't want to fork out some coin? There are other ways to GO VIP. Bitcoin: 1LMTGSoTyJWXuy2mQkHfgMzD7ez74x1Z8K