natesales/q

Empty output unless `-q` is used

pfactum opened this issue · 6 comments

I've just re-built q v0.11.2, and the following is observed:

[~]> q A i.ua
/* there's no output whatsoever */

[~]> q A -q i.ua
i.ua. 3m14s A 104.18.2.81
i.ua. 3m14s A 104.18.3.81

v0.11.1 worked fine. Also, strangely, pre-built binary works fine too.

What's the deal here?

Build env: latest Arch (go 2:1.20.5-1).

Same Problem here
Snipaste_2023-07-02_12-48-44
Snipaste_2023-07-02_12-48-59
I believe this is caused by not handling the default query name correctly

What version of q are you running and from what repo?

As @pfactum mentioned, I can't reproduce with a v0.11.2 binary:

$ tar -xvzf q_0.11.2_linux_amd64.tar.gz
LICENSE
README.md
q

$ ./q -V
https://github.com/natesales/q version 0.11.2 (9517ef00f13f8792b76b903ebcefabb25a51591a 2023-07-01T03:52:37Z)

$ ./q google.com
google.com. 3m37s A 142.250.72.238
google.com. 3m44s AAAA 2607:f8b0:4007:809::200e
google.com. 38h34m58s NS ns4.google.com.
google.com. 38h34m58s NS ns2.google.com.
google.com. 38h34m58s NS ns3.google.com.
google.com. 38h34m58s NS ns1.google.com.
google.com. 5m0s MX 10 smtp.google.com.
google.com. 1h0m0s TXT "google-site-verification=wD8N7i1JTNTkezJ49swvWW48f8_9xveREV4oB-0Hf5o"
google.com. 1h0m0s TXT "atlassian-domain-verification=5YjTmWmjI92ewqkx2oXmBaD60Td9zWon9r6eakvHX6B77zzkFQto8PQ9QsKnbf4I"
google.com. 1h0m0s TXT "webexdomainverification.8YX6G=6e6922db-e3e6-4a36-904e-a805c28087fa"
google.com. 1h0m0s TXT "google-site-verification=TV9-DBe4R80X4v0M4U_bd_J9cpOJM0nikft0jAgjmsQ"
google.com. 1h0m0s TXT "docusign=1b0a6754-49b1-4db5-8540-d2c12664b289"
google.com. 1h0m0s TXT "globalsign-smime-dv=CDYX+XFHUw2wml6/Gb8+59BsH31KzUr6c1l2BPvqKX8="
google.com. 1h0m0s TXT "MS=E4A68B9AB2BB9670BCE15412F62916164C0B20BB"
google.com. 1h0m0s TXT "apple-domain-verification=30afIBcvSuDV2PLX"
google.com. 1h0m0s TXT "facebook-domain-verification=22rm551cu4k0ab0bxsw536tlds4h95"
google.com. 1h0m0s TXT "v=spf1 include:_spf.google.com ~all"
google.com. 1h0m0s TXT "docusign=05958488-4752-4ef2-95eb-aa7ba8a3bd0e"
google.com. 1h0m0s TXT "onetrust-domain-verification=de01ed21f2fa4d8781cbc3ffb89cf4ef"

$ ./q A google.com
google.com. 3m42s A 172.217.14.110

I do compile q from sources.

[~]> q -V
https://github.com/natesales/q version 0.11.2 (9517ef00f1 01.07.2023 15:00:02)

https://build.opensuse.org/package/show/home:post-factum:net/q-dns

I was able to reproduce it with the installation from deb. Then I tested with the binary from q_0.11.2_linux_amd64.tar.gz, the latter gave the results as expected, but then I compared the binaries, and they are identical...

I tried some moving of the binary and depending on the location of the binary it either worked or did not work. The next thing I figured out, was it only occurs if the binary is called from $PATH

Calling from path (q domain.name) → no result
Calling from direct location (/usr/bin/q domain.name) → results are shown

I have the same problem, I installed the latest version via homebrew.

q --version
https://github.com/natesales/q version 0.11.2 (9517ef00f13f8792b76b903ebcefabb25a51591a 2023-07-01T03:52:37Z)

brew info natesales/repo/q
==> natesales/repo/q: stable 0.11.2

https://github.com/natesales/repo
/opt/homebrew/Cellar/q/0.11.2 (5 files, 8MB) *
  Built from source on 2023-07-01 at 17:49:11
From: https://github.com/natesales/repo/blob/HEAD/q.rb
==> Analytics
install: 0 (30 days), 0 (90 days), 0 (365 days)
install-on-request: 0 (30 days), 0 (90 days), 0 (365 days)
build-error: 0 (30 days)
q google.com
-> no output
q -q google.com
google.com. 14m28s NS ns2.google.com.
google.com. 14m28s NS ns3.google.com.
google.com. 14m28s NS ns1.google.com.
google.com. 14m28s NS ns4.google.com.
google.com. 5m0s MX 10 smtp.google.com.
google.com. 1h0m0s TXT "google-site-verification=wD8N7i1JTNTkezJ49swvWW48f8_9xveREV4oB-0Hf5o"
google.com. 1h0m0s TXT "facebook-domain-verification=22rm551cu4k0ab0bxsw536tlds4h95"
google.com. 1h0m0s TXT "globalsign-smime-dv=CDYX+XFHUw2wml6/Gb8+59BsH31KzUr6c1l2BPvqKX8="
google.com. 1h0m0s TXT "webexdomainverification.8YX6G=6e6922db-e3e6-4a36-904e-a805c28087fa"
google.com. 1h0m0s TXT "google-site-verification=TV9-DBe4R80X4v0M4U_bd_J9cpOJM0nikft0jAgjmsQ"
google.com. 1h0m0s TXT "apple-domain-verification=30afIBcvSuDV2PLX"
google.com. 1h0m0s TXT "MS=E4A68B9AB2BB9670BCE15412F62916164C0B20BB"
google.com. 1h0m0s TXT "docusign=05958488-4752-4ef2-95eb-aa7ba8a3bd0e"
google.com. 1h0m0s TXT "docusign=1b0a6754-49b1-4db5-8540-d2c12664b289"
google.com. 1h0m0s TXT "v=spf1 include:_spf.google.com ~all"
google.com. 1h0m0s TXT "onetrust-domain-verification=de01ed21f2fa4d8781cbc3ffb89cf4ef"
google.com. 1h0m0s TXT "atlassian-domain-verification=5YjTmWmjI92ewqkx2oXmBaD60Td9zWon9r6eakvHX6B77zzkFQto8PQ9QsKnbf4I"
google.com. 3m23s A 172.217.23.206
google.com. 5m0s AAAA 2a00:1450:400e:805::200

The latest release seems to fix this. Thanks.