Skip to content

Instantly share code, notes, and snippets.

@danvers
Forked from magnusviri/kali-linux-wl-fix.sh
Created February 8, 2020 10:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danvers/502707b8e3bdbf3e6b7a3fcd9904331a to your computer and use it in GitHub Desktop.
Save danvers/502707b8e3bdbf3e6b7a3fcd9904331a to your computer and use it in GitHub Desktop.
Kali Linux fix for "modprobe: FATAL: Module wl not found"
echo "As of October 18, 2018 this script works with this image:"
echo "http://cdimage.kali.org/kali-weekly/kali-linux-2018-W41-amd64.iso"
echo
echo "If you are using a different version you will have to change the variables kbuild, headers1, headers2, and server"
echo
echo "Look in /lib/modules to find out what version of Kali you need to search for."
echo
proc=$(uname -r|sed 's,[^-]*-[^-]*-,,')
#server=http://old.kali.org/kali/pool/main/l/linux/ # Look here too
server=http://http.kali.org/kali/pool/main/l/linux/ # These are the newest files
kbuild=linux-kbuild-4.18_4.18.6-1kali1_$proc.deb
headers1=linux-headers-4.18.0-kali1-common_4.18.6-1kali1_all.deb
headers2=linux-headers-4.18.0-kali1-${proc}_4.18.6-1kali1_$proc.deb
# Update and install necessary packages
apt-get update
apt-get -y install linux-image-$proc linux-headers-$proc
modprobe -r b44 b43 b43legacy ssb brcmsmac bcma
# Download some extra packages, that do the trick for "wl module not found"
echo wget $server/$kbuild && \
wget $server/$kbuild && \
echo wget $server/$headers1 && \
wget $server/$headers1 && \
echo wget $server/$headers2 && \
wget $server/$headers2 && \
\
dpkg -i $kbuild && \
dpkg -i $headers1 && \
dpkg -i $headers2 && \
\
apt-get -y --fix-broken install && \
\
apt-get -y install broadcom-sta-dkms && \
\
echo modprobe wl && \
modprobe wl
iwconfig
ifconfig
# Done :)
echo "Don't forget to enable network-manager: nano /etc/NetworkManager/NetworkManager.conf to true and restart the service."
echo
echo "To monitor traffic run"
echo
echo "echo 1 > /proc/brcm_monitor0"
echo "airodump-ng prism0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment