Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
The Domai.nr NPM package is a dead-simple way to utilize Domai.nr's JSON API. It only comes with two methods: search
and info
, but that's all we need to get a ton of work done with the data behind Domai.nr.
$ npm install Domai.nr
Like previously mentioned, this package comes with two methods available: search
, and info
. Both of them take two arguments: a query and a callback (which aliases the parameter you pass into it as the data that's returned from Domai.nr, so you can do whatever you want with it).
The .search
method abstracts Domainr's own search endpoint. The response will be a JSON object, like so:
{
"query": "domai.nr",
"results": [{
"domain": "domai.nr",
"register_url": "http://domai.nr/domai.nr/register",
"host": "",
"path": "",
"subdomain": "domai.nr",
"availability": "taken"
},
{
"domain": "dom.ai",
"register_url": "http://domai.nr/dom.ai/register",
"host": "",
"path": "/nr",
"subdomain": "dom.ai",
"availability": "available"
},
{
"domain": "doma.in",
"register_url": "http://domai.nr/doma.in/register",
"host": "",
"path": "/r",
"subdomain": "doma.in",
"availability": "taken"
},
{
"domain": "do.ma",
"register_url": "http://domai.nr/do.ma/register",
"host": "",
"path": "/i.nr",
"subdomain": "do.ma",
"availability": "maybe"
},
{
"domain": "d.om",
"register_url": "http://domai.nr/d.om/register",
"host": "",
"path": "/ai.nr",
"subdomain": "d.om",
"availability": "unavailable"
},
{
"domain": "do",
"register_url": "http://domai.nr/do/register",
"host": "",
"path": "/mai.nr",
"subdomain": "do",
"availability": "tld"
}]
}
To use .search()
, it's very simple:
var domainr = require('domainr')
domainr.search("google.com", function(responseFromDomainr) {
// the responseFromDomainr is the JSON object mentioned above
})
The .info
method is called in the exact same way. It's an abstraction from Domainr's own Info endpoint.
The difference between .info()
and .search()
is the JSON response: it is information about the domain you pass in. See an example below:
{
"domain": "domai.nr",
"whois_url": "http://domai.nr/domai.nr/whois",
"register_url": "http://domai.nr/domai.nr/register",
"tld": {
"domain": "nr",
"domain_idna": "nr",
"wikipedia_url": "http://wikipedia.org/wiki/.nr",
"iana_url": "http://www.iana.org/domains/root/db/nr.html"
},
"registrars": [{
"registrar": "cenpac.net.nr",
"name": "CenpacNET",
"register_url": "http://domai.nr/domai.nr/register/cenpac.net.nr"
}],
"host": "",
"path": "",
"www_url": "http://domai.nr/domai.nr/www",
"query": "domai.nr",
"subdomain": "domai.nr",
"domain_idna": "domai.nr",
"availability": "taken"
}
To use .info()
, it's very simple:
var domainr = require('domainr')
domainr.info("cnnr.me", function(responseFromDomainr) {
// the responseFromDomainr is the JSON object mentioned above
})
I prefer making my express apps driven by an internal API. By that, I mean I like to set up back-end routes that my front-end routes can receive data from.
I have made 2 simple apps using this package: one using express, and a twitter bot. You can see them both in the /example
directory within this repo.
I really like Domai.nr. If you do too, you may be interested in the chrome extension or twitter bot I wrote.
FAQs
A dead-simple way to utilize Domai.nr's JSON API
The npm package Domai.nr receives a total of 1 weekly downloads. As such, Domai.nr popularity was classified as not popular.
We found that Domai.nr demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.