mirror of
https://github.com/mgeeky/Penetration-Testing-Tools.git
synced 2024-12-22 17:15:06 +01:00
next
This commit is contained in:
parent
b95f9aadbf
commit
dbcb0f85b5
@ -72,6 +72,12 @@ else
|
|||||||
out=$(aws --profile $PROFILE_NAME sts assume-role --serial-number $SERIAL_MFA --role-arn $ROLE_ARN --role-session-name $ROLE_NAME --duration-seconds $DURATION --token-code $code 2>&1)
|
out=$(aws --profile $PROFILE_NAME sts assume-role --serial-number $SERIAL_MFA --role-arn $ROLE_ARN --role-session-name $ROLE_NAME --duration-seconds $DURATION --token-code $code 2>&1)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if echo "$out" | grep -q -i 'error occurred' ; then
|
||||||
|
echo -e "[!] Assume role failed:\n"
|
||||||
|
echo "$out"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
rolename=$PROFILE_NAME-$SESSION_NAME
|
rolename=$PROFILE_NAME-$SESSION_NAME
|
||||||
|
|
||||||
if [[ "$OUTPUT_ROLE_NAME" != "" ]]; then
|
if [[ "$OUTPUT_ROLE_NAME" != "" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user