Installation
pip install censysUsage
Usage Examples
# Search certificates
censys search certificates "example.com"
# Search hosts
censys search hosts "services.service_name: HTTP"
# View specific host
censys view hosts 8.8.8.8Usage Examples
from censys.search import CensysHosts
h = CensysHosts(api_id="YOUR_API_ID", api_secret="YOUR_API_SECRET")
# Search for hosts
for page in h.search("services.service_name: HTTP", per_page=100, pages=5):
for host in page:
print(f"{host['ip']} - {host.get('location', {}).get('country', 'Unknown')}")