UNPKG

@hashangit/breachhound

Version:

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

39 lines 1.59 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.checkHudsonRock = checkHudsonRock; const axios_1 = __importDefault(require("axios")); const utils_1 = require("../utils"); // ... import HudsonRock specific types ... async function checkHudsonRock(targetUsername, apiKey // Keep signature consistent, though key is unused now ) { // Use the URL from the GoSearch source code const url = `https://cavalier.hudsonrock.com/api/json/v2/osint-tools/search-by-username?username=${encodeURIComponent(targetUsername)}`; try { // No API key seems needed for this endpoint based on GoSearch code const headers = { 'User-Agent': utils_1.DEFAULT_USER_AGENT }; const response = await axios_1.default.get(url, { headers: headers, // Pass headers without API key timeout: 15000, // Add a reasonable timeout }); // ... logic to parse response ... const found = !!(response.data.stealers && response.data.stealers.length > 0); return { service: 'HudsonRock', status: 'checked', found: found, details: response.data, // Return the raw data or a structured summary }; } catch (error) { return { service: 'HudsonRock', status: 'error', found: false, error: error.message, }; } } //# sourceMappingURL=hudsonRock.js.map