New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

exploitsearch

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exploitsearch

A library for accessing ExploitSearch.net API, http://www.exploitsearch.net/

2.0.3
latest
Source
npm
Version published
Weekly downloads
5
25%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

node

FAQs

Package last updated on 05 Mar 2017

Did you know?

Socket

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.

Install

Related posts