P4wnP1 is a highly customizable USB attack platform, based on a low cost Raspberry Pi Zero or Raspberry Pi Zero W (required for HID backdoor). Link to Repository
Copy image to sd card
dd if=<Source> of=<destination> bs=512 status=progress
Create ssh file in boot partition.
touch ssh
Connect your Pi with the USB Powerplug and also to the local Network via Lan. I am using Ethernet to USB and USB to Micro USB Adapter to achieve this.
Put in the Micro SD card and boot the raspberry pi.
After this follow the regular Instructions.
sudo apt-get -y install git
cd /home/pi
git clone --recursive https://github.com/mame82/P4wnP1
cd P4wnP1
./install.sh