Skip to content

Commit 7815829

Browse files
committed
Add __version__ constant and --version CLI flag
Single source of truth for the release version, also reachable via "python3 malicious-pdf.py --version". Lets users running from a clone identify which release they have.
1 parent 4c316e5 commit 7815829

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.0.1] - 2026-04-20
11+
1012
### Added
13+
- `__version__` constant in `malicious-pdf.py` and a `--version` CLI flag
14+
so users running from a clone can identify the release they have.
1115
- `CONTRIBUTING.md` describing the contribution workflow and testing policy.
1216
- `CHANGELOG.md` (this file).
1317
- CI smoke-test workflow that runs the generator and asserts the expected
1418
number of PDF files is produced on every push and pull request.
1519

20+
### Changed
21+
- `CLAUDE.md` documents the release process and the smoke-test count that
22+
must be bumped when generators are added or removed.
23+
1624
## [1.0.0] - 2026-04-20
1725

1826
First tagged release. Captures the state of the project at the time the
@@ -32,5 +40,6 @@ changelog was introduced.
3240
- Dependabot configuration.
3341
- `SECURITY.md` with PGP-encrypted private vulnerability reporting.
3442

35-
[Unreleased]: https://github.com/jonaslejon/malicious-pdf/compare/v1.0.0...HEAD
43+
[Unreleased]: https://github.com/jonaslejon/malicious-pdf/compare/v1.0.1...HEAD
44+
[1.0.1]: https://github.com/jonaslejon/malicious-pdf/compare/v1.0.0...v1.0.1
3645
[1.0.0]: https://github.com/jonaslejon/malicious-pdf/releases/tag/v1.0.0

malicious-pdf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
import argparse
2626
from pathlib import Path
2727

28+
__version__ = "1.0.1"
29+
2830
KNOWN_SCHEMES = ('http://', 'https://', 'ftp://', 'ftps://', 'file://', 'smb://',
2931
'ssh://', 'telnet://', 'gopher://', 'ldap://', 'mailto:', 'news:',
3032
'nntp://', 'irc://', 'data:', 'javascript:')
@@ -4247,6 +4249,7 @@ def main():
42474249
"widget-based XSS, content extraction, XXE, CSP bypass, and more. "
42484250
"Use with Burp Collaborator or Interact.sh to detect callbacks."
42494251
)
4252+
parser.add_argument("--version", action="version", version=f"%(prog)s {__version__}")
42504253
parser.add_argument("host", help="Callback URL or IP address (e.g. https://burp-collaborator-url)")
42514254
parser.add_argument("--output-dir", default="output", help="Directory to save generated PDF files (default: output/)")
42524255
parser.add_argument("--no-credit", action="store_true", help="Do not embed credit/attribution metadata in generated PDFs")

0 commit comments

Comments
 (0)