UNPKG

@hashangit/breachhound

Version:

An efficient OSINT tool for uncovering digital footprints associated with a username. TypeScript port of GoSearch.

49 lines 1.77 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseArguments = parseArguments; const yargs_1 = __importDefault(require("yargs")); const helpers_1 = require("yargs/helpers"); async function parseArguments() { const argv = await (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv)) .usage('Usage: breachhound -u <username> [options]') // ... (options -u, -b, --no-false-positives as before) ... .option('u', { alias: 'username', describe: 'The username to search for', type: 'string', }) .option('b', { alias: 'breach-directory-key', describe: 'Your API key for BreachDirectory', type: 'string', }) .option('no-false-positives', { describe: 'Hide uncertain results', type: 'boolean', default: false, }) .positional('username_pos', { describe: 'The username to search for (positional argument)', type: 'string', }) .help('h') .alias('h', 'help') // ... version ... .strict() .parse(); const targetUsername = argv.u || argv.username_pos; if (!targetUsername || typeof targetUsername !== 'string') { // Ensure it's a string console.error('Error: Username is required.'); yargs_1.default.showHelp(); // Show help message process.exit(1); } return { targetUsername: targetUsername, // Type assertion after check breachDirectoryApiKey: argv.b, hideFalsePositives: argv['no-false-positives'], }; } //# sourceMappingURL=args.js.map