@@ -813,7 +813,7 @@ get_auth_dns() { # get the authoritative dns server for a domain (sets primary_n
813813 return
814814 fi
815815
816- res=$( nslookup -debug=1 -type=soa -type=ns " $gad_d " ${gad_s} )
816+ res=$( nslookup -debug -type=soa -type=ns " $gad_d " ${gad_s} )
817817
818818 if [[ " $( echo " $res " | grep -c " Non-authoritative" ) " -gt 0 ]]; then
819819 # this is a Non-authoritative server, need to check for an authoritative one.
@@ -826,9 +826,9 @@ get_auth_dns() { # get the authoritative dns server for a domain (sets primary_n
826826 fi
827827
828828 if [[ -z " $gad_s " ]]; then
829- res=$( nslookup -debug=1 -type=soa -type=ns " $gad_d " )
829+ res=$( nslookup -debug -type=soa -type=ns " $gad_d " )
830830 else
831- res=$( nslookup -debug=1 -type=soa -type=ns " $gad_d " " ${gad_s} " )
831+ res=$( nslookup -debug -type=soa -type=ns " $gad_d " " ${gad_s} " )
832832 fi
833833
834834 if [[ " $( echo " $res " | grep -c " canonical name" ) " -gt 0 ]]; then
@@ -1027,7 +1027,7 @@ info() { # write out info as long as the quiet flag has not been set.
10271027
10281028json_awk () { # AWK json converter used for API2 - needs tidying up ;)
10291029# shellcheck disable=SC2086
1030- echo $1 | awk '
1030+ echo " $1 " | tr -d ' \n ' | awk '
10311031{
10321032 tokenize($0) # while(get_token()) {print TOKEN}
10331033 if (0 == parse()) {
@@ -1173,8 +1173,8 @@ function scream(msg) {
11731173}
11741174
11751175function tokenize(a1,pq,pb,ESCAPE,CHAR,STRING,NUMBER,KEYWORD,SPACE) {
1176- SPACE="[[:space:] ]+"
1177- gsub(/"[^[:cntrl:] "\\]*((\\[^u[:cntrl:]] |\\u[0-9a-fA-F]{4})[^[:cntrl:] "\\]*)*"|-?(0|[1-9][0-9]*)([.][0-9]*)?([eE][+-]?[0-9]*)?|null|false|true|[[:space:] ]+|./, "\n&", a1)
1176+ SPACE="[ \t\n ]+"
1177+ gsub(/"[^\001-\037 "\\]*((\\[^u\001-\037] |\\u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])[^\001-\037 "\\]*)*"|-?(0|[1-9][0-9]*)([.][0-9]*)?([eE][+-]?[0-9]*)?|null|false|true|[ \t\n ]+|./, "\n&", a1)
11781178 gsub("\n" SPACE, "\n", a1)
11791179 sub(/^\n/, "", a1)
11801180 ITOKENS=0 # get_token() helper
0 commit comments