
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
An unnoficial api wrapper for the contabo api. Info on how to use is below
const Contabo = require('contapi')
const client = new Contabo({
apiUsername: 'email@email.com',
apiPassword: 'exmple',
clientId: '',
clientSecret: '',
autoReAuth: true //Set the client to automatically re auth every 285 seconds, or let you manually auth the client with .auth(). Keep in mind, contabo api authorization expires about every 290 seconds. It is reccomended to keep active
})
client.on('ready', () => {
console.log('Instances cached, and client is authed!')
})
You can find all this information in the API Section of the CCP
const instance = client.instances.get('xxxxxxxx')
instance.stop()
const instance = client.instances.find(instance => instance.name == 'vmiXXXXXXX')
instance.stop()
const instances = await client.getInstances()
instances.forEach(async instance => {
await instance.snapshot({
name: 'mySnapshot',
description: 'mySnapshotDescription'
})
.catch(e) {
console.log(e)
/*
I have noticed that contabo's api sometimes breaks
itself and says that you have max snapshots
even if you dont, that is why I suggest a catch
*/
}
})
Instances currently has 4 actions, start, restart, stop, and snapshot. They can be used to do as their name says, when you create a snapshot it will return with 3 actions they are delete, which is used to delete the snapshot, update, which can be used to update the name or title for the snapshot, and rollback, which allows you to rollback the instance to that snapshot
const instance = await client.getInstance('xxxxxx')
instance.restart()
When restarting the instance it will return the action back if you await it but it isn't required as the return value is quite useless
const instanceStatus = await client.getInstanceStatus('xxxxxx')
console.log(instanceStatus)
Basically getInstance but it return the status on the function instead of the whole thing, should be useful for making it shorter
const clientAuth = await client.auth()
console.log(clientAuth)
This is automatically done as soon as you initiate the client, but if you want your auth key and other stuff I thought I would just throw this in there.
Contributions are always welcome!
See the github to begin contributing.
FAQs
Contabo API Wrapper
The npm package contapi receives a total of 20 weekly downloads. As such, contapi popularity was classified as not popular.
We found that contapi 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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.