Advertisement
Guest User

Untitled

a guest
Oct 24th, 2011
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.46 KB | None | 0 0
  1. #!/system/bin/sh
  2. #(c) blackplatypus
  3.  
  4. echo "[x] Stop Injection"
  5.  
  6.  
  7. lsmod | grep wl1251 >  /dev/null 2>&1
  8.  
  9. if [ $? -eq 0 ]
  10. then
  11.     echo "[-] Stop wlan0 interface"
  12.     ifconfig wlan0 down
  13.    
  14.     echo "[-] Unload injection modules"
  15.    
  16.     rmmod msm_wifi
  17.     rmmod wl1251_sdio
  18.     rmmod wl1251
  19.     rmmod mac80211
  20.     rmmod cfg80211
  21.    
  22.     if [ "`uname -r`" == "2.6.29.6injection-flykernel-13" ]
  23.     then
  24.         rmmod rfkill_backport
  25.    
  26.     fi
  27.  
  28.     rmmod compat
  29.    
  30.     if [ "`uname -r`" == "2.6.29.6injection-flykernel-13" ]
  31.     then
  32.         echo "[+] Load wlan.ko module"
  33.         insmod /system/lib/modules/wlan.ko
  34.    
  35.         echo "[+] Load Firmware"
  36.         wlan_loader -f /system/etc/wifi/Fw1251r1c.bin -e /proc/calibration  -i /system/etc/wifi/tiwlan.ini
  37.    
  38.         echo "[+] Start tiwlan0 interface"
  39.         ifconfig tiwlan0 up
  40.    
  41.         echo "tiwlan0 should be up and running :)"
  42.         netcfg
  43.     else
  44.         echo "Sry no support for wlan.ko :("
  45.     fi
  46.  
  47.    
  48. else
  49.     lsmod | grep wlan > /dev/null 2>&1
  50.    
  51.     if [ $? -eq 0 ]
  52.     then
  53.         echo "[+] Injection already stopped!!"
  54.         exit
  55.     else
  56.         if [ "`uname -r`" == "2.6.29.6injection-flykernel-13" ]
  57.         then
  58.             echo "[+] Load wlan.ko module"
  59.             insmod /system/lib/modules/wlan.ko
  60.        
  61.             echo "[+] Load Firmware"
  62.             wlan_loader -f /system/etc/wifi/Fw1251r1c.bin -e /proc/calibration  -i /system/etc/wifi/tiwlan.ini
  63.        
  64.             echo "[+] Start tiwlan0 interface"
  65.             ifconfig tiwlan0 up
  66.        
  67.             echo "tiwlan0 should be up and running :)"
  68.             netcfg
  69.         else
  70.             echo "Sry no support for wlan.ko :("
  71.         fi     
  72.     fi
  73. fi
  74.  
  75.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement