Want to know power script linux

Asked By 0 points N/A Posted on -
qa-featured

Dear All

I want to know the power script to change the TX value of my Alfa Card in Linux. Please someone tell me what power script linux to write and where to write ?

SHARE
Best Answer by Russel C Brannon
Answered By 0 points N/A #169448

Want to know power script linux

qa-featured

Hi Mary,

Please see the script in the attached text file which will change the TX value of your Alfa Card. This is not exactly what you want but you will surely find this useful. You can put this code in a whatever.sh file:

 

Best Answer
Best Answer
Answered By 10 points N/A #169450

Want to know power script linux

qa-featured

 

Hi Mary Drapper,

Making changes to the script is a difficult job, so please be careful.

Following script will help you do it.

Put this code in whatever.sh file.

Remember, max TX value with this script is 30.

 

#!/bin/bash
set -x
#  (C)opyright 2010 Scamentology
# This Script changes the TX Power for the Alfa Wireless card

    txpower_up="yes"                            # Raises TX Power for alfa Adapters
 txpower_value="30"                              # Value to raise alfa adapter to
    interface="$(airmon-ng | grep "RTL8187" | awk '{print $1}')"  # "eth0" "wlan0" "wlan1"

#__ Nothing To Change Below This Line _____________________________________________________________

#__ TX Power Increase for Alfa____________________________________________________________________
if [ ! $interface ] ; then echo "Alfa Card Not Found" ; /usr/bin/notify-send "Alfa Card Not Found" ; exit 0 ; fi
ifconfig $interface down
ifconfig $interface up
sleep 3
if [ $txpower_up == "yes" ] ; then
  alfa="$(airmon-ng | grep "RTL8187" | awk '{print $1}')"
  if [ "$alfa" == "$interface" ] ; then
      tx_status="$(iwconfig $interface | grep "Tx-Power" | awk '{print $4}')"
      if [ "$tx_status" == "Not-Associated" ] ; then tx_status="$(iwconfig $interface | grep "Tx-Power" | awk '{print $5}')" ; fi
      if [ "$tx_status" == "Tx-Power=$txpower_value" ] ; then
        /usr/bin/notify-send "$tx_status"
      else 
        iw reg set BO
        iwconfig $interface TxPower $txpower_value
        tx_status="$(iwconfig $interface | grep "Tx-Power" | awk '{print $4}')"
        if [ "$tx_status" == "Not-Associated" ] ; then tx_status="$(iwconfig $interface | grep "Tx-Power" | awk '{print $5}')" ; fi
        if [ "$tx_status" == "Tx-Power=$txpower_value" ] ; then
            /usr/bin/notify-send "$tx_status"
        fi
      fi
  fi
fi

exit 0

 

Hope this would address your problem.

 

Thanks,

Answered By 50 points N/A #169449

Want to know power script linux

qa-featured

Hello, Mary

Hope you are fine.

This script will help you change the TX value of your Alfa Card. To do this job follow the instruction below:
Put this attached code in a whatever. sh file
Chmod +x
Now change the taxable value to whatever you want .

Then run the script

Remember the maximum TX Value with this script is 30!

I also suggest you to check this website.

http://xiaopan.co/forums/threads/change-tx-power-in-backtrack.112/

Best of luck!!

Related Questions