Skip to content

Commit

Permalink
Consider error when not a timeout but server answer is not appropriate.
Browse files Browse the repository at this point in the history
  • Loading branch information
dougy147 committed Sep 29, 2023
1 parent 5c6ff16 commit c487c95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bin/mcbash
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,9 @@ get_handshake() {
echo -e "\n---------------------------------\n\t${_YELLOW}Handshake token : ${_RESET}${_BLUE}${handshake_token:-Empty}${_RESET}"
fi

if [[ $(echo "$handshake_token" | grep -Eio "error code|unauthorized|502 bad gateway|maximum number of open connections reached|just a moment|500 internal server error|error") ]]; then
if [[ $(echo "$handshake_token" | grep -Eio "error code|unauthorized|502 bad gateway|maximum number of open connections reached|just a moment|500 internal server error|error|blocked") ]]; then
#echo "contains error"
last_request_was_error=true
mac_not_changed=true
return 1
fi
Expand Down
3 changes: 2 additions & 1 deletion func/11_scan
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ get_handshake() {
echo -e "\n---------------------------------\n\t${_YELLOW}Handshake token : ${_RESET}${_BLUE}${handshake_token:-Empty}${_RESET}"
fi

if [[ $(echo "$handshake_token" | grep -Eio "error code|unauthorized|502 bad gateway|maximum number of open connections reached|just a moment|500 internal server error|error") ]]; then
if [[ $(echo "$handshake_token" | grep -Eio "error code|unauthorized|502 bad gateway|maximum number of open connections reached|just a moment|500 internal server error|error|blocked") ]]; then
#echo "contains error"
last_request_was_error=true
mac_not_changed=true
return 1
fi
Expand Down

0 comments on commit c487c95

Please sign in to comment.