"""
AIPTX Beast Mode - Exploitation Engine
=======================================

LLM-powered multi-step exploitation with adaptive payload mutation.

Components:
- chain_builder: Plan multi-step attack chains (SQLi→RCE, SSRF→Exfil)
- chain_executor: Execute planned chains with fallback
- chain_templates: Pre-defined attack chain patterns
- payload_engine: WAF-aware payload mutation
- waf_detector: WAF fingerprinting and bypass selection
- encoders: Encoding/obfuscation techniques
"""

from __future__ import annotations

from aipt_v2.exploitation.chain_builder import (
    ExploitChainBuilder,
    ChainStep,
    AttackChain,
)
from aipt_v2.exploitation.chain_executor import ChainExecutor
from aipt_v2.exploitation.chain_templates import (
    CHAIN_TEMPLATES,
    get_chain_template,
    ChainTemplate,
)
from aipt_v2.exploitation.payload_engine import PayloadEngine
from aipt_v2.exploitation.encoders import (
    Encoder,
    url_encode,
    base64_encode,
    hex_encode,
    unicode_encode,
    double_url_encode,
    chain_encode,
)
from aipt_v2.exploitation.waf_detector import WAFDetector
from aipt_v2.exploitation.mutations import (
    SQLiMutator,
    XSSMutator,
    CMDMutator,
)

# AD Credential Attacks
from aipt_v2.exploitation.ad_credentials import (
    ADCredentialAttacks,
    ADCredentialConfig,
    ADCredentialResult,
    ExtractedCredential,
    CredentialType,
    ExtractionMethod,
    RelayTarget,
    dcsync,
    dump_lsass_remote,
)

# AD Delegation Attacks
from aipt_v2.exploitation.ad_delegation import (
    ADDelegationAttacks,
    ADDelegationConfig,
    ADDelegationResult,
    DelegationTarget,
    DelegationType,
    KerberosTicket,
    TicketType,
    enumerate_delegation,
    s4u_attack,
)

# AD Certificate Services Exploitation
from aipt_v2.exploitation.ad_adcs import (
    ADCSExploitation,
    ADCSExploitConfig,
    ADCSExploitResult,
    IssuedCertificate,
    CertificateFormat,
    exploit_esc1,
    add_shadow_credential,
)

# AD Attack Chain Templates
from aipt_v2.exploitation.ad_chain_templates import (
    ADAttackChain,
    ADChainCategory,
    ADChainDifficulty,
    ADChainStep,
    AD_ATTACK_CHAINS,
    KERBEROAST_CHAIN,
    ASREPROAST_CHAIN,
    RBCD_CHAIN,
    UNCONSTRAINED_DELEGATION_CHAIN,
    PASSWORD_SPRAY_CHAIN,
    SHADOW_CREDENTIALS_CHAIN,
    GOLDEN_TICKET_CHAIN,
    get_ad_chain,
    get_chains_by_category,
    get_chains_by_difficulty,
    list_all_chains,
)

__all__ = [
    # Chain Builder
    "ExploitChainBuilder",
    "ChainStep",
    "AttackChain",
    # Chain Executor
    "ChainExecutor",
    # Templates
    "CHAIN_TEMPLATES",
    "get_chain_template",
    "ChainTemplate",
    # Payload Engine
    "PayloadEngine",
    # Encoders
    "Encoder",
    "url_encode",
    "base64_encode",
    "hex_encode",
    "unicode_encode",
    "double_url_encode",
    "chain_encode",
    # WAF Detection
    "WAFDetector",
    # Mutations
    "SQLiMutator",
    "XSSMutator",
    "CMDMutator",
    # AD Credential Attacks
    "ADCredentialAttacks",
    "ADCredentialConfig",
    "ADCredentialResult",
    "ExtractedCredential",
    "CredentialType",
    "ExtractionMethod",
    "RelayTarget",
    "dcsync",
    "dump_lsass_remote",
    # AD Delegation Attacks
    "ADDelegationAttacks",
    "ADDelegationConfig",
    "ADDelegationResult",
    "DelegationTarget",
    "DelegationType",
    "KerberosTicket",
    "TicketType",
    "enumerate_delegation",
    "s4u_attack",
    # AD Certificate Services Exploitation
    "ADCSExploitation",
    "ADCSExploitConfig",
    "ADCSExploitResult",
    "IssuedCertificate",
    "CertificateFormat",
    "exploit_esc1",
    "add_shadow_credential",
    # AD Attack Chain Templates
    "ADAttackChain",
    "ADChainCategory",
    "ADChainDifficulty",
    "ADChainStep",
    "AD_ATTACK_CHAINS",
    "KERBEROAST_CHAIN",
    "ASREPROAST_CHAIN",
    "RBCD_CHAIN",
    "UNCONSTRAINED_DELEGATION_CHAIN",
    "PASSWORD_SPRAY_CHAIN",
    "SHADOW_CREDENTIALS_CHAIN",
    "GOLDEN_TICKET_CHAIN",
    "get_ad_chain",
    "get_chains_by_category",
    "get_chains_by_difficulty",
    "list_all_chains",
]
