Browse files

nethunter-fs: more updates & fixes

persistent-net rules should be fine by default, new file names
gcc-arm-none-eabi can be installed by dpkg
zlib1g-dev needed for some pip builds
hostapd-karma.conf is located in /sdcard/nh_files/configs
wlan1 all the hostapd configs

Signed-off-by: James Christopher Adduono <>
  • Loading branch information...
jcadduono committed Sep 3, 2017
1 parent 1036baf commit 09ba049e1e760deb4e9d165f2489923e25230ac2
Showing with 10 additions and 14 deletions.
  1. +1 −1 nethunter-fs/
  2. +9 −13 nethunter-fs/stages/stage3
@@ -151,7 +151,7 @@ pkg_minimal="openssh-server kali-defaults kali-archive-keyring
pkg_full="kali-linux-nethunter mana-toolkit exploitdb lua-sql-sqlite3 msfpc
exe2hexbat bettercap libapache2-mod-php7.0 libreadline6-dev
libncurses5-dev libnewlib-arm-none-eabi binutils-arm-none-eabi
autoconf libtool make gcc-6 g++-6"
gcc-arm-none-eabi autoconf libtool make gcc-6 g++-6 zlib1g-dev"

pkg_minimal_armhf="abootimg cgpt fake-hwclock vboot-utils vboot-kernel-utils nethunter-utils"
@@ -30,8 +30,6 @@ debconf-set-selections /debconf.set
rm -f /debconf.set
apt-get -y install locales-all git-core binutils ca-certificates initramfs-tools locales console-common less nano git
echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
echo "I: Installing packages with apt-get: $packages"
apt-get --yes --force-yes install $packages
@@ -45,7 +43,6 @@ EOF
if [ "$build_size" = full ]; then
# We should run git clone outside chroot because it has issues with machine-code translation
git clone "$rootfs/opt/proxmark3"
wget "${build_arch}.deb" -O "$rootfs/opt/proxmark3/gcc-arm-none-eabi.deb"
git clone "$rootfs/opt/Empire"

cat << EOF >> "$rootfs/third-stage"
@@ -57,15 +54,14 @@ a2enmod php7.0
a2dissite 000-mana-toolkit.conf
a2ensite 000-default.conf
cd /opt/proxmark3
# Proxmark3 depends on gcc-arm-none-eabi, so we install it before building
dpkg -i gcc-arm-none-eabi.deb
rm -f gcc-arm-none-eabi.deb
if cd /opt/proxmark3; then
cd /opt/Empire/setup
chmod +x
printf "\n" | ./
if cd /opt/Empire/setup; then
chmod +x
printf "\n" | ./
# End of third-stage script append
@@ -110,8 +106,8 @@ cp dictionary/wordlist.txt "$rootfs/opt/dic/wordlist.txt"
cp dictionary/pinlist.txt "$rootfs/opt/dic/pinlist.txt"

# Sets the default for hostapd.conf to the mana karma version
sed -i 's#^DAEMON_CONF=.*#DAEMON_CONF=/etc/mana-toolkit/hostapd-karma.conf#' "$rootfs/etc/init.d/hostapd"
sed -i 's/wlan0/wlan1/g' "$rootfs/etc/mana-toolkit/hostapd-karma.conf"
sed -i 's#^DAEMON_CONF=.*#DAEMON_CONF=/sdcard/nh_files/configs/hostapd-karma.conf#' "$rootfs/etc/init.d/hostapd"
sed -i 's/wlan0/wlan1/g' "$rootfs/etc/mana-toolkit/hostapd-mana-"*

# DNSMASQ Configuration options for optional access point
cat << EOF > "$rootfs/etc/dnsmasq.conf"

0 comments on commit 09ba049

Please sign in to comment.