Skip to content

Commit

Permalink
⭐️ new whois resource for network provider
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock committed Jun 1, 2024
1 parent 376f79f commit e451cca
Show file tree
Hide file tree
Showing 7 changed files with 829 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,6 @@ VNIC
Vtpm
vulnerabilityassessmentsettings
vulnmgmt
whois
wil
xssmatchstatement
7 changes: 6 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,11 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)

require github.com/moby/buildkit v0.13.2
require (
github.com/likexian/whois v1.15.3
github.com/likexian/whois-parser v1.24.16
github.com/moby/buildkit v0.13.2
)

require (
cloud.google.com/go/auth v0.5.0 // indirect
Expand All @@ -440,6 +444,7 @@ require (
github.com/gopherjs/gopherjs v1.17.2 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/lasiar/canonicalheader v1.1.1 // indirect
github.com/likexian/gokit v0.25.15 // indirect
github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect
github.com/smarty/assertions v1.15.1 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,12 @@ github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSio
github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4=
github.com/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84YrjT3mIY=
github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA=
github.com/likexian/gokit v0.25.15 h1:QjospM1eXhdMMHwZRpMKKAHY/Wig9wgcREmLtf9NslY=
github.com/likexian/gokit v0.25.15/go.mod h1:S2QisdsxLEHWeD/XI0QMVeggp+jbxYqUxMvSBil7MRg=
github.com/likexian/whois v1.15.3 h1:0emFSUSUj98Q12Wer3iM3eROPXjg+CyUBlibGPNbKHw=
github.com/likexian/whois v1.15.3/go.mod h1:a6sGAAKEb+O3JRBuW2x/QDM80l5hJ07p0+SjQkJ1c+0=
github.com/likexian/whois-parser v1.24.16 h1:WdHt6ICtapm/2M2ue84n541nHDbNBD7M8HsxgXKcEV8=
github.com/likexian/whois-parser v1.24.16/go.mod h1:k5zmKRZ7xPg1TLv3BGT4g/LOPRIMhvdNMeB0F53V/jk=
github.com/lithammer/fuzzysearch v1.1.8 h1:/HIuJnjHuXS8bKaiTMeeDlW2/AyIWk2brx1V8LFgLN4=
github.com/lithammer/fuzzysearch v1.1.8/go.mod h1:IdqeyBClc3FFqSzYq/MXESsS4S0FsZ5ajtkr5xPLts4=
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
Expand Down
69 changes: 69 additions & 0 deletions providers/network/resources/network.lr
Original file line number Diff line number Diff line change
Expand Up @@ -402,3 +402,72 @@ dns.dkimRecord @defaults("dnsTxt") {
// Whether the DKIM entry and public key is valid
valid() bool
}

// Domain and IP whois information
whois {
init(target string)
// Host, either registered name or IP (e.g., mondoo.com)
host string
// Domain whois information
domain() whois.domainInfo
// Registrar whois information
registrar() whois.contact
// Registrant whois information
registrant() whois.contact
// Admin whois information
administrative() whois.contact
// Tech whois information
technical() whois.contact
// Billing whois information
billing() whois.contact
}

// Whois domain information
private whois.domainInfo @defaults("domain extension status") {
// Domain name
domain string
// Name
name string
// Punycode representation of the domain
punyCode string
// Domain extension
extension string
// Used whois server
whoisServer string
// Registration status
status []string
// Name servers
nameServers []string
// DNSSEC status
dnssec bool
// Creation date
createdAt time
// Updated date
updatedAt time
// Expiration date
expiresAt time
}

// Whois contact information
private whois.contact @defaults("name") {
// Name
name string
// Organization
organization string
// Street
street string
// City
city string
// State or Province
province string
// Postal code
postalCode string
// Country
country string
// Phone number
phone string
// Email address
email string
// Registrar URL
registrarUrl string
}
Loading

0 comments on commit e451cca

Please sign in to comment.