Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⭐️ new whois resource for network provider #4163

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chris-rock
Copy link
Member

Add whois resource to the network provider.

cnquery shell host mondoo.com
→ connected to Network Host
  ___ _ __   __ _ _   _  ___ _ __ _   _ 
 / __| '_ \ / _` | | | |/ _ \ '__| | | |
| (__| | | | (_| | |_| |  __/ |  | |_| |
 \___|_| |_|\__, |\__,_|\___|_|   \__, |
  mondoo™      |_|                |___/  interactive shell

cnquery> whois.domain { * }
whois.domain: {
  status: [
    0: "clienttransferprohibited"
  ]
  expiresAt: 2026-04-27 21:13:04 +0200 CEST
  updatedAt: 2024-01-23 00:11:30 +0100 CET
  name: "mondoo"
  domain: "mondoo.com"
  extension: "com"
  punyCode: "mondoo.com"
  createdAt: 2015-04-27 21:13:04 +0200 CEST
  dnssec: false
  whoisServer: "whois.domrobot.com"
  nameServers: [
    0: "ns-cloud-c1.googledomains.com"
    1: "ns-cloud-c2.googledomains.com"
    2: "ns-cloud-c3.googledomains.com"
    3: "ns-cloud-c4.googledomains.com"
  ]
}

You can also ask for specific domains:

cnquery> whois("google.com").domain { * }
whois.domain: {
  whoisServer: "whois.markmonitor.com"
  status: [
    0: "clientdeleteprohibited"
    1: "clienttransferprohibited"
    2: "clientupdateprohibited"
    3: "serverdeleteprohibited"
    4: "servertransferprohibited"
    5: "serverupdateprohibited"
  ]
  nameServers: [
    0: "ns1.google.com"
    1: "ns2.google.com"
    2: "ns3.google.com"
    3: "ns4.google.com"
  ]
  punyCode: "google.com"
  dnssec: false
  domain: "google.com"
  extension: "com"
  updatedAt: 2019-09-09 17:39:04 +0200 CEST
  name: "google"
  expiresAt: 2028-09-14 06:00:00 +0200 CEST
  createdAt: 1997-09-15 06:00:00 +0200 CEST
}

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Jun 1, 2024

Test Results

3 036 tests  ±0   3 035 ✅ ±0   1m 26s ⏱️ -17s
  341 suites ±0       1 💤 ±0 
   24 files   ±0       0 ❌ ±0 

Results for commit aeda9c8. ± Comparison against base commit 376f79f.

♻️ This comment has been updated with latest results.

.github/actions/spelling/expect.txt Outdated Show resolved Hide resolved

This comment has been minimized.

@chris-rock chris-rock requested review from tas50 and removed request for tas50 June 2, 2024 13:29
@czunker
Copy link
Contributor

czunker commented Jun 3, 2024

This is only partially working for .de domains:

cnquery run -c 'whois("google.de").domain{*}' 
→ no provider specified, defaulting to local. Use --help to see all providers.
→ loaded configuration from /etc/opt/mondoo/mondoo.yml using source default
whois.domain: {
  updatedAt: null
  extension: "de"
  nameServers: []
  expiresAt: null
  punyCode: "google.de"
  dnssec: false
  createdAt: null
  domain: "google.de"
  name: "google"
  status: [
    0: "connect"
  ]
  whoisServer: ""
}

Is this something we need?

According to the used library, that should work. Or worked before? https://github.com/likexian/whois-parser/blob/master/testdata/noterror/de_google.de

@chris-rock
Copy link
Member Author

@czunker Great catch. I will update the code.

@chris-rock chris-rock marked this pull request as draft June 3, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants