Closed Odyssey-2061 closed 10 months ago
On Windows the way you pass env variables is a bit different.
Try this:
cmd /V /C "set SUBNET=1.2.3.4/24 && dnslookup example.org tls://8.8.8.8"
On Windows the way you pass env variables is a bit different.
Try this:
cmd /V /C "set SUBNET=1.2.3.4/24 && dnslookup example.org tls://8.8.8.8"
yes there's no error. But I found SUBNET not working.
PS C:\Users\kldac> set SUBNET=1.2.3.4/24 && dnslookup www.baidu.com tls://223.5.5.5
dnslookup v1.10.0
Server: tls://223.5.5.5
dnslookup result (elapsed 143.9065ms):
;; opcode: QUERY, status: NOERROR, id: 49136
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version 0; flags:; udp: 4096
;; QUESTION SECTION:
;www.baidu.com. IN A
;; ANSWER SECTION:
www.baidu.com. 102 IN CNAME www.a.shifen.com.
www.a.shifen.com. 102 IN A 36.155.132.31
www.a.shifen.com. 102 IN A 36.155.132.55
PS C:\Users\kldac> set SUBNET=114.114.114.114/24 && dnslookup www.baidu.com tls://223.5.5.5
dnslookup v1.10.0
Server: tls://223.5.5.5
dnslookup result (elapsed 111.6443ms):
;; opcode: QUERY, status: NOERROR, id: 7000
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version 0; flags:; udp: 4096
;; QUESTION SECTION:
;www.baidu.com. IN A
;; ANSWER SECTION:
www.baidu.com. 83 IN CNAME www.a.shifen.com.
www.a.shifen.com. 83 IN A 36.155.132.55
www.a.shifen.com. 83 IN A 36.155.132.31
SUBNET=1.2.3.4/24 for www.paypal.com
PS C:\Users\kldac> set SUBNET=1.2.3.4/24 && dnslookup www.paypal.com tls://9.9.9.11
dnslookup v1.10.0
Server: tls://9.9.9.11
dnslookup result (elapsed 827.008ms):
;; opcode: QUERY, status: NOERROR, id: 23216
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.paypal.com. IN A
;; ANSWER SECTION:
www.paypal.com. 3600 IN CNAME www.glb.paypal.com.
www.glb.paypal.com. 300 IN CNAME paypal-dynamic.map.fastly.net.
paypal-dynamic.map.fastly.net. 300 IN A 151.101.129.21
paypal-dynamic.map.fastly.net. 300 IN A 151.101.65.21
paypal-dynamic.map.fastly.net. 300 IN A 151.101.1.21
paypal-dynamic.map.fastly.net. 300 IN A 151.101.193.21
same result when SUBNET=114.114.114.114/24 for www.paypal.com
PS C:\Users\kldac> set SUBNET=114.114.114.114/24 && dnslookup www.paypal.com tls://9.9.9.11
dnslookup v1.10.0
Server: tls://9.9.9.11
dnslookup result (elapsed 6.0804351s):
;; opcode: QUERY, status: NOERROR, id: 1454
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.paypal.com. IN A
;; ANSWER SECTION:
www.paypal.com. 1697 IN CNAME www.glb.paypal.com.
www.glb.paypal.com. 297 IN CNAME paypal-dynamic.map.fastly.net.
paypal-dynamic.map.fastly.net. 297 IN A 151.101.65.21
paypal-dynamic.map.fastly.net. 297 IN A 151.101.193.21
paypal-dynamic.map.fastly.net. 297 IN A 151.101.1.21
paypal-dynamic.map.fastly.net. 297 IN A 151.101.129.21
On Windows the way you pass env variables is a bit different.
Try this:
cmd /V /C "set SUBNET=1.2.3.4/24 && dnslookup example.org tls://8.8.8.8"
If I typed
cmd /V /C "set SUBNET=1.2.3.4/24 && dnslookup example.org tls://8.8.8.8"
thenC:\Users\kldac>cmd /V /C "set SUBNET=1.2.3.4/24 && dnslookup example.org tls://8.8.8.8" 2023/11/01 20:20:49 [info] invalid SUBNET 1.2.3.4/24 : invalid CIDR address: 1.2.3.4/24 Usage: dnslookup <domain> <server> [<providerName> <serverPk>] <domain>: mandatory, domain name to lookup <server>: mandatory, server address. Supported: plain, tls:// (DOT), https:// (DOH), sdns:// (DNSCrypt), quic:// (DOQ) <providerName>: optional, DNSCrypt provider name <serverPk>: optional, DNSCrypt server public key
Sorry, I don't have a Windows laptop to check this.
At some point in the future dnslookup
will be rewritten to provide a different command-line interface, it will be better then.
Sorry, I don't have a Windows laptop to check this.
At some point in the future
dnslookup
will be rewritten to provide a different command-line interface, it will be better then.
Above all, thank you for developing this tool! I'm going to be happy to try futural version!
All works when query with basic feature:
But I'm going to get error code when query with extra options:
SUBNET
or
HTTP3
or
So how to use extra features on Windows (11)?