UNPKG

ntlm-parser

Version:

Check and understand the content of a NTLM message

24 lines 947 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ntlmParseFromCmdLine = void 0; const commander_1 = require("commander"); const _1 = require("."); const package_json_1 = require("../package.json"); function ntlmParseFromCmdLine() { commander_1.program .version(package_json_1.version) .arguments('<message>') .option('-x, --hex', 'accept hex string (base64 is default)') .description('Parse an NTLM message', { message: 'base64 NTLM message', }); commander_1.program.parse(process.argv); const encoding = commander_1.program.hex ? 'hex' : 'base64'; if (!commander_1.program.args[0]) { console.log('<message> missing.'); commander_1.program.help(); } return _1.ntlmParse(commander_1.program.args[0], { encoding }); } exports.ntlmParseFromCmdLine = ntlmParseFromCmdLine; //# sourceMappingURL=cmdLine.js.map