From ac1c6020f9644d4bc1bf8a1fb24b68e2bd3693d7 Mon Sep 17 00:00:00 2001 From: Mathew Fleisch Date: Fri, 24 Mar 2017 16:04:45 -0700 Subject: [PATCH] Add check for php and install if it isn't found --- payloads/library/BrowserBunny/payload.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/payloads/library/BrowserBunny/payload.txt b/payloads/library/BrowserBunny/payload.txt index 088dc252..651e25ca 100644 --- a/payloads/library/BrowserBunny/payload.txt +++ b/payloads/library/BrowserBunny/payload.txt @@ -28,7 +28,11 @@ echo " --------- BrowserBunny [started] -----------" >> $log_file 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; } +LED R G +[[ ! `which phpp` ]] && { LED R; echo "Php not installed... install it!" >> $log_file; apt-get install -y php5-cli &>> $log_file; } + LED G +echo "Starting php server..." >> $log_file; cd /root/udisk/payloads/switch1 php -S 172.16.64.1:80 &>> $log_file \ No newline at end of file