mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-01 06:19:44 +01:00
fix #892 (trailing dot in supplied hostname)
... and do minor updates to do bash internal functions in ``parse_hn_port()``
This commit is contained in:
parent
000f957646
commit
5bd8cb08ba
@ -13209,11 +13209,9 @@ parse_hn_port() {
|
||||
local tmp_port
|
||||
|
||||
NODE="$1"
|
||||
# strip "https" and trailing urlpath supposed it was supplied additionally
|
||||
grep -q 'https://' <<< "$NODE" && NODE=$(sed -e 's/^https\:\/\///' <<< "$NODE")
|
||||
|
||||
# strip trailing urlpath
|
||||
NODE=$(sed -e 's/\/.*$//' <<< "$NODE")
|
||||
NODE="${NODE/https\:\/\//}" # strip "https"
|
||||
NODE="${NODE%%/*}" # strip trailing urlpath
|
||||
NODE="${NODE%%.}" # strip trailing "." if supplied
|
||||
|
||||
# if there's a trailing ':' probably a starttls/application protocol was specified
|
||||
if grep -q ':$' <<< "$NODE"; then
|
||||
|
Loading…
Reference in New Issue
Block a user