From 43da6c6e1e26f21abac1aaeeb3ea68a8569eb4d2 Mon Sep 17 00:00:00 2001 From: Paul Curry Date: Tue, 10 Nov 2020 13:59:55 +0000 Subject: [PATCH] ugh --- .../root/etc/init.d/omr-bypass | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/luci-app-omr-bypass/root/etc/init.d/omr-bypass b/luci-app-omr-bypass/root/etc/init.d/omr-bypass index 2dec8e79f..61e99753c 100755 --- a/luci-app-omr-bypass/root/etc/init.d/omr-bypass +++ b/luci-app-omr-bypass/root/etc/init.d/omr-bypass @@ -339,21 +339,21 @@ _bypass_proto() { domainlist="" # construct list of domains to query for tld in $tlds; do - i=$((i+1)) - # trim off header - if [ "$i" -lt "12" ] || [ "$i" -gt "50" ]; then - continue - fi - # add to command - domainlist="${domainlist} ${domain}${tld}" + i=$((i+1)) + # trim off header + if [ "$i" -lt "12" ] || [ "$i" -gt "50" ]; then + continue + fi + # add to command + domainlist="${domainlist} ${domain}${tld}" done domainlist="$(echo $domainlist `# Get the list of valid domains, pass it to awk` \ - | awk '{print tolower($0)}' `# awk lowercases the whole string and passes it to ` \ - | xargs -n8 -P12 `# xargs sends 8 arguments at a time across 12 threads to` \ - dig a +nocmd +noall +answer `# dig, which passes results (if any) to` \ - | awk '{print $1}' `# awk, which outputs queried domain to` \ - | sed -e 's/.$//' `# sed, which trims off the trailing dot (google.com. -> google.com)` \ - | awk '{for (i=1;i<=NF;i++) if (!a[$i]++) printf("%s%s",$i,FS)}{printf("\n")}')" # deduplicate + | awk '{print tolower($0)}' `# awk lowercases the whole string and passes it to ` \ + | xargs -n8 -P12 `# xargs sends 8 arguments at a time across 12 threads to` \ + dig a +nocmd +noall +answer `# dig, which passes results (if any) to` \ + | awk '{print $1}' `# awk, which outputs queried domain to` \ + | sed -e 's/.$//' `# sed, which trims off the trailing dot (google.com. -> google.com)` \ + | awk '{for (i=1;i<=NF;i++) if (!a[$i]++) printf("%s%s",$i,FS)}{printf("\n")}')" # deduplicate for validdomain in $domainlist; do _bypass_domain $validdomain $intf done