fix irecovery device check on ipwndfu send_ibss, part 2

This commit is contained in:
LukeeGD 2025-04-13 18:55:23 +08:00
parent d5f02fcad6
commit bbdef97ea0

View File

@ -2161,8 +2161,9 @@ device_ipwndfu() {
print "* ipwndfu should have \"done!\" as output. If not, sending iBEC will fail." print "* ipwndfu should have \"done!\" as output. If not, sending iBEC will fail."
sleep 1 sleep 1
log "Checking for device" log "Checking for device"
device_pwnd="$($irecovery3 -q | grep "PWND" | cut -c 7-)" local irec="$($irecovery3 -q 2>&1)"
if [[ -z $device_pwnd ]]; then device_pwnd="$(echo "$irec" | grep "PWND" | cut -c 7-)"
if [[ -z $device_pwnd && $irec != "ERROR"* ]]; then
log "Device should now be in pwned iBSS mode." log "Device should now be in pwned iBSS mode."
else else
warn "Device may have failed to enter pwned iBSS mode. Sending iBEC will fail." warn "Device may have failed to enter pwned iBSS mode. Sending iBEC will fail."