Updated GitBunnyGit to work with Firmware v1.1 (#145)
parent
ca9e466ce7
commit
6e7292699b
|
@ -1,6 +1,6 @@
|
|||
# Git-Bunny-Git
|
||||
|
||||
Author: Draxiom & audibleblink
|
||||
Author: Draxiom & audibleblink & Nicholas Adamou
|
||||
Version: 1.0
|
||||
|
||||
## Description
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Title: Git Bunny Git
|
||||
# Author: Draxiom && audibleblink
|
||||
# Author: Draxiom && audibleblink && Nicholas Adamou
|
||||
# Target: any
|
||||
# Version: 1.0
|
||||
# Version: 1.1
|
||||
#
|
||||
# Update payloads from Github
|
||||
#
|
||||
|
@ -14,9 +14,9 @@
|
|||
# Green (blinking) | Git Pull Finished
|
||||
# Green | Git Clone Finished
|
||||
|
||||
LED R G B
|
||||
ATTACKMODE RNDIS_ETHERNET
|
||||
#ATTACKMODE ECM_ETHERNET
|
||||
LED W
|
||||
#ATTACKMODE RNDIS_ETHERNET
|
||||
ATTACKMODE ECM_ETHERNET
|
||||
|
||||
# Set your desired repo url and branch if you're not looking to update from mainline
|
||||
git_repo="https://github.com/hak5/bashbunny-payloads.git"
|
||||
|
@ -24,17 +24,21 @@ git_branch="master"
|
|||
payloads_dir="/root/udisk"
|
||||
log_file="/var/log/git.log"
|
||||
|
||||
if [ -f "$log_file" ]; then
|
||||
rm -rf "$log_file"
|
||||
fi
|
||||
|
||||
echo " --------- Git Bunny Git [started] -----------" >> $log_file
|
||||
|
||||
# Sanity check on mounted drive
|
||||
[[ ! `mount | grep "nandf"` ]] && { LED R 200; echo "Could not mount filesystem" >> $log_file; exit 1; }
|
||||
[[ ! `mount | grep "nandf"` ]] && { LED R DOUBLE; echo "Could not mount filesystem" >> $log_file; exit 1; }
|
||||
|
||||
# Test for internet connection
|
||||
wget -q --tries=15 --timeout=5 --spider http://example.com
|
||||
[[ "$?" -ne 0 ]] && { LED R; echo "Could not connect to the internet" >> $log_file; exit 1; }
|
||||
|
||||
# Let's go
|
||||
LED R G
|
||||
LED Y
|
||||
cd $payloads_dir
|
||||
|
||||
# Cannot verify ca certificate... skip it
|
||||
|
@ -43,7 +47,7 @@ if [ -d ".git" ]; then
|
|||
# Get the newest payloads
|
||||
git pull origin $git_branch &>> $log_file
|
||||
echo "Git repository updated." >> $log_file
|
||||
LED G 200
|
||||
LED G SLOW
|
||||
else
|
||||
# Move the existing payloads directory, in case hackers be hackin'
|
||||
mv payloads payloads-orig
|
||||
|
@ -64,7 +68,7 @@ else
|
|||
echo "Git repository cloned." >> $log_file
|
||||
|
||||
# Ignore any existing directories or files, so git status is pretty, and git pull will work after the "clone"
|
||||
LED R B
|
||||
LED M
|
||||
for file in $(ls -A); do
|
||||
[[ "${file}" =~ [^payloads$] ]] && { echo "${file}" >> .gitignore; echo ".gitignore add: ${file}" >> $log_file; }
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue