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

Implement WHOIS / registry info search page on get.gov #267

Open
7 tasks
gabydisarli opened this issue Jan 30, 2024 · 1 comment
Open
7 tasks

Implement WHOIS / registry info search page on get.gov #267

gabydisarli opened this issue Jan 30, 2024 · 1 comment
Labels
dev For developers to work on

Comments

@gabydisarli
Copy link
Contributor

gabydisarli commented Jan 30, 2024

Story

A WHOIS search feature needs to be added on a new page in get.gov/domains/whois.

Acceptance Criteria

Additional Context

The google doc for content is the source of truth for the content for this page

For devs:
You could use a package from online to help with whois as there are a few. However, if you don't find one that's reliable, you could send the whois message and either parse into a json or do string search to find the values that need to display at the top. Then show the full string output for the full whois section. While string search is not great, for a few values it may be reasonable to do if json seems to difficult.

While not many of these node packages for whois are well maintained, you could use their code as examples for writing your own as most are a single file for executing this function.

Note on difficulty, please keep prod team updated if blockers or issues arise that slow this down
Below is a 5 mins js function to retreive whois, this is just an example of how to get whois and retrieve the data as string without any third party dependencies. note net comes with node.

You may copy the below code into a .js, such as whois.js file then run "node whois.js" in terminal.

const net = require('net');

//dumb constant just for illustration purposes
const domain = 'gsa.gov';

// Define the Cloudflare's WHOIS server
const whoisServer = 'whois.dotgov.gov';

// Function to send WHOIS query
function sendWhoisQuery(domain, server, callback) {
    const client = net.createConnection({ port: 43, host: server }, () => {
        client.write(`${domain}\r\n`);
    });

    let whoisData = '';

    client.on('data', (data) => {
        
        whoisData += data.toString();
    });

    client.on('end', () => {
        callback(null, whoisData);
    });

    client.on('error', (err) => {
        callback(err);
    });
}

// Perform the WHOIS query
sendWhoisQuery(domain, whoisServer, (err, data) => {
    if (err) {
        console.error('Error:', err);
    } else {
        console.log('WHOIS data:', data);
    }
}); 

Issue Links

Design ticket: cisagov/manage.get.gov#1221

@vickyszuchin
Copy link

"refinement" label added: @abroddrick requested time to review the scope and ACs further before committing this into the sprint. It work may be too large for one sprint. It may need splitting. Currently, it has been story pointed to a 5.

Decision in sprint planning meeting is to keep this ticket in "Ready" until dev analysis is completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev For developers to work on
Projects
Status: 🎯 Ready
Development

No branches or pull requests

3 participants