diff --git a/payloads/extensions/waiteject.sh b/payloads/extensions/waiteject.sh new file mode 100644 index 00000000..7662512f --- /dev/null +++ b/payloads/extensions/waiteject.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# +# WAITEJECT v1 by kamotswind (https://github.com/kamotswind) +# Blocks the payload from continuing until the USB storage is ejected from the host +# Usage: WAITEJECT + +function WAITEJECT() { + until [ ! -z "`dmesg | grep \"usb close backing file\"`" ] + do + sleep 1 + done +} + +export -f WAITEJECT