A Python script to automatically search and download DLL files
Project description
DLL-Downloader
Search, download, and optionally scan DLL files with VirusTotal
Overview
DLL-Downloader is a Python tool that searches and downloads DLL files from trusted sources and can optionally scan them using VirusTotal. It works as both a CLI tool and a Python library.
Key Features
| Feature | Description |
|---|---|
| Search & Download | Resolve DLL names and download the correct file |
| ZIP Extraction | Optionally extract the DLL when the source returns a ZIP |
| Architecture Support | x86 and x64 downloads |
| VirusTotal Scan | Optional security scan before saving |
| Batch Mode | Download many DLLs from a file |
| Library Mode | Use the downloader directly from Python |
| Clean Architecture | Domain/use-case/infrastructure separation |
Installation
From PyPI (Recommended)
pip install dll-downloader
From Source
git clone https://github.com/seifreed/DLL-Downloader.git
cd DLL-Downloader
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -e .
Configuration
You can configure settings using .config.json, environment variables, or ~/.vt.toml.
JSON config (.config.json)
{
"virustotal_api_key": "your_virustotal_api_key_here",
"download_directory": "./downloads",
"download_base_url": "https://es.dll-files.com",
"http_timeout": 60,
"verify_ssl": true,
"scan_before_save": true,
"malicious_threshold": 5,
"suspicious_threshold": 1,
"log_level": "INFO",
"user_agent": null
}
VirusTotal key via ~/.vt.toml
apikey="your_virustotal_api_key_here"
Environment variables
export DLL_VIRUSTOTAL_API_KEY="your_virustotal_api_key_here"
export DLL_DOWNLOAD_DIRECTORY="./downloads"
Quick Start
# Download a single DLL
python3 dll-downloader.py msvcp140.dll
# Download x86
python3 dll-downloader.py msvcp140.dll --arch x86
# Download and extract when the source returns a ZIP
python3 dll-downloader.py msvcp140.dll --extract
# Download from a list
python3 dll-downloader.py --file dll_list.txt
# Emit machine-readable JSON
python3 dll-downloader.py msvcp140.dll --json
# Emit SARIF for CI/security pipelines
python3 dll-downloader.py msvcp140.dll --sarif
Usage
Command Line Interface
python3 dll-downloader.py <dll_name> [options]
Available Options
| Option | Description |
|---|---|
--file |
File with one DLL name per line |
--arch |
Target architecture (x86 or x64) |
--debug |
Enable debug output |
--no-scan |
Skip VirusTotal scan |
--force |
Force download even if cached |
--output-dir |
Custom output directory |
--extract |
Extract the DLL when the download is a ZIP archive |
--json |
Emit machine-readable JSON output |
--sarif |
Emit SARIF v2.1.0 output |
Some providers return the DLL inside a ZIP archive. By default, dll-downloader
expects the payload to be a real ZIP and validates that it contains a valid PE
DLL. Without --extract, the validated ZIP is saved as-is. With --extract,
the tool saves the unpacked .dll, which is useful in CI/CD workflows. If the
payload is not a valid ZIP or the embedded DLL is not a valid PE file, the
download fails with an explicit error.
The HTTP transport retries transient failures up to 5 times by default and
rotates across a pool of 5 legitimate User-Agent strings unless you provide
an explicit user_agent in configuration.
Retry policy settings:
http_max_retrieshttp_retry_backoff_secondshttp_retry_jitter_secondsuser_agentuser_agent_pool
For pipeline integration, --json emits one structured JSON document and
--sarif emits one SARIF v2.1.0 log. Both formats also serialize boundary
errors such as invalid CLI input or unreadable DLL list files.
Python Library
Basic Usage
from dll_downloader.api import (
Architecture,
DownloadDLLRequest,
)
from dll_downloader.runtime import (
load_settings,
create_dependencies,
)
settings = load_settings()
use_case, http_client, scanner = create_dependencies(settings)
try:
response = use_case.execute(DownloadDLLRequest(
dll_name="msvcp140.dll",
architecture=Architecture.X64,
scan_before_save=True,
force_download=False,
extract_archive=True,
))
print(response)
finally:
http_client.close()
if scanner:
scanner.close()
Requirements
- Python 3.13 or 3.14
- See
pyproject.tomlfor dependencies
Contributing
Contributions are welcome. Please open a PR with clear changes and tests if needed.
Support the Project
If you find DLL-Downloader useful, consider supporting its development:
License
See the LICENSE file for details.
Attribution Required:
- Author: Marc Rivero Lopez
- Repository: github.com/seifreed/DLL-Downloader
Built for secure, reliable DLL acquisition
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dll_downloader-1.0.2.tar.gz.
File metadata
- Download URL: dll_downloader-1.0.2.tar.gz
- Upload date:
- Size: 84.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2078d715f88e10dc0a600a81d62b9e1688e9162a56086d826d2262a225e4a9eb
|
|
| MD5 |
7ae8063c84d8800062240e37bfd1dac5
|
|
| BLAKE2b-256 |
63be5621c9258642d1e1f98d43fe11ac5c753fc0d8cd3c5f9b976c4b6621cb7d
|
Provenance
The following attestation bundles were made for dll_downloader-1.0.2.tar.gz:
Publisher:
publish.yml on seifreed/DLL-Downloader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dll_downloader-1.0.2.tar.gz -
Subject digest:
2078d715f88e10dc0a600a81d62b9e1688e9162a56086d826d2262a225e4a9eb - Sigstore transparency entry: 1076071904
- Sigstore integration time:
-
Permalink:
seifreed/DLL-Downloader@a415546aaea413f2015d9d9704be6f420686720d -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/seifreed
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a415546aaea413f2015d9d9704be6f420686720d -
Trigger Event:
push
-
Statement type:
File details
Details for the file dll_downloader-1.0.2-py3-none-any.whl.
File metadata
- Download URL: dll_downloader-1.0.2-py3-none-any.whl
- Upload date:
- Size: 56.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3420ae0966b8ad30aae3bc54d52ec069986851cea1477542819856f01bfaacc7
|
|
| MD5 |
8fe1cf896314668250c80abdaa28bb30
|
|
| BLAKE2b-256 |
cd654928d63a4a88b5bbdeac0814817bb2edd9e4cb69349777184123461cc54e
|
Provenance
The following attestation bundles were made for dll_downloader-1.0.2-py3-none-any.whl:
Publisher:
publish.yml on seifreed/DLL-Downloader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dll_downloader-1.0.2-py3-none-any.whl -
Subject digest:
3420ae0966b8ad30aae3bc54d52ec069986851cea1477542819856f01bfaacc7 - Sigstore transparency entry: 1076071912
- Sigstore integration time:
-
Permalink:
seifreed/DLL-Downloader@a415546aaea413f2015d9d9704be6f420686720d -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/seifreed
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a415546aaea413f2015d9d9704be6f420686720d -
Trigger Event:
push
-
Statement type: