irenicus09

Configure.sh

Dec 6th, 2015
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.46 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3.  
  4. if [ "$#" -ne 2 ]
  5.     then
  6.         echo "";
  7.         echo ">>> Insufficient arguments detected..";
  8.         echo;
  9.         echo "Usage: ./configure.sh [interface] [mode]";
  10.         echo "       ./configure.sh wlan0 monitor";
  11.         exit 1;
  12. fi
  13.  
  14.  
  15.  
  16.  
  17. interface=$1
  18. mode=$2
  19.  
  20. echo ">> Configuring interface $interface";
  21. ifconfig $interface down;
  22. macchanger -r $interface;
  23. iwconfig $interface mode $mode;
  24. ifconfig $interface up;
  25. wait;
  26. echo ">> Finished at `date`";
  27. exit 0;
Advertisement
Add Comment
Please, Sign In to add comment