-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_deb.sh
More file actions
executable file
·52 lines (44 loc) · 1.46 KB
/
build_deb.sh
File metadata and controls
executable file
·52 lines (44 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
# Script to build a Debian package for EZMonitorMode
APP_NAME="ezmonitormode"
VERSION="1.0"
PKG_DIR="${APP_NAME}_${VERSION}_all"
echo "Building Debian package $PKG_DIR..."
# Create structure
mkdir -p "$PKG_DIR/DEBIAN"
mkdir -p "$PKG_DIR/usr/bin"
mkdir -p "$PKG_DIR/usr/share/$APP_NAME"
mkdir -p "$PKG_DIR/usr/share/applications"
# Create control file
cat <<EOF > "$PKG_DIR/DEBIAN/control"
Package: $APP_NAME
Version: $VERSION
Section: utils
Priority: optional
Architecture: all
Depends: python3, python3-tk, aircrack-ng, wireless-tools
Recommends: wifite, wireshark, kismet
Maintainer: ldl805 <ldl805@github.com>
Description: EZ Monitor Mode Manager
A simple GUI to switch wireless interfaces into monitor mode and launch security tools.
Automates airmon-ng check kill and interface management.
EOF
# Create wrapper (Note: it usually needs sudo for airmon-ng)
cat <<EOF > "$PKG_DIR/usr/bin/$APP_NAME"
#!/bin/bash
# Check for sudo/root
if [ "\$EUID" -ne 0 ]; then
exec pkexec python3 /usr/share/$APP_NAME/monitor_gui.py "\$@"
else
python3 /usr/share/$APP_NAME/monitor_gui.py "\$@"
fi
EOF
chmod 755 "$PKG_DIR/usr/bin/$APP_NAME"
# Copy application files
cp monitor_gui.py "$PKG_DIR/usr/share/$APP_NAME/"
cp monitor_mode.sh "$PKG_DIR/usr/share/$APP_NAME/"
cp stop_monitor_mode.sh "$PKG_DIR/usr/share/$APP_NAME/"
cp ezmonitormode.desktop "$PKG_DIR/usr/share/applications/"
# Build package
dpkg-deb --build --root-owner-group "$PKG_DIR"
echo "Package built: ${PKG_DIR}.deb"