[ ['name' => 'Universal Search', 'endpoint' => '/api/search', 'method' => 'POST', 'priority' => 1], ['name' => 'KeyScore', 'endpoint' => '/api/keyscore/search', 'method' => 'POST', 'priority' => 1], ['name' => 'Dump.cat', 'endpoint' => '/api/dumpcat/search/init', 'method' => 'POST', 'async' => true, 'priority' => 1], ['name' => 'Snusbase', 'endpoint' => '/api/snusbase/search', 'method' => 'POST', 'priority' => 2], ['name' => 'LeakCheck v2', 'endpoint' => '/api/leakcheck/v2', 'method' => 'POST', 'priority' => 1], ['name' => 'HackCheck', 'endpoint' => '/api/hackcheck', 'method' => 'POST', 'priority' => 2], ['name' => 'BreachBase', 'endpoint' => '/api/breachbase', 'method' => 'POST', 'priority' => 2], ['name' => 'IntelVault', 'endpoint' => '/api/intelvault', 'method' => 'POST', 'priority' => 2], ['name' => 'IdLeakCheck', 'endpoint' => '/api/idleakcheck', 'method' => 'POST', 'priority' => 3], ['name' => 'Akula', 'endpoint' => '/api/akula', 'method' => 'POST', 'priority' => 2], ['name' => 'LeakSight', 'endpoint' => '/api/leaksight', 'method' => 'POST', 'priority' => 2], ['name' => 'SEON Email', 'endpoint' => '/api/seon/email', 'method' => 'GET', 'priority' => 3], ['name' => 'OathNet Holehe', 'endpoint' => '/api/oathnet/holehe', 'method' => 'POST', 'priority' => 3], ['name' => 'OathNet GHunt', 'endpoint' => '/api/oathnet/ghunt', 'method' => 'POST', 'priority' => 3], ['name' => 'INF0SEC Leaks', 'endpoint' => '/api/inf0sec/leaks', 'method' => 'GET', 'priority' => 2], ['name' => 'INF0SEC Discord', 'endpoint' => '/api/inf0sec/discord', 'method' => 'GET', 'priority' => 3] ], 'username' => [ ['name' => 'Universal Search', 'endpoint' => '/api/search', 'method' => 'POST', 'priority' => 1], ['name' => 'KeyScore', 'endpoint' => '/api/keyscore/search', 'method' => 'POST', 'priority' => 1], ['name' => 'Dump.cat', 'endpoint' => '/api/dumpcat/search/init', 'method' => 'POST', 'async' => true, 'priority' => 1], ['name' => 'Snusbase', 'endpoint' => '/api/snusbase/search', 'method' => 'POST', 'priority' => 2], ['name' => 'LeakCheck v2', 'endpoint' => '/api/leakcheck/v2', 'method' => 'POST', 'priority' => 1], ['name' => 'HackCheck', 'endpoint' => '/api/hackcheck', 'method' => 'POST', 'priority' => 2], ['name' => 'BreachBase', 'endpoint' => '/api/breachbase', 'method' => 'POST', 'priority' => 2], ['name' => 'Akula', 'endpoint' => '/api/akula', 'method' => 'POST', 'priority' => 2], ['name' => 'LeakSight', 'endpoint' => '/api/leaksight', 'method' => 'POST', 'priority' => 2], ['name' => 'INF0SEC Username', 'endpoint' => '/api/inf0sec/username', 'method' => 'GET', 'priority' => 3], ['name' => 'Room 101 Reddit', 'endpoint' => '/api/room101/user/{value}', 'method' => 'GET', 'priority' => 3], ['name' => 'OathNet Minecraft', 'endpoint' => '/api/oathnet/minecraft-history', 'method' => 'POST', 'priority' => 3] ], 'phone' => [ ['name' => 'Universal Search', 'endpoint' => '/api/search', 'method' => 'POST', 'priority' => 1], ['name' => 'KeyScore', 'endpoint' => '/api/keyscore/search', 'method' => 'POST', 'priority' => 1], ['name' => 'Snusbase', 'endpoint' => '/api/snusbase/search', 'method' => 'POST', 'priority' => 2], ['name' => 'LeakCheck v2', 'endpoint' => '/api/leakcheck/v2', 'method' => 'POST', 'priority' => 1], ['name' => 'LeakSight', 'endpoint' => '/api/leaksight', 'method' => 'POST', 'priority' => 2], ['name' => 'SEON Phone', 'endpoint' => '/api/seon/phone', 'method' => 'GET', 'priority' => 3], ['name' => 'INF0SEC HLR', 'endpoint' => '/api/inf0sec/hlr', 'method' => 'GET', 'priority' => 3], ['name' => 'IdLeakCheck', 'endpoint' => '/api/idleakcheck', 'method' => 'POST', 'priority' => 3] ], 'domain' => [ ['name' => 'Universal Search', 'endpoint' => '/api/search', 'method' => 'POST', 'priority' => 1], ['name' => 'KeyScore', 'endpoint' => '/api/keyscore/search', 'method' => 'POST', 'priority' => 1], ['name' => 'Dump.cat Reverse', 'endpoint' => '/api/dumpcat/reverse/init', 'method' => 'POST', 'async' => true, 'priority' => 1], ['name' => 'Snusbase', 'endpoint' => '/api/snusbase/search', 'method' => 'POST', 'priority' => 2], ['name' => 'LeakCheck v2', 'endpoint' => '/api/leakcheck/v2', 'method' => 'POST', 'priority' => 1], ['name' => 'Akula', 'endpoint' => '/api/akula', 'method' => 'POST', 'priority' => 2], ['name' => 'LeakSight', 'endpoint' => '/api/leaksight', 'method' => 'POST', 'priority' => 2], ['name' => 'INF0SEC Domain', 'endpoint' => '/api/inf0sec/domain', 'method' => 'GET', 'priority' => 3] ], 'ip' => [ ['name' => 'Universal Search', 'endpoint' => '/api/search', 'method' => 'POST', 'priority' => 1], ['name' => 'KeyScore IP', 'endpoint' => '/api/keyscore/iplookup', 'method' => 'POST', 'priority' => 1], ['name' => 'Snusbase IP WHOIS', 'endpoint' => '/api/snusbase/ip-whois', 'method' => 'POST', 'priority' => 2], ['name' => 'LeakCheck v2', 'endpoint' => '/api/leakcheck/v2', 'method' => 'POST', 'priority' => 1], ['name' => 'LeakSight', 'endpoint' => '/api/leaksight', 'method' => 'POST', 'priority' => 2] ], 'hash' => [ ['name' => 'KeyScore Hash', 'endpoint' => '/api/keyscore/hashlookup', 'method' => 'POST', 'priority' => 1], ['name' => 'Snusbase Hash', 'endpoint' => '/api/snusbase/hash-lookup', 'method' => 'POST', 'priority' => 1], ['name' => 'LeakCheck v2', 'endpoint' => '/api/leakcheck/v2', 'method' => 'POST', 'priority' => 2] ], 'name' => [ ['name' => 'IdLeakCheck', 'endpoint' => '/api/idleakcheck', 'method' => 'POST', 'priority' => 1], ['name' => 'INF0SEC NPD', 'endpoint' => '/api/inf0sec/npd', 'method' => 'GET', 'priority' => 1], ['name' => 'Rutify Name', 'endpoint' => '/api/rutify/name', 'method' => 'POST', 'priority' => 2] ], 'discord_id' => [ ['name' => 'OathNet Discord->Roblox', 'endpoint' => '/api/oathnet/discord-to-roblox', 'method' => 'POST', 'priority' => 1], ['name' => 'INF0SEC Discord', 'endpoint' => '/api/inf0sec/discord', 'method' => 'GET', 'priority' => 1] ], 'roblox' => [ ['name' => 'OathNet Roblox', 'endpoint' => '/api/oathnet/roblox-userinfo', 'method' => 'POST', 'priority' => 1] ], 'steam' => [ ['name' => 'OathNet Steam', 'endpoint' => '/api/oathnet/steam-userinfo', 'method' => 'POST', 'priority' => 1] ], 'xbox' => [ ['name' => 'OathNet Xbox', 'endpoint' => '/api/oathnet/xbox-userinfo', 'method' => 'POST', 'priority' => 1] ], 'rut' => [ ['name' => 'Rutify RUT', 'endpoint' => '/api/rutify/rut', 'method' => 'POST', 'priority' => 1], ['name' => 'Rutify SII', 'endpoint' => '/api/rutify/sii', 'method' => 'POST', 'priority' => 1] ], 'plate' => [ ['name' => 'Rutify Car', 'endpoint' => '/api/rutify/car', 'method' => 'POST', 'priority' => 1] ], 'reddit' => [ ['name' => 'Room 101 Analysis', 'endpoint' => '/api/room101/analyze/{value}', 'method' => 'GET', 'params' => 'model=gpt-4&latest=true&sources=true', 'priority' => 1], ['name' => 'Room 101 User', 'endpoint' => '/api/room101/user/{value}', 'method' => 'GET', 'params' => 'latest=true', 'priority' => 2], ['name' => 'Room 101 Search', 'endpoint' => '/api/room101/search', 'method' => 'GET', 'priority' => 3] ], 'subreddit' => [ ['name' => 'Room 101 Subreddit', 'endpoint' => '/api/room101/subreddit/{value}', 'method' => 'GET', 'priority' => 1] ] ]; // Function to build request body based on endpoint function buildRequestBody($endpoint, $searchType, $searchValue) { $body = []; // Universal Search if (strpos($endpoint, '/api/search') !== false) { $body = ['field' => [[$searchType => $searchValue]]]; } // KeyScore elseif (strpos($endpoint, '/api/keyscore/search') !== false) { $types = $searchType; if ($searchType === 'name') $types = 'email'; // Fallback $body = [ 'terms' => [$searchValue], 'types' => [$types], 'source' => 'xkeyscore', 'wildcard' => false, 'regex' => false, 'operator' => 'OR', 'page' => 1, 'pagesize' => 10000 ]; } elseif (strpos($endpoint, '/api/keyscore/iplookup') !== false) { $body = ['ip' => $searchValue]; } elseif (strpos($endpoint, '/api/keyscore/hashlookup') !== false) { $body = ['hash' => $searchValue]; } // Dump.cat elseif (strpos($endpoint, '/api/dumpcat/search/init') !== false) { $body = [ 'term' => $searchValue, 'sort' => 2 ]; } elseif (strpos($endpoint, '/api/dumpcat/reverse/init') !== false) { $url = $searchValue; if (!preg_match('/^https?:\/\//', $url)) { $url = 'https://' . $url; } $body = ['term' => $url]; } // Snusbase elseif (strpos($endpoint, '/api/snusbase/search') !== false) { $body = [ 'terms' => [$searchValue], 'types' => [$searchType], 'wildcard' => false, 'group_by' => 'db', 'tables' => null ]; } elseif (strpos($endpoint, '/api/snusbase/ip-whois') !== false) { $body = ['ip' => $searchValue]; } elseif (strpos($endpoint, '/api/snusbase/hash-lookup') !== false) { $body = ['hash' => $searchValue]; } // LeakCheck elseif (strpos($endpoint, '/api/leakcheck') !== false) { $body = [ 'term' => $searchValue, 'search_type' => $searchType, 'limit' => 1000, 'offset' => 0 ]; } // HackCheck & BreachBase elseif (strpos($endpoint, '/api/hackcheck') !== false || strpos($endpoint, '/api/breachbase') !== false) { $body = [ 'term' => $searchValue, 'search_type' => $searchType ]; } // IntelVault elseif (strpos($endpoint, '/api/intelvault') !== false) { $body = ['field' => [[$searchType => $searchValue]]]; } // IdLeakCheck elseif (strpos($endpoint, '/api/idleakcheck') !== false) { if ($searchType === 'name') { $nameParts = explode(' ', $searchValue, 2); $body = [ 'firstName' => $nameParts[0] ?? '', 'lastName' => $nameParts[1] ?? '', 'sources' => ['npd'] ]; } elseif ($searchType === 'phone') { $body = [ 'phone1' => $searchValue, 'sources' => ['npd'] ]; } elseif ($searchType === 'email') { $body = [ 'email' => $searchValue, 'sources' => ['npd'] ]; } } // Akula elseif (strpos($endpoint, '/api/akula') !== false) { $body = [ 'searchTerm' => $searchValue, 'search_type' => $searchType ]; } // LeakSight elseif (strpos($endpoint, '/api/leaksight') !== false) { $st = $searchType; if ($searchType === 'ip') $st = 'ipgeo'; $body = [ 'term' => $searchValue, 'search_type' => $st ]; } // Rutify elseif (strpos($endpoint, '/api/rutify/name') !== false) { $body = ['name' => $searchValue]; } elseif (strpos($endpoint, '/api/rutify/car') !== false) { $body = ['plate' => $searchValue]; } elseif (strpos($endpoint, '/api/rutify') !== false) { $body = ['rut' => $searchValue]; } // OathNet elseif (strpos($endpoint, '/api/oathnet/holehe') !== false) { $body = ['email' => $searchValue]; } elseif (strpos($endpoint, '/api/oathnet/ghunt') !== false) { $body = ['email' => $searchValue]; } elseif (strpos($endpoint, '/api/oathnet/roblox-userinfo') !== false) { $body = ['username' => $searchValue]; } elseif (strpos($endpoint, '/api/oathnet/discord-to-roblox') !== false) { $body = ['discord_id' => $searchValue]; } elseif (strpos($endpoint, '/api/oathnet/steam-userinfo') !== false) { $body = ['steam_id' => $searchValue]; } elseif (strpos($endpoint, '/api/oathnet/xbox-userinfo') !== false) { $body = ['xbl_id' => $searchValue]; } elseif (strpos($endpoint, '/api/oathnet/minecraft-history') !== false) { $body = ['username' => $searchValue]; } return $body; } // Function to make API calls function makeAPICall($api, $searchType, $searchValue) { global $API_KEY, $BASE_URL; $endpoint = $api['endpoint']; $method = $api['method']; // Replace placeholders $endpoint = str_replace('{value}', urlencode($searchValue), $endpoint); $url = $BASE_URL . $endpoint; // Add query parameters for GET requests if ($method === 'GET') { $params = []; if (isset($api['params'])) { $url .= '?' . $api['params']; } elseif (strpos($endpoint, '/api/seon/email') !== false) { $url .= '?email=' . urlencode($searchValue); } elseif (strpos($endpoint, '/api/seon/phone') !== false) { $url .= '?phone=' . urlencode($searchValue); } elseif (strpos($endpoint, '/api/inf0sec') !== false) { if (strpos($endpoint, '/npd') !== false && $searchType === 'name') { $nameParts = explode(' ', $searchValue, 2); $url .= '?firstname=' . urlencode($nameParts[0] ?? ''); if (isset($nameParts[1])) { $url .= '&lastname=' . urlencode($nameParts[1]); } } elseif (strpos($endpoint, '/api/room101/search') !== false) { $url .= '?terms=' . urlencode($searchValue); } else { $url .= '?q=' . urlencode($searchValue); } } } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'X-API-Key: ' . $API_KEY, 'Content-Type: application/json' ]); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); if ($method === 'POST') { $body = buildRequestBody($endpoint, $searchType, $searchValue); if (!empty($body)) { curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body)); } } $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); $error = curl_error($ch); curl_close($ch); if ($error) { return ['error' => $error, 'http_code' => $httpCode]; } $decoded = json_decode($response, true); if (json_last_error() !== JSON_ERROR_NONE) { return ['raw_response' => $response, 'http_code' => $httpCode]; } // Store async search IDs in session if (isset($api['async']) && $api['async'] && isset($decoded['search_id'])) { $_SESSION['async_searches'][] = [ 'api' => $api['name'], 'search_id' => $decoded['search_id'], 'type' => 'dumpcat', 'timestamp' => time() ]; } elseif (isset($api['async']) && $api['async'] && isset($decoded['lookup_id'])) { $_SESSION['async_searches'][] = [ 'api' => $api['name'], 'lookup_id' => $decoded['lookup_id'], 'type' => 'dumpcat_reverse', 'timestamp' => time() ]; } return ['data' => $decoded, 'http_code' => $httpCode]; } // Handle AJAX requests if (isset($_POST['action'])) { header('Content-Type: application/json'); if ($_POST['action'] === 'search') { $searchType = $_POST['type'] ?? ''; $searchValue = $_POST['value'] ?? ''; if (empty($searchType) || empty($searchValue)) { echo json_encode(['error' => 'Missing search type or value']); exit; } $results = []; $endpoints = $API_ENDPOINTS[$searchType] ?? []; // Sort by priority usort($endpoints, function($a, $b) { return ($a['priority'] ?? 99) - ($b['priority'] ?? 99); }); foreach ($endpoints as $api) { $result = makeAPICall($api, $searchType, $searchValue); $results[] = [ 'name' => $api['name'], 'result' => $result, 'async' => $api['async'] ?? false, 'priority' => $api['priority'] ?? 99 ]; } echo json_encode(['results' => $results]); exit; } if ($_POST['action'] === 'check_async') { $asyncResults = []; if (isset($_SESSION['async_searches'])) { foreach ($_SESSION['async_searches'] as $key => $async) { // Check if search is older than 10 seconds if (time() - $async['timestamp'] > 10) { if ($async['type'] === 'dumpcat') { // Get Dump.cat results $url = $BASE_URL . '/api/dumpcat/search/results'; $body = json_encode([ 'search_id' => $async['search_id'], 'limit' => 100, 'offset' => 0 ]); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $body); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'X-API-Key: ' . $API_KEY, 'Content-Type: application/json' ]); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); $data = json_decode($response, true); if ($data && $httpCode === 200) { $asyncResults[] = [ 'api' => $async['api'], 'data' => $data ]; unset($_SESSION['async_searches'][$key]); } } elseif ($async['type'] === 'dumpcat_reverse') { // Get Dump.cat reverse results $url = $BASE_URL . '/api/dumpcat/reverse/results/' . $async['lookup_id'] . '?limit=100'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'X-API-Key: ' . $API_KEY ]); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); $data = json_decode($response, true); if ($data && $httpCode === 200) { $asyncResults[] = [ 'api' => $async['api'], 'data' => $data ]; unset($_SESSION['async_searches'][$key]); } } } } $_SESSION['async_searches'] = array_values($_SESSION['async_searches']); } echo json_encode(['results' => $asyncResults]); exit; } } ?>
Professional Multi-Source Intelligence Aggregation