Socket
Socket
Sign inDemoInstall

@rqt/namecheap-web

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rqt/namecheap-web - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

22

build/index.js

@@ -7,2 +7,3 @@ const { debuglog } = require('util');

const { deepEqual } = require('./lib');
const { Session } = require('rqt');

@@ -44,2 +45,22 @@ const LOG = debuglog('@rqt/namecheap-web')

static async WHOIS(domain) {
const s = new Session({
host: 'https://www.namecheap.com/domains/whois',
headers: {
'User-Agent': USER_AGENT,
},
})
const res = await s.rqt(`/results.aspx?domain=${domain}`)
const re = /var url = "\/domains\/whois\/whois-ajax\.aspx\?(.+?)"/
const reRes = re.exec(res)
if (!reRes) throw new Error('Could not find the AJAX request URL.')
const [, params] = reRes
const res2 = await s.rqt(`/whois-ajax.aspx?${params}`)
const re2 = /<pre id=".+?_whoisResultText" class="wrapped whois">([\s\S]+)<\/pre>/
const re2Res = re2.exec(res2)
if (!re2Res) throw new Error('Could not extract data.')
const [, whois] = re2Res
return whois
}
async auth(username, password, phone, force) {

@@ -62,2 +83,3 @@ let cookies

cookies = await authenticator.signIn()
await this._saveSession(cookies)
}

@@ -64,0 +86,0 @@

@@ -0,1 +1,7 @@

## 2 October 2018
### 1.1.0
- [feature] Write the `whois` requests.
## 27 September 2018

@@ -2,0 +8,0 @@

5

package.json
{
"name": "@rqt/namecheap-web",
"version": "1.0.0",
"version": "1.1.0",
"description": "An API to namecheap.com via the web interface, with an ability to log in using 2-factor Auth and check Whois.",

@@ -19,3 +19,4 @@ "main": "build",

"e": "node example",
"example/": "yarn e example/example.js"
"example/": "yarn e example/example.js",
"example/whois.js": "yarn e example/whois.js"
},

@@ -22,0 +23,0 @@ "files": [

build/index.js.map

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc