Fix hex string
This commit is contained in:
parent
c218eaa7a4
commit
71cb693fad
|
@ -389,7 +389,8 @@ function domain_to_hex_string {
|
|||
segment=$(echo "$domain" | awk -F '.' -v value="$ctr" '{print $value}')
|
||||
while [ ${#segment} -gt 0 ]
|
||||
do
|
||||
hexnum=$(echo "obase=16; $segment" | bc)
|
||||
characters=$(echo -n "$segment" | wc -c)
|
||||
hexnum=$(echo "obase=16; $characters" | bc)
|
||||
if [ ${hexnum} -lt 2 ]; then
|
||||
echo -n "|0${hexnum}|$segment"
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue