Skip to content
This repository has been archived by the owner on May 19, 2021. It is now read-only.

Commit

Permalink
Fix pkg import paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmdln committed Feb 25, 2019
1 parent ec5de65 commit 0800321
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "whodis",
"version": "0.1.0",
"version": "0.2.0",
"description": "Discover software used by websites via command line",
"main": "whodis.js",
"scripts": {
"build": "npm run build:linux && npm run build:windows",
"build:linux": "./node_modules/.bin/pkg ./src/whodis.js --options no-deprecation,no-warnings -t node10-linux",
"build:windows": "./node_modules/.bin/pkg ./src/whodis.js --options no-deprecation,no-warnings -t node10-win",
"test": "node ./src/whodis.js github.com gitlab.com bitbucket.org"
"test": "node ./src/whodis.js github.com gitlab.com bitbucket.org",
"test:build": ""
},
"dependencies": {
"json2csv": "^4.3.5",
Expand Down
23 changes: 13 additions & 10 deletions src/whodis.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
// whodis.js
'use strict';

const child = require('child_process')
const child = require('child_process')
const path = require('path')
const Command = require('./lib/command.js')
const Log = require('./lib/log.js')

const cmd = new Command("whodis", "[OPTION] URLs...", "Discover software used by websites")
let Verbose = cmd.Flag("verbose", "V", false, "Show additional messages for tracking execution.")
let Quiet = cmd.Flag("quiet", "q", false, "Suppress output, ignoring whether --verbose was issued.")
let Debug = cmd.Flag("debug", "d", false, "Enable debug output, ignoring whether --quiet was issued.")
let File = cmd.Flag("file", "f", "", "Read domains from the specified text file.")
const Log = require('./lib/log.js')
const Wapp = require('./lib/wappalyzer.js')

const cmd = new Command("whodis", "[OPTION] URLs...", "Discover software used by websites")
let Verbose = cmd.Flag("verbose", "V", false, "Show additional messages for tracking execution.")
let Quiet = cmd.Flag("quiet", "q", false, "Suppress output, ignoring whether --verbose was issued.")
let Debug = cmd.Flag("debug", "d", false, "Enable debug output, ignoring whether --quiet was issued.")
let File = cmd.Flag("file", "f", "", "Read domains from the specified text file.")
let saveJson = cmd.Flag("json", "j", "", "Save data to tje specified JSON file")
let Args = cmd.Parse()
let Args = cmd.Parse()


const log = new Log(cmd.name)
Expand All @@ -30,8 +32,9 @@ if (File.value !== "" && File.value !== "") {
}
}

let p = path.join(__dirname, './exec.js')
for (let u in urls) {
let url = urls[u]
let result = child.execSync("node ./src/exec.js " + url)
let result = child.execSync("node " + p + " " + url)
console.log(result.toString())
}

0 comments on commit 0800321

Please sign in to comment.