From df8b0ac5d71a97670fd55d5028f86df29313dc4c Mon Sep 17 00:00:00 2001 From: pvincent Date: Sat, 18 Jul 2026 14:27:29 +0400 Subject: [PATCH] subshell term payload improved --- bin/miaou-bash | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/miaou-bash b/bin/miaou-bash index 4873573..63f8382 100755 --- a/bin/miaou-bash +++ b/bin/miaou-bash @@ -90,6 +90,10 @@ function on_exit { if [[ -p /dev/stdout ]]; then failure_type='SUBSHELL TERM' failure_payload="$last_error" + + if [[ "$last_error" =~ $regex1 || "$last_error" =~ $regex2 ]]; then + failure_payload="${BASH_REMATCH[2]}" + fi last_error="${BASH_SOURCE[1]}:${BASH_LINENO[0]} subshell term $code" kill -USR1 $$ else @@ -100,7 +104,6 @@ function on_exit { if [[ "$last_error" =~ $regex1 || "$last_error" =~ $regex2 ]]; then line=${BASH_REMATCH[1]} message=${BASH_REMATCH[2]} - regex='^(.*): unbound variable$' if [[ $code == 1 ]] && [[ "$message" =~ $regex ]]; then failure_type='UNBOUND VARIABLE'