Skip to content

Py3Deb is a GUI tool to convert Python scripts into .deb installer packages for Linux. Integrated PyInstaller for bundling scripts and added automatic dependency detection to simplify software deployment for developers.

Notifications You must be signed in to change notification settings

Mr-pentest/Py2Deb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Py2Deb

πŸš€ Py2Deb - Python to .deb Package Builder

Py2Deb is a powerful and user-friendly GUI tool built with Python and Tkinter that allows developers to convert their Python scripts into .deb packages effortlessly. Whether you're building utilities for distribution or testing deployment pipelines, Py2Deb simplifies the packaging process into a few intuitive clicks.


✨ Features

  • πŸ“‚ Select any .py or .sh script and package it as a .deb
  • πŸ–Ό Optional icon file embedding
  • πŸ›  Easy configuration of control fields (Package Name, Version, Maintainer, etc.)
  • βš™οΈ Autostart and Run-on-Install options (coming soon)
  • 🧹 Cleanup build files after packaging
  • πŸ“„ Live build output with error/success highlighting
  • 🎨 Modern and responsive Tkinter GUI

πŸ“¦ What is a .deb Package?

A .deb file is a Debian software package used by distributions such as Ubuntu, Kali Linux, and others. Py2Deb automatically creates the Debian package structure, control files, and post-install scripts if necessary.



πŸ”§ Requirements

  • Python 3.6+
  • Linux-based OS (Debian/Ubuntu/Kali/etc.)
  • dpkg, fakeroot, chmod, cp, and desktop-file-validate (usually pre-installed on most distros)

Install dependencies:

sudo apt update
sudo apt install python3-tk fakeroot dpkg-dev


## πŸš€ How to Use
Clone the repo:

git clone https://github.com/yourusername/py2deb.git
cd py2deb
Run the GUI:


python3 py2deb_gui.py
Steps inside the GUI:

Click on πŸ“‚ Select Python File and choose your .py script.

(Optional) Click on πŸ–Ό Select Icon File (.png, .svg, etc.).

Fill in fields like package name, version, etc.

Click πŸ›  Build .deb Package

Done! Your .deb file will be generated and saved in the dist/ folder.

##πŸ“ Output Structure
After building, the structure looks like:


###mypackage_1.0_amd64.deb
dist/
└── mypackage/
    β”œβ”€β”€ DEBIAN/
    β”‚   β”œβ”€β”€ control
    β”‚   β”œβ”€β”€ postinst
    β”œβ”€β”€ usr/
    β”‚   β”œβ”€β”€ bin/
    β”‚   └── share/applications/
    └── opt/

πŸ§ͺ Example Use Cases
βœ… Deploying internal Python automation tools

βœ… Sharing command-line or GUI utilities without exposing source code

βœ… Creating .deb packages for private/internal Linux deployments

βœ… Running custom post-install scripts (e.g., service setup, environment config)

βœ… Simulating .deb-based attack vectors in a safe lab

βœ… Studying Linux .deb trust exploitation techniques for defense

βœ… Red Team operations in isolated environments to test EDR/AV response

βœ… Teaching cybersecurity students how attackers might abuse package trust

⚠️ Ethical Notice
This tool is intended only for educational, research, and authorized security testing in isolated lab environments. Do not use it on unauthorized systems or for malicious purposes. Misuse may violate laws and ethical standards. Always operate under proper legal permission.


πŸ§‘β€πŸ’» Author
Varun
Ethical Hacker & Cybersecurity Researcher
LinkedIn - www.linkedin.com/in/cyber-muntashir

About

Py3Deb is a GUI tool to convert Python scripts into .deb installer packages for Linux. Integrated PyInstaller for bundling scripts and added automatic dependency detection to simplify software deployment for developers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages