Skip to content

Latest commit

 

History

History
90 lines (78 loc) · 1.39 KB

README.md

File metadata and controls

90 lines (78 loc) · 1.39 KB

RedCheck

Install

npm install redcheck

Usage

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);
    }
});

Other methods

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);
    }
});

Dependencies

  • request
  • xml2js
  • lodash