Files
rengine/shared/models/__init__.py
T
Yogesh Ojha 42a9aa8d96 feat(scans): expansion phase — cdn check, port scan, http probe
The host:port -> live HTTP asset convergence. After discovery, a scan now
runs expansion:

- port_scan: naabu (cdn-gated, well-known service names) -> Port
- cdn_check: cdncheck flags CDN/WAF/cloud IPs (ip family)
- http_probe: httpx probes the host:port matrix; one pass enriches each
  service with status/title/tech/server/TLS/cdn/jarm/favicon/hash ->
  HttpAsset, with asn backfilled from the resolved IP

httpx -tls-grab carries cert data inline (no separate tlsx pass); nmap is
dropped — naabu for ports, httpx for HTTP service id.

Also: every engine moved to its own folder; net_options() threads
proxy/headers/user-agent into every tool; rengine-tools no longer installs
top-level modules that shadowed libs (httpx); tool binaries resolve from the
go bin ahead of venv console scripts. New Port + HttpAsset models + migration
and the http_assets headline rollup.
2026-06-26 16:17:52 +05:30

246 lines
5.4 KiB
Python

import shared.models._tztypes # patch datetime->timestamptz first
from shared.models.activity_log import ActivityLog, ActivityLogRead
from shared.models.api_key import (
APIKey,
APIKeyCreate,
APIKeyRead,
APIKeyUpdate,
ProviderInfo,
)
from shared.models.dns import (
DnsLookup,
DnsLookupRead,
DnsLookupSummary,
DnsRecord,
DnsRecordRead,
)
from shared.models.http_asset import (
HttpAsset,
HttpAssetRead,
HttpAssetSummary,
)
from shared.models.instance_settings import (
InstanceSettings,
InstanceSettingsRead,
InstanceSettingsUpdate,
)
from shared.models.ip_address import (
IpAddress,
IpAddressRead,
IpAddressSummary,
TargetIpAddressRead,
)
from shared.models.notification import (
Notification,
NotificationCreate,
NotificationRead,
)
from shared.models.notification_channel import (
NotificationChannel,
NotificationChannelCreate,
NotificationChannelRead,
NotificationChannelTestResult,
NotificationChannelUpdate,
NotificationPreference,
)
from shared.models.organization import (
Organization,
OrganizationCreate,
OrganizationRead,
OrganizationSummary,
OrganizationUpdate,
)
from shared.models.port import Port, PortRead, PortSummary
from shared.models.project import Project, ProjectBase, ProjectCreate, ProjectRead
from shared.models.proxy import (
Proxy,
ProxyCreate,
ProxyEndpoint,
ProxyEndpointRead,
ProxyRead,
ProxyTestResult,
ProxyUpdate,
)
from shared.models.ripestat import (
RIPEStatAbuseContact,
RIPEStatAnnouncedPrefix,
RIPEStatASNNeighbour,
RIPEStatASOverview,
RIPEStatNetworkInfo,
RIPEStatPrefixOverview,
RIPEStatRelatedPrefix,
)
from shared.models.scan import (
Scan,
ScanCreate,
ScanRead,
)
from shared.models.scan_activity import ScanActivity, ScanActivityRead
from shared.models.scan_command import (
ScanCommand,
ScanCommandDetail,
ScanCommandRead,
)
from shared.models.scan_context import (
AuthConfig,
AuthHeader,
ScanContext,
ScanContextCreate,
ScanContextRead,
ScanContextUpdate,
)
from shared.models.scan_engine import (
DepthConfig,
DiscoveryConfig,
ExpansionConfig,
ScanEngine,
ScanEngineCreate,
ScanEngineRead,
ScanEngineUpdate,
)
from shared.models.scan_schedule import (
ScanSchedule,
ScanScheduleCreate,
ScanScheduleRead,
ScanScheduleUpdate,
ScheduleTargetRef,
)
from shared.models.subdomain import (
Subdomain,
SubdomainRead,
SubdomainSummary,
TargetSubdomainRead,
)
from shared.models.tag import Tag, TagBase, TagCreate, TagRead, TagSummary, TagUpdate
from shared.models.target import (
Target,
TargetBulkCreate,
TargetBulkCreateResponse,
TargetCreate,
TargetImportItem,
TargetImportRequest,
TargetImportResult,
TargetRead,
TargetType,
TargetUpdate,
TargetValidationRequest,
TargetValidationResponse,
)
from shared.models.user import User, UserBase, UserCreate, UserRead
from shared.models.viewdns import ViewDNSCache
TargetRead.model_rebuild()
__all__ = [
"APIKey",
"APIKeyCreate",
"APIKeyRead",
"APIKeyUpdate",
"ActivityLog",
"ActivityLogRead",
"AuthConfig",
"AuthHeader",
"DepthConfig",
"DiscoveryConfig",
"DnsLookup",
"DnsLookupRead",
"DnsLookupSummary",
"DnsRecord",
"DnsRecordRead",
"ExpansionConfig",
"HttpAsset",
"HttpAssetRead",
"HttpAssetSummary",
"InstanceSettings",
"InstanceSettingsRead",
"InstanceSettingsUpdate",
"IpAddress",
"IpAddressRead",
"IpAddressSummary",
"Notification",
"NotificationChannel",
"NotificationChannelCreate",
"NotificationChannelRead",
"NotificationChannelTestResult",
"NotificationChannelUpdate",
"NotificationCreate",
"NotificationPreference",
"NotificationRead",
"Organization",
"OrganizationCreate",
"OrganizationRead",
"OrganizationSummary",
"OrganizationUpdate",
"Port",
"PortRead",
"PortSummary",
"Project",
"ProjectBase",
"ProjectCreate",
"ProjectRead",
"ProviderInfo",
"Proxy",
"ProxyCreate",
"ProxyEndpoint",
"ProxyEndpointRead",
"ProxyRead",
"ProxyTestResult",
"ProxyUpdate",
"RIPEStatASNNeighbour",
"RIPEStatASOverview",
"RIPEStatAbuseContact",
"RIPEStatAnnouncedPrefix",
"RIPEStatNetworkInfo",
"RIPEStatPrefixOverview",
"RIPEStatRelatedPrefix",
"Scan",
"ScanActivity",
"ScanActivityRead",
"ScanCommand",
"ScanCommandDetail",
"ScanCommandRead",
"ScanContext",
"ScanContextCreate",
"ScanContextRead",
"ScanContextUpdate",
"ScanCreate",
"ScanEngine",
"ScanEngineCreate",
"ScanEngineRead",
"ScanEngineUpdate",
"ScanRead",
"ScanSchedule",
"ScanScheduleCreate",
"ScanScheduleRead",
"ScanScheduleUpdate",
"ScheduleTargetRef",
"Subdomain",
"SubdomainRead",
"SubdomainSummary",
"Tag",
"TagBase",
"TagCreate",
"TagRead",
"TagSummary",
"TagUpdate",
"Target",
"TargetBulkCreate",
"TargetBulkCreateResponse",
"TargetCreate",
"TargetImportItem",
"TargetImportRequest",
"TargetImportResult",
"TargetIpAddressRead",
"TargetRead",
"TargetSubdomainRead",
"TargetType",
"TargetUpdate",
"TargetValidationRequest",
"TargetValidationResponse",
"User",
"UserBase",
"UserCreate",
"UserRead",
"ViewDNSCache",
]