Giter Club home page Giter Club logo

wifi-txpower-unlocker's Introduction

wifi-txpower-unlocker

A bash script that generates a modified regulatory.bin from Central Regulatory Domain Agent and Wireles Regulatory Database sources and patches the kernel. This unlocks the maximum WiFi TX power (on 2.4 Ghz) of the region BO according to the dBm value you specify in the script.

In the future I plan to modify the script to allow users to choose a specific region and a frequency range.

kali-linux-region-BO-wifi-txpower-unlocker.sh

  • Region BO
  • 2.4 Ghz
  • Customized for Kali Linux

ubuntu-region-BO-wifi-txpower-unlocker.sh

  • Same as kali-linux-region-BO-wifi-txpower-unlocker.sh but added dependencies for Ubuntu

arch-linux-region-BO-wifi-txpower-unlocker.sh

  • Region B0
  • 2.4 Ghz
  • Customized for Archlinux (and variants like manjaro)

Tested Devices

  • Raspberry Pi 3 running Kali Linux (with the kali-linux-full metapackage)
  • Virtual Machine running Kali Linux 64 bit
  • Ubuntu 16.04 LTS 64 bit

Usage

Increase TX power

  1. Login as root in Kali Linux
  2. Download arch-...sh or kali-...sh or ubuntu-...sh script (or clone the repo)
  3. Open the script in a text editor and change change the value of the variable txpower to the desired value
  • I set the txpower to 33 in the script
  1. Grant execution permission using Terminal (use ubuntu-...sh script if using Ubuntu)
  • chmod +x kali-linux-region-BO-wifi-txpower-unlocker.sh
  1. Execute the script (use ubuntu-...sh script if using Ubuntu)
  • ./kali-linux-region-BO-wifi-txpower-unlocker.sh
  1. When prompted to reboot type 'Y' and press [Enter]
  2. After rebooting, login as root

Set the txpower of the interface

  1. Run iwconfig or ifconfig to determine your wireless interface
  • iwconfig or ifconfig
  • My wireless interface was wlan1 so replace wlan1 with your interface name
  1. Bring the interface down
  • ifconfig wlan1 down
  1. Set region to BO
  • iw reg set BO
  1. Change the txpower of the interface (again, I chose 33). If you specified xx in the script before executing, xx will be the highest txpower you can set the interface to.
  • iwconfig wlan1 txpower 33
  1. Bring the interface up
  • ifconfig wlan1 up
  1. Use iwconfig to make sure that the txpower is set to what you desired
  • iwconfig wlan1

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

wifi-txpower-unlocker's People

Contributors

hiruna avatar muhviehstah avatar mzpqnxow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wifi-txpower-unlocker's Issues

reglib.c:28:10: fatal error: gcrypt.h: No such file or directory

Removing -Werror option when compiling...
Clean and compile crda...
make: Entering directory '/root/crda'
make: Leaving directory '/root/crda'
make: Entering directory '/root/crda'
GEN keys-gcrypt.c
Trusted pubkeys: pubkeys/linville.key.pub.pem pubkeys/root.key.pub.pem pubkeys/sforshee.key.pub.pem
CC libreg.so
reglib.c:28:10: fatal error: gcrypt.h: No such file or directory
28 | #include <gcrypt.h>
| ^~~~~~~~~~
compilation terminated.
make: *** [Makefile:119: libreg.so] Error 1
make: Leaving directory '/root/crda'

New drivers seem to solve this issue

I used the last version of this script, the last update. The script run, it asked for reboot, I did so, I tried to change then the antena's power. It did not work, it remained in 20 dBm. Finally, I found the last drivers for the Realtek wifi cards, and then switched antenas. That worked. Perhaps the script could, in the future, , update to the last drivers and change antennas automatically, and then, check the wifi's signal. Anyway, my problem is fixed in my notebook, this is just a recommendation. Thanks for all your work. https://github.com/lwfinger/rtlwifi_new here is the link to the latest wifi realtek drivers

Getting error on script execution

Unfortunately, it appears that the script throws an error when using it. I notice that it has been mentioned before, in issue #7 , but I have freshly downloaded everything, and ran it on an entirely updated kali. The error shown is:

