Wire all 25 services into --randomize-services and add heterogeneous OS fingerprints
- Replace hardcoded ALL_SERVICE_NAMES=[5 services] in cli.py with
_all_service_names() pulling dynamically from the plugin registry;
randomize-services now draws from all 25 registered honeypots
- Add build_base field to DistroProfile: apt-compatible image for service
Dockerfiles (ubuntu22/ubuntu20/kali get their own; others fall back to
debian:bookworm-slim since Dockerfiles use apt-get)
- Add build_base to DeckyConfig; propagate from distro in _build_deckies
and _build_deckies_from_ini
- Inject BASE_IMAGE build arg in composer.py for every build-based service
so each decky's containers reflect its assigned distro
- Update all 21 service Dockerfiles: FROM debian:bookworm-slim →
ARG BASE_IMAGE=debian:bookworm-slim / FROM ${BASE_IMAGE}
- Add tests/test_cli_service_pool.py and tests/test_composer.py (306 total)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,9 +12,10 @@ from dataclasses import dataclass
|
||||
@dataclass(frozen=True)
|
||||
class DistroProfile:
|
||||
slug: str # CLI-facing identifier, e.g. "debian", "rocky9"
|
||||
image: str # Docker image tag
|
||||
image: str # Docker image tag (used for the base/IP-holder container)
|
||||
display_name: str # Human-readable label shown in tables
|
||||
hostname_style: str # "generic" | "rhel" | "minimal" | "rolling"
|
||||
build_base: str # apt-compatible image for service Dockerfiles (FROM ${BASE_IMAGE})
|
||||
|
||||
|
||||
DISTROS: dict[str, DistroProfile] = {
|
||||
@@ -23,54 +24,63 @@ DISTROS: dict[str, DistroProfile] = {
|
||||
image="debian:bookworm-slim",
|
||||
display_name="Debian 12 (Bookworm)",
|
||||
hostname_style="generic",
|
||||
build_base="debian:bookworm-slim",
|
||||
),
|
||||
"ubuntu22": DistroProfile(
|
||||
slug="ubuntu22",
|
||||
image="ubuntu:22.04",
|
||||
display_name="Ubuntu 22.04 LTS (Jammy)",
|
||||
hostname_style="generic",
|
||||
build_base="ubuntu:22.04",
|
||||
),
|
||||
"ubuntu20": DistroProfile(
|
||||
slug="ubuntu20",
|
||||
image="ubuntu:20.04",
|
||||
display_name="Ubuntu 20.04 LTS (Focal)",
|
||||
hostname_style="generic",
|
||||
build_base="ubuntu:20.04",
|
||||
),
|
||||
"rocky9": DistroProfile(
|
||||
slug="rocky9",
|
||||
image="rockylinux:9-minimal",
|
||||
display_name="Rocky Linux 9",
|
||||
hostname_style="rhel",
|
||||
build_base="debian:bookworm-slim", # Dockerfiles use apt-get; fall back to debian
|
||||
),
|
||||
"centos7": DistroProfile(
|
||||
slug="centos7",
|
||||
image="centos:7",
|
||||
display_name="CentOS 7",
|
||||
hostname_style="rhel",
|
||||
build_base="debian:bookworm-slim", # Dockerfiles use apt-get; fall back to debian
|
||||
),
|
||||
"alpine": DistroProfile(
|
||||
slug="alpine",
|
||||
image="alpine:3.19",
|
||||
display_name="Alpine Linux 3.19",
|
||||
hostname_style="minimal",
|
||||
build_base="debian:bookworm-slim", # Dockerfiles use apt-get; fall back to debian
|
||||
),
|
||||
"fedora": DistroProfile(
|
||||
slug="fedora",
|
||||
image="fedora:39",
|
||||
display_name="Fedora 39",
|
||||
hostname_style="rhel",
|
||||
build_base="debian:bookworm-slim", # Dockerfiles use apt-get; fall back to debian
|
||||
),
|
||||
"kali": DistroProfile(
|
||||
slug="kali",
|
||||
image="kalilinux/kali-rolling",
|
||||
display_name="Kali Linux (Rolling)",
|
||||
hostname_style="rolling",
|
||||
build_base="kalilinux/kali-rolling", # Debian-based, apt-get compatible
|
||||
),
|
||||
"arch": DistroProfile(
|
||||
slug="arch",
|
||||
image="archlinux:latest",
|
||||
display_name="Arch Linux",
|
||||
hostname_style="rolling",
|
||||
build_base="debian:bookworm-slim", # Dockerfiles use apt-get; fall back to debian
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user