Guest User

WiFi Pineapple regulatory.bin fix'em'up

a guest
Mar 8th, 2013
1,228
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. bigw0rm here. Today, something completely different.
  2.  
  3. I'm sure this has already been covered & discovered, but perhaps the information has not been shared. "(
  4.  
  5. I'm using an Alfa AWUS036NH (notice it's not the NHA, but I'm sure this would still apply) in conjunction with the WiFi Pineapple, connected through a powered USB hub. Normally, without some tweaking, I'm only getting a txpower of 18dBm from the Pineapple's internal wireless NIC, and 27dBm from the AWUS036NH. This isn't relevant to my interests. ")
  6.  
  7. So, what then is the secret sauza to get some more juicy juice from these NICs? Homework has been done (that's right, Google was meine Freund). Follow along. ")
  8.  
  9. >Download the following, http://wireless.kernel.org/download/wireless-regdb/regulatory.bins/latest-regulatory.bin
  10.  
  11. >Move this latest-regulatory.bin file to a Linux box which has regdbdump installed & rename latest-regulatory.bin to regulatory.bin
  12.  
  13. >Download the following, http://wireless.kernel.org/download/wireless-regdb/debs/wireless-regdb_2009.11.25.orig.tar.bz2
  14.  
  15. >Extract the following files from this wireless-regdb_2009.11.25.orig.tar.bz2 file: dbparse.py & db2bin.py
  16.  
  17. >Move these dbparse.py & db2bin.py files to your Pineapple's root directory.
  18.  
  19. >Issue the following (We're now back on our Linux box): regdbdump regulatory.bin > db.txt
  20.  
  21. >Edit db.txt and place the following lines at the end of the file:
  22. country XX:
  23. (2402 - 2492 @ 40), (N/A, 33)
  24. (4910 - 5835 @ 40), (N/A, 33)
  25.  
  26. >Save this db.txt file.
  27.  
  28. >Move your newly created & edited db.txt file to the root directory, on the Pineapple.
  29.  
  30. >On the Pineapple, issue the following: ./db2bin.py regulatory.bin db.txt
  31.  
  32. > Then issue the following commands:
  33. mv /usr/lib/crda/regulatory.bin /usr/lib/crda/regulatory.bin.BAK
  34. mv /root/regulatory.bin /usr/lib/crda/
  35. reboot
  36.  
  37. ##NOTE: This Python command earlier, may or may not work on your Pineapple, depending on whether or not Python is installed by default (I've no idea... I installed a bunch of "infusions" onto my Pineapple, and I'm assuming Python gets installed then. I'm most likely wrong, but maybe not. Who cares. You either have Python installed or not. ")
  38.  
  39. I've created a little script to get my Pineapple's NICs xmitting at their proper txpower after all of this junk. It follows:
  40.  
  41. #!/bin/ash
  42. #Increase txpower & restart broadcast
  43. ifconfig wlan0 down
  44. iw reg set XX
  45. ifconfig wlan0 up
  46. wifi
  47.  
  48. Once that's been executed, I then plug in my AWUS036NH, ifconfig it up, & Voila....
  49.  
  50. root@Pineapple:~# iwconfig
  51. lo no wireless extensions.
  52.  
  53. wlan1 IEEE 802.11bgn ESSID:off/any
  54. Mode:Managed Access Point: Not-Associated Tx-Power=33 dBm
  55. RTS thr:off Fragment thr:off
  56. Encryption key:off
  57. Power Management:on
  58.  
  59. eth1 no wireless extensions.
  60.  
  61. wlan0 IEEE 802.11bgn Mode:Master Tx-Power=27 dBm
  62. RTS thr:off Fragment thr:off
  63. Power Management:on
  64.  
  65. eth0 no wireless extensions.
  66.  
  67. br-lan no wireless extensions.
  68.  
  69. I say, Nice One Bruvah! If you've enjoyed this shared knowledge... pass it along. Steal the work for your own and post it somewhere easily accessible by the community.
  70.  
  71. "Share and Enjoy
  72. Share and Enjoy
  73. Journey through life
  74. With a plastic boy
  75. Or Girl by your side
  76. Let your pal be your guide
  77. And when it breaks down
  78. Or starts to annoy
  79. Or grinds when it moves
  80. And gives you no joy
  81. Cos it's eaten your hat
  82. Or had sex with your cat
  83. Bled oil on your floor
  84. Or ripped off your door
  85. You get to the point
  86. You can't stand any more
  87. Bring it to us, we won't give a fig
  88. We'll tell you, 'Go stick your head in a pig'"
  89.  
  90. Buh bye... Toodles =p
RAW Paste Data