make: Entering directory '/root/wifi-txpower-unlocker-master/crda-3.18'
GEN keys-gcrypt.c
Trusted pubkeys: pubkeys/root.key.pub.pem pubkeys/root.x509.pem pubkeys/sforshee.x509.pem pubkeys/sforshee.key.pub.pem pubkeys/[email protected] pubkeys/linville.key.pub.pem
Traceback (most recent call last):
File "./utils/key2pub.py", line 149, in
key = RSA.load_key(f)
File "/usr/lib/python2.7/dist-packages/M2Crypto/RSA.py", line 376, in load_key
return load_key_bio(bio, callback)
File "/usr/lib/python2.7/dist-packages/M2Crypto/RSA.py", line 395, in load_key_bio
rsa_error()
File "/usr/lib/python2.7/dist-packages/M2Crypto/RSA.py", line 330, in rsa_error
raise RSAError(m2.err_reason_error_string(m2.err_get_error()))
M2Crypto.RSA.RSAError: no start line
Makefile:113: recipe for target 'keys-gcrypt.c' failed
make: *** [keys-gcrypt.c] Error 1
make: Leaving directory '/root/wifi-txpower-unlocker-master/crda-3.18'

I understand it looks like a duplicate issue, however the error comes up AFTER it was marked solved with reference to issue #8

beautiful

Beautifully made and done! Last time i tried getting my txpower to 30 a long time ago, was such a pain and took me days to figure out what was right and what was wrong etc(was also much more linux n00bish lol)

Unfortunately my laptop got fucked off so I'm having to resetup/install everything again.

I'm on 4.9.0-kali4-amd64. Worked without any issue! ty!! =]

Latest regdb breaks the script.

Version 2017.12.23 of the wireless-regdb archive contains a key in a format the crda tool can't parse, solution is fixing the version to the previous one.

update for Kali 2019.2 64bit

Running newest kali distro can you update the script so it will work as needed with it or will it work fine. if it does all the work of downloading the crda/wireless-regdb building moving and setting up without errors that would be awsome work. like to see it working with a optional range of choice in the script from the normal of 20dbm my card will handle 2000mWs , 30 dbm is only about 1000mWs......

thank you

getting full 33dbm only after sleepmode

For whatever reason lately I've been having issues where I haven't been able to get the full 33dbm power output and it appeared to be a little at random when it would work. It basically wouldn't change reg domains and the txpower would stay at 30dbm .

But I just discovered that if I close my laptop lid to put it in suspend mode, then open it back up, I'd get the full 33dbm output without even doing anything. In-fact, "iw reg get" still lists me as "US: DFS-FCC" with the max power rating at 30dbm...however "iwconfig" says I'm at 33dbm...I hope that made sense lol here's a screenshot showing a little of what I mean...
weirdtxpower

Any clue to what might be going on? I don't have this issue with my pi 3.

5ghz?

Is there a script available for 2.4ghz as well as 5ghz for Kali?

SyntaxError: invalid syntax !!!

Please how can I fix this ?!!
Here is the output :
SyntaxError: invalid syntax
make: *** [Makefile:60: regulatory.bin] Error 1
make: Leaving directory '/home/drzro36/wifi-txpower-unlocker/wireless-regdb-2021.07.14'
Anyone ???

The script is broken

The script works for old wireless regdb but with the new version the script is not working and this is the issue output :
GEN keys-gcrypt.c
Trusted pubkeys: pubkeys/root.key.pub.pem pubkeys/root.x509.pem pubkeys/sforshee.x509.pem pubkeys/sforshee.key.pub.pem pubkeys/[email protected] pubkeys/linville.key.pub.pem
Traceback (most recent call last):
File "./utils/key2pub.py", line 149, in
key = RSA.load_key(f)
File "/usr/lib/python2.7/dist-packages/M2Crypto/RSA.py", line 358, in load_key
return load_key_bio(bio, callback)
File "/usr/lib/python2.7/dist-packages/M2Crypto/RSA.py", line 379, in load_key_bio
rsa_error()
File "/usr/lib/python2.7/dist-packages/M2Crypto/RSA.py", line 309, in rsa_error
raise RSAError(m2.err_reason_error_string(m2.err_get_error()))
M2Crypto.RSA.RSAError: no start line
Makefile:113: recipe for target 'keys-gcrypt.c' failed
make: *** [keys-gcrypt.c] Error 1
make: Leaving directory '/home/hp/wifi-txpower-unlocker/crda-3.18'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.