"""Base exploiter class for provider-specific implementations."""
from abc import ABC, abstractmethod
from typing import Dict

from reclaimor.config import Config


class BaseExploiter(ABC):
    """Base class for provider-specific exploiters."""
    
    def __init__(self, config: Config):
        self.config = config
    
    @abstractmethod
    async def exploit(self, domain: str, dns_info: Dict, http_info: Dict) -> Dict:
        """
        Attempt to exploit the subdomain takeover.
        
        Returns:
            Dict with success, method, proof, cleanup, error
        """
        pass
    
    def _generate_verification_token(self, domain: str) -> str:
        """Generate a unique verification token."""
        import hashlib
        import time
        return hashlib.sha256(f"{domain}-{time.time()}".encode()).hexdigest()[:16]
