Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ jobs:
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Compile package
run: python -m compileall -q adpentest
- name: Compile package and one-file build
run: python -m compileall -q adpentest adpentest_onefile.py tools tests

- name: Run safe dry-run
run: python -m adpentest --target localhost --mode dry-run --scope-confirmed
- name: Verify one-file build is current
run: python tools/build_onefile.py --check

- name: Run offline regression tests
run: python -m unittest discover -s tests -p "test_*.py" -v
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- [Quick Start](#quick-start)
- [Features](#features)
- [Installation](#installation)
- [Standalone One-File Usage](#standalone-one-file-usage)
- [Usage](#usage)
- [CVE Scanners](#cve-scanners)
- [WAF Detection & Bypass](#waf-detection--bypass)
Expand Down Expand Up @@ -47,6 +48,9 @@ adpentest --history

# View all vulnerable CVE findings
adpentest --cve-report

# Run from the standalone one-file build
python adpentest_onefile.py --help
```

## Features
Expand Down Expand Up @@ -94,6 +98,30 @@ cd AdPentestAI-Python
pip install -e .
```

## Standalone One-File Usage

The repository includes `adpentest_onefile.py`, a generated standalone Python file that contains the project-owned `adpentest` package code, the extended CVE catalogs, and the de-novo finding backend. You can copy this one file to another machine and run it directly after installing the normal Python runtime dependencies.

```bash
python -m pip install "httpx>=0.27,<1" "dnspython>=2.4,<3" "ldap3>=2.9,<3"
python adpentest_onefile.py --help
python adpentest_onefile.py --history
python adpentest_onefile.py --target corp.local --mode active --scope-confirmed --active-search careful --passive-cve-limit 10000
python adpentest_onefile.py --target corp.local --mode active --scope-confirmed --active-search careful --passive-cve-corpus ./nvd/nvdcve-2.0.json
```

Regenerate the file from the package sources whenever the package changes:

```bash
python tools/build_onefile.py
python tools/build_onefile.py --check
python -m unittest discover -s tests -p "test_*.py" -v
```

External command-line tools such as `nmap`, `masscan`, `certipy`, `smbmap`, and Impacket remain optional runtime tools for scan modes that call them. The one-file build keeps the Python code portable and now falls back to a Python implementation for de-novo findings when the native `de_novo_finder` binary is not present.

The default active profile is careful: it probes the resolved target addresses, runs read-only CVE/service checks, and correlates possible CVEs passively from observed service evidence. It does not sweep derived `/24` networks unless `--scan-derived-networks` is supplied together with `--active-search full`. Passive CVE correlation loads up to 10,000 CVE records from built-in catalogs plus an optional local NVD-style JSON/JSONL corpus and reports them as `possible` until product version and patch state are confirmed.

### Dependencies

| Package | Version | Purpose |
Expand Down
24 changes: 23 additions & 1 deletion adpentest/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
__version__ = "1.1.3"
__version__ = "1.1.5"

from .cve_catalog_100 import EXTENDED_CVES, EXTENDED_CVE_IDS, get_extended_cves, merge_with_registry
from .cve_catalog_de_novo_40 import DE_NOVO_CVES_40, DE_NOVO_CVE_IDS_40, get_de_novo_cves_40


def main() -> int:
"""Lazy console-script entry point."""
from .core import main as _main

return _main()


__all__ = [
"main",
"EXTENDED_CVES",
"EXTENDED_CVE_IDS",
"get_extended_cves",
"merge_with_registry",
"DE_NOVO_CVES_40",
"DE_NOVO_CVE_IDS_40",
"get_de_novo_cves_40",
]
Loading
Loading