Skip to content

feat: Refactor toolchain into a unified Python package infrastructure#72

Open
MohammadRaziei wants to merge 3 commits into
V4bel:masterfrom
MohammadRaziei:master
Open

feat: Refactor toolchain into a unified Python package infrastructure#72
MohammadRaziei wants to merge 3 commits into
V4bel:masterfrom
MohammadRaziei:master

Conversation

@MohammadRaziei

Copy link
Copy Markdown

Hi @V4bel,

This Pull Request introduces a major structural refactoring to the repository. Instead of relying on manual gcc compilation and individual script execution, I have rewritten the management layer and wrapped the framework into a proper, modern Python package infrastructure.

🚀 What's New & Changed:

  • Package Integration: Converted the architecture into a standardized Python module equipped with a clean CLI interface.

  • Streamlined Workflow: Users no longer need to manage dependencies manually. The entire sequence is now orchestrated via two straightforward system-wide commands:

  • dirtyfrag run: To handle core binary orchestration and pass-through parameters.

  • dirtyfrag reset: To cleanly evict polluted kernel memory and dropped pages without standard shell lockups.

  • Modernized Deployment: Added standard setup configuration supporting PEP 517 compliance to prevent future pip deprecation warnings.

  • Documentation Update: Updated the README.md to reflect this new operational workflow while keeping all your original research details, credits, and findings completely intact.

Note: After merging, please make sure to replace MohammadRaziei with your own GitHub username in the README.md installation block so it references your repository downstream.

Let me know if you have any feedback or if you'd like any adjustments!

Add a new setuptools configuration script that defines custom install and develop commands. These commands compile the C exploit (exp.c) into a binary placed in the package's `bin` directory and copy auxiliary scripts during installation. The script also sets up package metadata, entry points, and includes the compiled binary as package data, enabling proper pip installation and distribution of the native exploit.
- Dropped the `execute_copyfail` function and related CLI option, focusing the tool on the primary dirtyfrag exploit.
- Simplified the `run` subcommand to no longer require a method choice, always invoking the dirtyfrag execution path.
- Added an `if __name__ == "__main__":` guard to ensure proper script entry point behavior.
- Introduced a minimal `pyproject.toml` declaring the build system requirements for setuptools.
- Rename the “One-line special” section to “Installation and Execution”.
- Replace low‑level compile instructions with a pip‑based installation command and a simple `dirtyfrag run` usage example.
- Update cleanup guidance to use the new `dirtyfrag reset` command.
- Refine mitigation instructions formatting.
- Improves documentation clarity and provides a straightforward setup workflow for users.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant