mirror of
https://github.com/hak5/bashbunny-payloads.git
synced 2025-10-29 16:58:25 +00:00
Created waiteject.sh to wait on USB storage eject. (#374)
This commit is contained in:
14
payloads/extensions/waiteject.sh
Normal file
14
payloads/extensions/waiteject.sh
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user