npm install redcheck
var RedCheck = require('redcheck');
var redcheck = new RedCheck({
hostname: 'YourHost',
protocol: 'http',
port: 4142,
pathname: '/redcheck',
password: 'YourPassword'
});
redcheck.info(function (err, result) {
if (err) {
console.error(err);
} else {
console.log(result);
}
});
Get all hosts
redcheck.hosts(function (err, result) {
if (err) {
console.error(err);
} else {
console.log(result);
}
});
Get all vulnerabilities in host
redcheck.vulnerability(hostId, function (err, result) {
if (err) {
console.error(err);
} else {
console.log(result);
}
});
Get all definitions in host
redcheck.definitions(hostId, function (err, result) {
if (err) {
console.error(err);
} else {
console.log(result);
}
});
Get all patches in host
redcheck.patch(hostId, function (err, result) {
if (err) {
console.error(err);
} else {
console.log(result);
}
});
Get inventory report in host
redcheck.inventory(hostId, function (err, result) {
if (err) {
console.error(err);
} else {
console.log(result);
}
});
- request
- xml2js
- lodash