2.0.3 • Published 7 years ago

exploitsearch v2.0.3

Weekly downloads
30
License
MIT
Repository
github
Last release
7 years ago

exploitsearch.js

Build Status

A Node.js library for accessing the Exploitsearch.net site API.

Demo

## Use

const search = require('exploitsearch');

const opts = {
  timeout: 10000,
  exploits: true,
};

// With callbacks.
search('freepbx', opts, (err, res) => {
  if (err) {
    console.log('Error:');
    console.log(err);

    process.exit(1);
  } else {
    console.log('Response:');
    console.log(res);
  }
});

// As a promise.
search('asterisk', opts)
.then(res => {
  console.log('Response (promise):');
  console.log(res);
})
.catch(err => {
  console.log('Error (promise):');
  console.log(err);

  process.exit(1);
});

More examples are included in the tests folder.

API

If the callback is ommited a promise is returned.

search(queryString, opts, callback)

Make a request to the API.

  • queryString (String): The string to make the search.
  • opts (Object): The options of the method:
  • exploits - Only return vulnerabilities with public exploits. (default: false)
  • timeout (number): Time to wait for a response. (default: 5000)
  • callback - We follow the Error-first callback paradigm.

Developer guide

  • Start coding with one of the actual modules similar to the new one as a boilerplate.
  • Use GitHub pull requests.

Conventions:

  • We use ESLint and Airbnb style guide.
  • Please run to be sure your code fits with it and the tests keep passing:
npm run-script cont-int

Commit messages rules:

  • It should be formed by a one-line subject, followed by one line of white space. Followed by one or more descriptive paragraphs, each separated by one line of white space. All of them finished by a dot.
  • If it fixes an issue, it should include a reference to the issue ID in the first line of the commit.
  • It should provide enough information for a reviewer to understand the changes and their relation to the rest of the code.
2.0.3

7 years ago

2.0.2

7 years ago

2.0.0

8 years ago

1.1.6

8 years ago

1.1.5

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

9 years ago

1.0.14

9 years ago

1.0.13

9 years ago

1.0.12

9 years ago

1.0.11

9 years ago

1.0.10

9 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago