Giter Club home page Giter Club logo

nodalyzer's Introduction

nodalyzer

node.js wrapper for Wappalyzer

This module will open a headless Webkit browser using phantomjs-node , navigate to the site, invokes Wappalyzer Bookmarklet and parses output.

Features:

  • API to get technologies used for the url.
  • Additional server.js script to consume the API from web service.
  • Additional nodalyzer script to invoke from command line.

Installation

You can install with npm:

$ npm install nodalyzer

API docs

  • init(callback[, options]) - Initializes the library.

    • callback(status): A callback function will be called upon initialization with status indicating if initialization is successfull.
    • options: This optional options object will passed to phantomjs-node's create function. Additionally following fields are available.
      • verbosity: Enable verbose log (default false).
      • port: To include js files to the page, nodalyzer opens a http connection on specified port. (default 8125). This is a workaround since phantomjs-node doesn't support includeJs with libraryPath.
  • get(url, callback) - Opens the url/site and returns technologies detected.

    • url: url
    • callback(err, response): A callback function will be called with error and response object. In case of an error, err will be an instance of Error. In case of success, err will be null and response will contain following fields:
      • apps: Array of apps with following properties.
        • name: Name of the app
        • category: Category
  • close([force]) - This will wait for the pending urls to complete and then exits the phantom instance and other dependencies. For sample usage, refer to previous example.

    • force: If force is set, exits without waiting for pending urls to complete.

An example usage of above APIs is shown below.

var nodalyzer = require('nodalyzer');

nodalyzer.init(function (status) {
	if (!status) { return; }
	nodalyzer.get('http://www.github.com/', function (err, response) {
      if (err) { throw err; }
      response.apps.forEach(function (app) {
          console.log(app);
      });
	});
    nodalyzer.close();
});

Utils

  • nodalyzer - A command line utility to invoke the above API. An example usage of nodalyzer command is shown below.
nodalyzer http://www.github.com/
  • server.js - script to consume the web service.
    • port: port [default 3000]
    • hostname: hostname [default 127.0.0.1]

An example usage of server.js is shown below.

node server.js --port=6000 --host=0.0.0.0
//Once server starts, API can be invoked from curl or some http request tool.
//Ex: `curl 'http://0.0.0.0:6000/?url=http://www.github.com/`

nodalyzer's People

Watchers

 avatar  avatar

Forkers

mirajshaikh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.