Merge pull request #9 from Kage1/master

Restrict IPv var to only 4 or 6
main
BDR 2021-03-31 07:11:14 +02:00 committed by GitHub
commit 0a4b7137c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ check(){
name="${3}"
expectedcode="${4}"
IPv="$(echo "${ctype}" | grep -o '[0-9]$')"
IPv="$(echo "${ctype}" | grep -o '[46]$')"
case "${ctype}" in
http*)
statuscode="$(curl -${IPv}sSkLo /dev/null -H "${useragent}" -m "${timeout}" -w "%{http_code}" "${host}" 2> "${tmp}/ko/${name}.error")";;