Compare commits

..

No commits in common. "f6e768c246f23afab15956784a9b6e9932597a3a" and "df11e32e70ca3abebccf948a89f7868e33d5d3c8" have entirely different histories.

2 changed files with 2 additions and 57 deletions

View file

@ -280,57 +280,9 @@ function isInteresting(array $row, string $pathPrefix): bool {
'mp3','wav','ogg','pdf','zip','tar','gz','xml','txt']; 'mp3','wav','ogg','pdf','zip','tar','gz','xml','txt'];
if (in_array($ext, $asset, true)) return false; if (in_array($ext, $asset, true)) return false;
// Empty UA — almost certainly automated // Skip obvious bots
$ua = strtolower((string)$row['ua']); $ua = strtolower((string)$row['ua']);
if ($ua === '') return false; foreach (['bot','crawl','spider','curl','wget','headless','scrapy','go-http','python-requests','okhttp'] as $needle) {
// Comprehensive bot / automated-tool filter
static $botSignals = [
// Generic signals — catches most search engines + named bots
'bot', 'crawl', 'spider', 'headless', 'scrapy', 'slurp',
// HTTP tools and libraries
'curl', 'wget',
'python-requests', 'python-urllib', 'python-httpx',
'go-http', 'okhttp',
'libwww-perl', 'lwp/',
'guzzlehttp', 'guzzle/',
'java/', 'apache-httpclient',
'node-fetch', 'undici/', 'got/', 'axios/',
'aiohttp/', 'httpx/',
'mechanize', 'faraday/', 'httpie', 'ruby',
// SEO / link-analysis platforms
'ahrefs', 'semrush', 'moz.com', 'sitechecker', 'similarweb',
'screaming frog', 'dataforseo', 'serpstat', 'seokicks', 'babbar',
'dotbot', 'duckduckgo-favicons',
// Uptime / monitoring services
'uptimerobot', 'pingdom', 'statuscake', 'site24x7', 'freshping',
'betteruptime', 'hetrixtools', 'nodeping', 'hyperping',
'updown.io', 'check_http', 'healthcheck',
// Security / vulnerability scanners
'nikto', 'nessus', 'masscan', 'zgrab', 'nuclei',
'sqlmap', 'whatweb', 'wfuzz', 'dirbuster', 'gobuster',
'feroxbuster', 'burp',
// Social link-preview fetchers (not caught by "bot")
'whatsapp', 'skypeuripreview', 'slack-imgproxy', 'vkshare',
// Archive / site copiers
'ia_archiver', 'httrack',
// APM / observability agents
'datadog', 'newrelic', 'dynatrace',
// AI crawlers not containing "bot"
'cohere-ai', 'anthropic-ai', 'meta-externalagent',
// Generic scanner vocabulary
'scanner', 'checker', 'prober', 'monitor',
];
foreach ($botSignals as $needle) {
if (str_contains($ua, $needle)) return false; if (str_contains($ua, $needle)) return false;
} }
return true; return true;

View file

@ -39,13 +39,6 @@ if ($method === 'GET') {
$safe = $config; $safe = $config;
if (isset($safe['linkedin']['access_token'])) $safe['linkedin']['access_token'] = $safe['linkedin']['access_token'] ? '***' : null; if (isset($safe['linkedin']['access_token'])) $safe['linkedin']['access_token'] = $safe['linkedin']['access_token'] ? '***' : null;
if (isset($safe['linkedin']['refresh_token'])) $safe['linkedin']['refresh_token'] = $safe['linkedin']['refresh_token'] ? '***' : null; if (isset($safe['linkedin']['refresh_token'])) $safe['linkedin']['refresh_token'] = $safe['linkedin']['refresh_token'] ? '***' : null;
// Discord snowflake IDs exceed JS Number.MAX_SAFE_INTEGER — send as strings
foreach (['twitch', 'rss'] as $section) {
foreach ($safe[$section] ?? [] as $key => $item) {
if (isset($item['channel_id'])) $safe[$section][$key]['channel_id'] = (string)$item['channel_id'];
if (isset($item['role_id']) && $item['role_id'] !== null) $safe[$section][$key]['role_id'] = (string)$item['role_id'];
}
}
echo json_encode(['config' => $safe]); echo json_encode(['config' => $safe]);
exit; exit;
} }