Merge pull request #7 from whoot/master

Installer + Module
This commit is contained in:
2017-03-06 09:49:47 -05:00
committed by GitHub
2 changed files with 7 additions and 7 deletions

BIN
dwc2/dwc2.4.4.50+.ko Normal file

Binary file not shown.

View File

@@ -11,7 +11,7 @@ KERNEL_VERSION=$(uname -r)
MODULE_INSTALLED=false MODULE_INSTALLED=false
# Update Packages and ensure dependencies are installed # Update Packages and ensure dependencies are installed
sudo apt-get update sudo apt-get update
sudo apt-get upgrade -y sudo apt-get upgrade -y
sudo apt-get install -y isc-dhcp-server dsniff screen nodejs bridge-utils sudo apt-get install -y isc-dhcp-server dsniff screen nodejs bridge-utils
sudo git clone https://github.com/samyk/poisontap ~/poisontap sudo git clone https://github.com/samyk/poisontap ~/poisontap
@@ -23,7 +23,7 @@ read backup
if [[ $backup == y* ]] ; if [[ $backup == y* ]] ;
then then
if [ ! -d ~/HackPi/backup ] ; if [ ! -d ~/HackPi/backup ] ;
then then
sudo mkdir ~/HackPi/backup sudo mkdir ~/HackPi/backup
fi fi
@@ -39,7 +39,7 @@ fi
if [ -f ~/HackPi/dwc2/dwc2."$KERNEL_VERSION".ko ] ; if [ -f ~/HackPi/dwc2/dwc2."$KERNEL_VERSION".ko ] ;
then then
sudo cp -f ~/HackPi/dwc2/dwc2."$KERNEL_VERSION".ko /lib/modules/"$KERNEL_VERSION"/kernel/drivers/usb/dwc2/dwc2.ko sudo cp -f ~/HackPi/dwc2/dwc2."$KERNEL_VERSION".ko /lib/modules/"$KERNEL_VERSION"/kernel/drivers/usb/dwc2/dwc2.ko
$MODULE_INSTALLED=true MODULE_INSTALLED=true
else else
printf "\nModule for kernel $KERNEL_VERSION not found.\nPatching is possible, but requires downloading the kernel." printf "\nModule for kernel $KERNEL_VERSION not found.\nPatching is possible, but requires downloading the kernel."
printf "\nProceed? [y/n] " printf "\nProceed? [y/n] "
@@ -55,9 +55,9 @@ else
patch -i ~/HackPi/dwc2/gadget.patch patch -i ~/HackPi/dwc2/gadget.patch
cd ~/linux cd ~/linux
make M=drivers/usb/dwc2 CONFIG_USB_DWC2=m make M=drivers/usb/dwc2 CONFIG_USB_DWC2=m
sudo cp -f drivers/usb/dwc2/dwc2."$KERNEL_VERSION".ko /lib/modules/"$KERNEL_VERSION"/kernel/drivers/usb/dwc2/dwc2.ko sudo cp -f drivers/usb/dwc2/dwc2.ko /lib/modules/"$KERNEL_VERSION"/kernel/drivers/usb/dwc2/dwc2.ko
sudo cp -f drivers/usb/dwc2/dwc2."$KERNEL_VERSION".ko ~/HackPi/dwc2/ sudo cp -f drivers/usb/dwc2/dwc2.ko ~/HackPi/dwc2/dwc2."$KERNEL_VERSION".ko
$MODULE_INSTALLED=true MODULE_INSTALLED=true
fi fi
fi fi
@@ -83,7 +83,7 @@ then
sudo sed -i -e 's/1337/'$port'/g' ~/poisontap/backdoor.html sudo sed -i -e 's/1337/'$port'/g' ~/poisontap/backdoor.html
fi fi
fi fi
# Install files # Install files
sudo cp -f ~/HackPi/config.txt /boot/ sudo cp -f ~/HackPi/config.txt /boot/
sudo cp -f ~/HackPi/modules /etc/ sudo cp -f ~/HackPi/modules /etc/