dnsleaktest icon indicating copy to clipboard operation
dnsleaktest copied to clipboard

dnsleaktest.sh and BustBox

Open PiotrC1 opened this issue 4 years ago • 3 comments

Hi, BusyBox doesnt work the same like bash. Therefore some are changes necessary:

Line 50 changed: for i in {1..10};do -> for i in $(seq 1 10); do Line 57 added: echo ${result} | \ Line 59 changed: ".[] | select(.type == \"${1}\") | \"\(.ip)\(if .country_name != \"\" and .country_name != false then \" [\(.country_name)\(if .asn != \"\" and .asn != false then \" \(.asn)\" else \"\" end)]\" else \"\" end)\"" \ -> ".[] | select(.type == \"${1}\") | \"\(.ip)\(if .country_name != \"\" and .country_name != false then \" [\(.country_name)\(if .asn != \"\" and .asn != false then \" \(.asn)\" else \"\" end)]\" else \"\" end)\"" Line 60 removed: <<< ${result} Line 67 changed: dns_count=$(jq 'map(select(.type == "dns")) | length' <<< ${result}) -> echo ${result}) | dns_count=$(jq 'map(select(.type == "dns")) | length' Line 81 changed: jq --monochrome-output --raw-output '.[] | select(.type == "conclusion") | .ip' <<< ${result} -> echo ${result} | jq --monochrome-output --raw-output '.[] | select(.type == "conclusion") | .ip'

Cosmetical changes but they allow to run the script on small routers.

Regards, Piotr

PiotrC1 avatar Mar 02 '21 11:03 PiotrC1

I don't see the changes in line 59, please check

macvk avatar Mar 18 '21 08:03 macvk

Well, have a look at final \ which has been removed. Simply I have added one line at the top (#57), removed final line (#60) and modified line #59 to be the last one.

PiotrC1 avatar Mar 18 '21 10:03 PiotrC1

I've made the fix, please test it on BusyBox. And let me know about results

https://github.com/macvk/dnsleaktest/blob/master/dnsleaktest.sh

macvk avatar Mar 19 '21 07:03 macvk