Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
digitalocean-droplet-sdk
Advanced tools
A simple interface to get metadata about a DigitalOcean Droplet.
npm install digitalocean-droplet-sdk --save
DigitalOcean-Droplet-SDK was designed to provide a simple and easy to use interface to get metadata about the droplet that it is running on. You can chose to either request the entire metadata for a droplet, or specific values from the metadata.
var dropletSDK = require('digitalocean-droplet-sdk');
dropletSDK.getMetadata().then(function(metadata) {
/* do something with the result */
}).catch(function() {
/* error :( */
})
var dropletSDK = require('digitalocean-droplet-sdk');
dropletSDK.getPrivateIP4Addresses().then(function(ipAddresses) {
/* do something with the result */
}).catch(function() {
/* error :( */
})
Function | Description | Type |
---|---|---|
getMetadata() | Returns all the metadata for the droplet see the DigitalOcean guides for more | JSON |
getID() | Returns the id of the droplet | Number |
getVendorData() | Returns the vendor data about the droplet | String |
getAuthKey() | Returns the Auth Key | String |
getHostName() | Returns the hostname/name of the droplet | String |
getName() | Returns the hostname/name of the droplet | String |
getPublicKeys | List of public ssh keys that have been added to the droplet | Array<String> |
getRegion() | Returns the region of the droplet | String |
getInterfaces() | Returns both the public and private interfaces for the droplet. This is in the form of an object with two values; 'public' and 'private' which in turn contain arrays of respective interfaces (see format below) | JSON |
getPrivateInterfaces() | Returns an array of the private interfaces for the droplet (see format below) | JSON |
getPrivateIP4Addresses() | Returns an array of the private ipv4 addresses as strings | Array<String> |
getPrivateIP6Addresses() | Returns an array of the private ipv6 addresses as strings | Array<String> |
getPrivateMacAddresses() | Returns an array of the private MAC addresses as strings | Array<String> |
getPublicInterfaces() | Returns an array of the public interfaces for the droplet (see format below) | JSON |
getPublicIP4Addresses() | Returns an array of the public ipv4 addresses as strings | Array<String> |
getPublicIP6Addresses() | Returns an array of the public ipv6 addresses as strings | Array<String> |
getPublicMacAddresses() | Returns an array of the public MAC addresses as strings | Array<String> |
hasFloatingIP() | Returns whether or not the droplet has a floating ip | Boolean |
getFloatingIP() | Returns a string representation of the droplet floating ip if it has one, if it does not it will return a string of length 0 | String |
getDNS() | Returns an array of strings of the name servers for this droplet | Array<String> |
getNameServers() | Returns an array of strings of the name servers for this droplet | Array<String> |
getTags() | Returns an array of strings of the tags for this droplet | Array<String> |
If you feel there are any missing methods please create an issue for it on GitHub. |
{
'ipv4':{
'ip_address':'10.132.255.114',
'netmask':'255.255.0.0',
'gateway':'10.132.0.1',
},
'ipv6':{
'ip_address':'2604:A880:0800:0010:0000:0000:017D:2001',
'cidr':64,
'gateway':'2604:A880:0800:0010:0000:0000:0000:0001',
},
'mac':'04:01:2a:0f:2a:02',
'type':'private',
}
FAQs
A NodeJS wrapper for the DigitalOcean Droplet API
We found that digitalocean-droplet-sdk 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.