Site%3apastebin.com+key+investment+services 2021 -

# Simulated response: list of pastes that match mock_pastes = [ "title": "investment_api_keys.txt", "content_snippet": "KEY_INVESTMENT_API_KEY = 'sk_live_4eC39HqLyjWDarjtT1zdp7dc'", "date": datetime.now() - timedelta(days=10), "url": "https://pastebin.com/abc123" , "title": "config_backup", "content_snippet": "DB_PASSWORD=KeyInv@2024", "date": datetime.now() - timedelta(days=45), "url": "https://pastebin.com/xyz789" ]

findings = {} for label, regex in patterns.items(): matches = re.findall(regex, text, re.IGNORECASE) if matches: findings[label] = matches return findings def generate_feature(company_name="Key Investment Services"): pastes = fetch_pastebin_mentions(company_name) site%3apastebin.com+key+investment+services

return mock_pastes def extract_sensitive_patterns(text): patterns = "api_key": r'[A-Za-z0-9_]32,', "private_key": r'-----BEGIN (RSA # Simulated response: list of pastes that match

exposures = [] for paste in pastes: sensitive = extract_sensitive_patterns(paste["content_snippet"]) if sensitive: exposures.append( "paste_url": paste["url"], "date": paste["date"], "exposed_items": sensitive ) "date": datetime.now() - timedelta(days=10)