Initial commit: Laravel OSINT platform
Multi-user OSINT investigation tool with owner-controlled per-user and per-group access grants. Includes Sherlock, theHarvester, crt.sh, WHOIS, and ip-api.com collectors wired through a pluggable Runner/queue pipeline, investigation search, and printable/CSV/JSON reporting. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Runs a domain WHOIS lookup and prints a JSON-serializable summary to stdout.
|
||||
|
||||
Used by App\\Osint\\Runners\\WhoisRunner. Takes exactly one argument: the domain.
|
||||
"""
|
||||
import datetime
|
||||
import json
|
||||
import sys
|
||||
|
||||
import whois
|
||||
|
||||
|
||||
def to_jsonable(value):
|
||||
if isinstance(value, (list, tuple)):
|
||||
return [to_jsonable(v) for v in value]
|
||||
if isinstance(value, (datetime.datetime, datetime.date)):
|
||||
return value.isoformat()
|
||||
if isinstance(value, (str, int, float, bool)) or value is None:
|
||||
return value
|
||||
return str(value)
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) != 2:
|
||||
print(json.dumps({"error": "usage: whois_lookup.py <domain>"}), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
domain = sys.argv[1]
|
||||
|
||||
try:
|
||||
record = whois.whois(domain)
|
||||
except Exception as exc:
|
||||
print(json.dumps({"error": str(exc)}), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
data = {key: to_jsonable(value) for key, value in dict(record).items()}
|
||||
print(json.dumps(data))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user